{
  "manifest_version": "1.0.0",
  "template": {
    "id": "57012008-2deb-4037-8dec-12829f2d2720",
    "slug": "bytebot-self-hosted-ai-desktop-agent",
    "name": "Bytebot (Self-Hosted AI Desktop Agent)",
    "description": "Self-hosted AI desktop agent: a Linux desktop run by Claude, GPT or Gemini",
    "url": "https://railway.com/deploy/bytebot-self-hosted-ai-desktop-agent",
    "upstream": {
      "image": "ghcr.io/bytebot-ai/bytebot-ui:edge"
    }
  },
  "services": [
    {
      "name": "bytebot-agent",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-agent:edge"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "bytebot-desktop",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-desktop:edge"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "bytebot-ui",
      "source": {
        "image": "ghcr.io/bytebot-ai/bytebot-ui:edge"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "bytebot-agent",
      "description": "Agent API port",
      "secret": false,
      "strategy": "default",
      "default": "9991"
    },
    {
      "key": "DATABASE_URL",
      "service": "bytebot-agent",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BYTEBOT_DESKTOP_BASE_URL",
      "service": "bytebot-agent",
      "description": "Private URL of the desktop service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "bytebot-desktop",
      "description": "noVNC/websockify port used by the UI and agent",
      "secret": false,
      "strategy": "default",
      "default": "9990"
    },
    {
      "key": "DISPLAY",
      "service": "bytebot-desktop",
      "description": "X display used by the virtual desktop",
      "secret": false,
      "strategy": "default",
      "default": ":0"
    },
    {
      "key": "NODE_ENV",
      "service": "bytebot-ui",
      "description": "Run the UI in production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "BYTEBOT_AGENT_BASE_URL",
      "service": "bytebot-ui",
      "description": "Private URL of the agent API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BYTEBOT_DESKTOP_VNC_URL",
      "service": "bytebot-ui",
      "description": "Private websockify URL for the live desktop view",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "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": "Postgres user (Data panel)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Postgres database (Data panel)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Postgres password (Data panel)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first start",
      "secret": false,
      "strategy": "default",
      "default": "bytebot"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection URL used by the agent",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres superuser",
      "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": "Generated Postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection URL (Data panel)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to shut down cleanly",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "bytebot-self-hosted-ai-desktop-agent"
      }
    },
    "cli": "railway deploy --template bytebot-self-hosted-ai-desktop-agent",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "57012008-2deb-4037-8dec-12829f2d2720",
            "serializedConfig": {
              "services": {
                "0912046f-4038-4b34-91b5-ac1a881ee802": {
                  "icon": "https://raw.githubusercontent.com/bytebot-ai/bytebot/refs/heads/main/static/bytebot_icon.svg",
                  "name": "bytebot-agent",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-agent:edge"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Agent API port",
                      "defaultValue": "9991"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": true,
                      "description": "Google Gemini API key. Optional if another provider is set.",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "OpenAI API key (GPT). Optional if another provider is set.",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Anthropic API key (Claude). Set at least one provider key.",
                      "defaultValue": ""
                    },
                    "BYTEBOT_DESKTOP_BASE_URL": {
                      "isOptional": false,
                      "description": "Private URL of the desktop service",
                      "defaultValue": "http://${{bytebot-desktop.RAILWAY_PRIVATE_DOMAIN}}:9990"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                },
                "5ba5aa64-5b90-4b21-8740-bf186b4bc90b": {
                  "icon": "https://raw.githubusercontent.com/bytebot-ai/bytebot/refs/heads/main/static/bytebot_icon.svg",
                  "name": "bytebot-desktop",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-desktop:edge"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "noVNC/websockify port used by the UI and agent",
                      "defaultValue": "9990"
                    },
                    "DISPLAY": {
                      "isOptional": false,
                      "description": "X display used by the virtual desktop",
                      "defaultValue": ":0"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                },
                "86d50f59-3934-4ae7-8b67-73fa3cc95498": {
                  "icon": "https://raw.githubusercontent.com/bytebot-ai/bytebot/refs/heads/main/static/bytebot_icon.svg",
                  "name": "bytebot-ui",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/bytebot-ai/bytebot-ui:edge"
                  },
                  "variables": {
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Run the UI in production mode",
                      "defaultValue": "production"
                    },
                    "BYTEBOT_AGENT_BASE_URL": {
                      "isOptional": false,
                      "description": "Private URL of the agent API",
                      "defaultValue": "http://${{bytebot-agent.RAILWAY_PRIVATE_DOMAIN}}:9991"
                    },
                    "BYTEBOT_DESKTOP_VNC_URL": {
                      "isOptional": false,
                      "description": "Private websockify URL for the live desktop view",
                      "defaultValue": "http://${{bytebot-desktop.RAILWAY_PRIVATE_DOMAIN}}:9990/websockify"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "ea193277-0e83-4b57-b62e-b3d1f7abb2ba": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "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": "Postgres user (Data panel)",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Postgres database (Data panel)",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password (Data panel)",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first start",
                      "defaultValue": "bytebot"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection URL used by the agent",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated Postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection URL (Data panel)",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRES_DB}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to shut down cleanly",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "d6d2d92e-93a8-41bb-a565-5701055fc4de": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T22:14:38.342Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T19:59:01.126Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_7922d1789f634532a6a9",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 152,
    "typical_build_seconds": 0,
    "typical_start_seconds": 30,
    "slowest_service": "bytebot-ui"
  }
}
