{
  "manifest_version": "1.0.0",
  "template": {
    "id": "836c7dd7-2cff-4a1f-a8a9-1b14bc73c10a",
    "slug": "bytebot-protected-ai-desktop-stack",
    "name": "Bytebot Protected AI Desktop Stack",
    "description": "AI desktop agent with Postgres and a generated-password access gateway.",
    "url": "https://railway.com/deploy/bytebot-protected-ai-desktop-stack",
    "upstream": {
      "image": "caddy@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl@sha256:34c3e49e7ed2aaef6c575fb23bb37b878007e97752d3bf27ccb550046f893ca7"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "bytebot-ui",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-ui@sha256:492d57da67513582dd15cde892dc8b29b9a6deec62c9e2b4e2c86e168c22302f"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Access Gateway",
      "source": {
        "image": "caddy@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "bytebot-agent",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-agent@sha256:a36e65ce6db772a4c6fa340a68c50bca0a493bc16b6f86d566ac8fc11c122b29"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "bytebot-desktop",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-desktop@sha256:e974e7ac93c8f755e98b8a437e5497a63175c7096b51a348f5f1d9320598a1c9"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "bytebot-ui",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "bytebot-ui",
      "description": "Provide a value for HOSTNAME.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "NODE_ENV",
      "service": "bytebot-ui",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "BYTEBOT_AGENT_BASE_URL",
      "service": "bytebot-ui",
      "description": "Provide a value for BYTEBOT_AGENT_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BYTEBOT_DESKTOP_VNC_URL",
      "service": "bytebot-ui",
      "description": "Provide a value for BYTEBOT_DESKTOP_VNC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Access Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "Access Gateway",
      "description": "Provide a value for UPSTREAM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PROXY_PASSWORD",
      "service": "Access Gateway",
      "description": "Generated gateway password; browser username is operator.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "bytebot-agent",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "9991"
    },
    {
      "key": "DATABASE_URL",
      "service": "bytebot-agent",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NIXPACKS_NODE_VERSION",
      "service": "bytebot-agent",
      "description": "Provide a value for NIXPACKS_NODE_VERSION.",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "BYTEBOT_DESKTOP_BASE_URL",
      "service": "bytebot-agent",
      "description": "Provide a value for BYTEBOT_DESKTOP_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "bytebot-desktop",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "9990"
    },
    {
      "key": "DISPLAY",
      "service": "bytebot-desktop",
      "description": "Provide a value for DISPLAY.",
      "secret": false,
      "strategy": "default",
      "default": ":0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "bytebot-protected-ai-desktop-stack"
      }
    },
    "cli": "railway deploy --template bytebot-protected-ai-desktop-stack",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "836c7dd7-2cff-4a1f-a8a9-1b14bc73c10a",
            "serializedConfig": {
              "services": {
                "1d5ad8c3-f556-5d45-81de-30b2ed57a6a6": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl@sha256:34c3e49e7ed2aaef6c575fb23bb37b878007e97752d3bf27ccb550046f893ca7"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "1d5ad8c3-f556-5d45-81de-30b2ed57a6a6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "2a4a9e1e-7806-5428-91a8-ed9eebfb7815": {
                  "name": "bytebot-ui",
                  "deploy": {
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-ui@sha256:492d57da67513582dd15cde892dc8b29b9a6deec62c9e2b4e2c86e168c22302f"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "::"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "production"
                    },
                    "BYTEBOT_AGENT_BASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "http://${{bytebot-agent.RAILWAY_PRIVATE_DOMAIN}}:9991"
                    },
                    "BYTEBOT_DESKTOP_VNC_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "http://${{bytebot-desktop.RAILWAY_PRIVATE_DOMAIN}}:9990/websockify"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "8d21d908-67e8-55dc-b69f-654f9a84ee98": {
                  "name": "Access Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'set -eu; hash=$(caddy hash-password --plaintext \"$PROXY_PASSWORD\"); printf \"{\\n admin off\\n auto_https off\\n}\\n:8080 {\\n basic_auth {\\n operator %s\\n }\\n reverse_proxy %s\\n}\\n\" \"$hash\" \"$UPSTREAM\" > /tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "caddy@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "http://${{bytebot-ui.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "PROXY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated gateway password; browser username is operator.",
                      "defaultValue": "{{PROXY_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "bd168f70-3e80-5d18-ac75-1651ad835f2d": {
                  "name": "bytebot-agent",
                  "deploy": {
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-agent@sha256:a36e65ce6db772a4c6fa340a68c50bca0a493bc16b6f86d566ac8fc11c122b29"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "9991"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "NIXPACKS_NODE_VERSION": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "20"
                    },
                    "BYTEBOT_DESKTOP_BASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "http://${{bytebot-desktop.RAILWAY_PRIVATE_DOMAIN}}:9990"
                    }
                  },
                  "networking": {}
                },
                "bdf34967-1c05-5770-9b38-4092152381bc": {
                  "name": "bytebot-desktop",
                  "deploy": {
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-desktop@sha256:e974e7ac93c8f755e98b8a437e5497a63175c7096b51a348f5f1d9320598a1c9"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "9990"
                    },
                    "DISPLAY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": ":0"
                    }
                  },
                  "networking": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-10-18T10:14:45.913Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-18T09:04:02.784Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c51c19cea1054154a06b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 99,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Access Gateway"
  }
}
