{
  "manifest_version": "1.0.0",
  "template": {
    "id": "70ed40cc-6ad4-4f29-866f-5af11ff66388",
    "slug": "onyx-lite",
    "name": "Onyx Lite",
    "description": "Onyx Lite - Open Source AI Platform - AI Chat with advanced features",
    "url": "https://railway.com/deploy/onyx-lite",
    "upstream": {
      "image": "caddy:2.11-alpine"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "api-server",
      "source": {
        "image": "onyxdotapp/onyx-backend:v4.8.1"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Caddy",
      "source": {
        "image": "caddy:2.11-alpine"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "web-server",
      "source": {
        "image": "onyxdotapp/onyx-web-server:v4.8.1"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "api-server",
      "description": "Port uvicorn listens on; Railway's healthcheck and the proxy use it. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "WEB_DOMAIN",
      "service": "api-server",
      "description": "Public URL of the Onyx service, used for login redirects and links.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "api-server",
      "description": "Your email. On first boot it becomes the Onyx admin account you sign in with.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_DB",
      "service": "api-server",
      "description": "Postgres database (from the Postgres service).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTH_BACKEND",
      "service": "api-server",
      "description": "Lite: login sessions live in Postgres instead of Redis.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "CACHE_BACKEND",
      "service": "api-server",
      "description": "Lite: caching and locks live in Postgres instead of Redis.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "api-server",
      "description": "Private hostname of the Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "api-server",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "api-server",
      "description": "Postgres user (from the Postgres service).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "api-server",
      "description": "Password for the admin account.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_BOOTSTRAP",
      "service": "api-server",
      "description": "Creates the admin and turns on invite-only sign-up while the database has no users. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "import json\nimport os\nimport sys\nimport time\nimport urllib.error\nimport urllib.parse\nimport urllib.request\n\nBASE = \"http://127.0.0.1:\" + os.environ.get(\"PORT\", \"8080\")\nEMAIL = os.environ.get(\"ADMIN_EMAIL\", \"\").strip()\nPASSWORD = os.environ.get(\"ADMIN_PASSWORD\", \"\")\n\n\ndef log(msg):\n    print(\"admin-bootstrap: \" + msg, flush=True)\n\n\ndef call(method, path, body=None, form=None, cookie=None):\n    headers, data = {}, None\n    if body is not None:\n        data = json.dumps(body).encode()\n        headers[\"Content-Type\"] = \"application/json\"\n    if form is not None:\n        data = urllib.parse.urlencode(form).encode()\n        headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\"\n    if cookie:\n        headers[\"Cookie\"] = cookie\n    req = urllib.request.Request(BASE + path, data=data, headers=headers, method=method)\n    try:\n        with urllib.request.urlopen(req, timeout=30) as r:\n            return r.status, r.read().decode(), r.headers\n    except urllib.error.HTTPError as e:\n        return e.code, e.read().decode(), e.headers\n\n\nfor _ in range(900):\n    try:\n        if call(\"GET\", \"/health\")[0] == 200:\n            break\n    except OSError:\n        pass\n    time.sleep(1)\nelse:\n    sys.exit(log(\"the API never answered /health, nothing done\"))\n\nstatus, text, _ = call(\"GET\", \"/auth/type\")\nif status != 200:\n    sys.exit(log(f\"GET /auth/type returned {status}, nothing done\"))\nif json.loads(text).get(\"has_users\"):\n    sys.exit(0)\nif not EMAIL or not PASSWORD:\n    sys.exit(log(\"ADMIN_EMAIL or ADMIN_PASSWORD is empty, so the first person to sign up becomes the admin\"))\n\nstatus, text, _ = call(\"POST\", \"/auth/register\", body={\"email\": EMAIL, \"password\": PASSWORD})\nif status not in (200, 201):\n    sys.exit(log(f\"could not create {EMAIL} ({status}): {text[:300]}\"))\n\nstatus, _, headers = call(\"POST\", \"/auth/login\", form={\"username\": EMAIL, \"password\": PASSWORD})\ncookie = \"; \".join(c.split(\";\", 1)[0] for c in headers.get_all(\"Set-Cookie\") or [])\nif status not in (200, 204) or not cookie:\n    sys.exit(log(f\"created {EMAIL} but could not sign in as it ({status}); sign-up is still open\"))\n\nstatus, text, _ = call(\"GET\", \"/me\", cookie=cookie)\nme = json.loads(text) if status == 200 else {}\nif \"admin\" not in (me.get(\"effective_permissions\") or me.get(\"permissions\") or []):\n    sys.exit(log(f\"created {EMAIL}, but another account signed up first and holds admin; sign-up left as is\"))\n\nstatus, text, _ = call(\"PATCH\", \"/admin/settings\", body={\"invite_only_enabled\": True}, cookie=cookie)\ncall(\"POST\", \"/auth/logout\", cookie=cookie)\nif status == 200:\n    log(f\"created admin {EMAIL}; sign-up is invite-only (Admin Panel > Security & Hardening > Restrict Open Sign-Up)\")\nelse:\n    log(f\"created admin {EMAIL}, but could not make sign-up invite-only ({status}): {text[:300]}\")\n"
    },
    {
      "key": "USER_AUTH_SECRET",
      "service": "api-server",
      "description": "Signs password-reset, verification and OAuth state tokens. Generated per deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DISABLE_VECTOR_DB",
      "service": "api-server",
      "description": "Onyx Lite switch: no vector index, connectors or RAG search; chat, uploads and Projects stay on.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "api-server",
      "description": "Postgres password (from the Postgres service).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FILE_STORE_BACKEND",
      "service": "api-server",
      "description": "Lite: uploaded files live in Postgres instead of S3/MinIO.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "DISABLE_MODEL_SERVER",
      "service": "api-server",
      "description": "No local embedding model server runs in Lite, so Onyx never tries to reach one.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENCRYPTION_KEY_SECRET",
      "service": "api-server",
      "description": "Encrypts stored LLM keys and credentials. Never change it after saving any.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_API_SERVER_POOL_SIZE",
      "service": "api-server",
      "description": "Connections per pool; the API opens two pools, sized to fit Postgres' 100-connection cap.",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "POSTGRES_API_SERVER_POOL_OVERFLOW",
      "service": "api-server",
      "description": "Extra connections per pool under load.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "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": "Database Onyx migrates into.",
      "secret": false,
      "strategy": "default",
      "default": "onyx"
    },
    {
      "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": "Caddy",
      "description": "Port Caddy listens on; the public domain targets it. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "API_HOST",
      "service": "Caddy",
      "description": "Private address of api-server; /api, /scim, /auth/saml and /openapi.json go here.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WEB_HOST",
      "service": "Caddy",
      "description": "Private address of web-server; every other path goes here.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CADDYFILE",
      "service": "Caddy",
      "description": "Caddy config written to disk at boot: upstream Onyx routing plus a starting page.",
      "secret": false,
      "strategy": "default",
      "default": "{\n\tadmin off\n\tauto_https off\n\tservers {\n\t\ttrusted_proxies static private_ranges 100.64.0.0/10\n\t}\n}\n\n:{$PORT} {\n\tlog\n\n\thandle /proxy-healthz {\n\t\trespond \"ok\" 200\n\t}\n\n\thandle /api/* {\n\t\turi strip_prefix /api\n\t\treverse_proxy {$API_HOST}\n\t}\n\n\t@backend path /openapi.json /auth/saml /auth/saml/* /scim /scim/*\n\thandle @backend {\n\t\treverse_proxy {$API_HOST}\n\t}\n\n\thandle {\n\t\treverse_proxy {$WEB_HOST}\n\t}\n\n\thandle_errors 502 503 504 {\n\t\theader Cache-Control \"no-store\"\n\t\theader Retry-After \"10\"\n\t\theader Content-Type \"text/html; charset=utf-8\"\n\t\trespond <<HTML\n\t\t\t<!doctype html>\n\t\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t<meta charset=\"utf-8\">\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<meta name=\"color-scheme\" content=\"light dark\">\n\t\t\t<meta http-equiv=\"refresh\" content=\"10\">\n\t\t\t<title>Onyx is starting</title>\n\t\t\t</head>\n\t\t\t<body style=\"font-family: system-ui, sans-serif; max-width: 34rem; margin: 20vh auto; padding: 0 1rem; line-height: 1.5\">\n\t\t\t<h1>Onyx is starting</h1>\n\t\t\t<p>The API or web server is not answering yet. A first deploy applies the database migrations before Onyx accepts requests, which takes a few minutes.</p>\n\t\t\t<p>This page reloads every 10 seconds.</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\tHTML 503\n\t}\n}\n"
    },
    {
      "key": "PORT",
      "service": "web-server",
      "description": "Port the Next.js server listens on. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "WEB_DOMAIN",
      "service": "web-server",
      "description": "Public URL of the Onyx service; SSO callbacks redirect here.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "INTERNAL_URL",
      "service": "web-server",
      "description": "Private URL the web server uses to reach the API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "onyx-lite"
      }
    },
    "cli": "railway deploy --template onyx-lite",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "70ed40cc-6ad4-4f29-866f-5af11ff66388",
            "serializedConfig": {
              "services": {
                "022bd1d8-fb4e-493f-a4c3-2fb5402a5c26": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg",
                  "name": "api-server",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'alembic upgrade head && (python -c \"$ADMIN_BOOTSTRAP\" &) && exec uvicorn onyx.main:app --host 0.0.0.0 --port \"$PORT\"'",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 900,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "onyxdotapp/onyx-backend:v4.8.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port uvicorn listens on; Railway's healthcheck and the proxy use it. Leave as is.",
                      "defaultValue": "8080"
                    },
                    "WEB_DOMAIN": {
                      "isOptional": false,
                      "description": "Public URL of the Onyx service, used for login redirects and links.",
                      "defaultValue": "https://${{Caddy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Your email. On first boot it becomes the Onyx admin account you sign in with.",
                      "defaultValue": "{{ADMIN_EMAIL}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Postgres database (from the Postgres service).",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "AUTH_BACKEND": {
                      "isOptional": false,
                      "description": "Lite: login sessions live in Postgres instead of Redis.",
                      "defaultValue": "postgres"
                    },
                    "CACHE_BACKEND": {
                      "isOptional": false,
                      "description": "Lite: caching and locks live in Postgres instead of Redis.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the Postgres service.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user (from the Postgres service).",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the admin account.",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_BOOTSTRAP": {
                      "isOptional": false,
                      "description": "Creates the admin and turns on invite-only sign-up while the database has no users. Leave as is.",
                      "defaultValue": "import json\nimport os\nimport sys\nimport time\nimport urllib.error\nimport urllib.parse\nimport urllib.request\n\nBASE = \"http://127.0.0.1:\" + os.environ.get(\"PORT\", \"8080\")\nEMAIL = os.environ.get(\"ADMIN_EMAIL\", \"\").strip()\nPASSWORD = os.environ.get(\"ADMIN_PASSWORD\", \"\")\n\n\ndef log(msg):\n    print(\"admin-bootstrap: \" + msg, flush=True)\n\n\ndef call(method, path, body=None, form=None, cookie=None):\n    headers, data = {}, None\n    if body is not None:\n        data = json.dumps(body).encode()\n        headers[\"Content-Type\"] = \"application/json\"\n    if form is not None:\n        data = urllib.parse.urlencode(form).encode()\n        headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\"\n    if cookie:\n        headers[\"Cookie\"] = cookie\n    req = urllib.request.Request(BASE + path, data=data, headers=headers, method=method)\n    try:\n        with urllib.request.urlopen(req, timeout=30) as r:\n            return r.status, r.read().decode(), r.headers\n    except urllib.error.HTTPError as e:\n        return e.code, e.read().decode(), e.headers\n\n\nfor _ in range(900):\n    try:\n        if call(\"GET\", \"/health\")[0] == 200:\n            break\n    except OSError:\n        pass\n    time.sleep(1)\nelse:\n    sys.exit(log(\"the API never answered /health, nothing done\"))\n\nstatus, text, _ = call(\"GET\", \"/auth/type\")\nif status != 200:\n    sys.exit(log(f\"GET /auth/type returned {status}, nothing done\"))\nif json.loads(text).get(\"has_users\"):\n    sys.exit(0)\nif not EMAIL or not PASSWORD:\n    sys.exit(log(\"ADMIN_EMAIL or ADMIN_PASSWORD is empty, so the first person to sign up becomes the admin\"))\n\nstatus, text, _ = call(\"POST\", \"/auth/register\", body={\"email\": EMAIL, \"password\": PASSWORD})\nif status not in (200, 201):\n    sys.exit(log(f\"could not create {EMAIL} ({status}): {text[:300]}\"))\n\nstatus, _, headers = call(\"POST\", \"/auth/login\", form={\"username\": EMAIL, \"password\": PASSWORD})\ncookie = \"; \".join(c.split(\";\", 1)[0] for c in headers.get_all(\"Set-Cookie\") or [])\nif status not in (200, 204) or not cookie:\n    sys.exit(log(f\"created {EMAIL} but could not sign in as it ({status}); sign-up is still open\"))\n\nstatus, text, _ = call(\"GET\", \"/me\", cookie=cookie)\nme = json.loads(text) if status == 200 else {}\nif \"admin\" not in (me.get(\"effective_permissions\") or me.get(\"permissions\") or []):\n    sys.exit(log(f\"created {EMAIL}, but another account signed up first and holds admin; sign-up left as is\"))\n\nstatus, text, _ = call(\"PATCH\", \"/admin/settings\", body={\"invite_only_enabled\": True}, cookie=cookie)\ncall(\"POST\", \"/auth/logout\", cookie=cookie)\nif status == 200:\n    log(f\"created admin {EMAIL}; sign-up is invite-only (Admin Panel > Security & Hardening > Restrict Open Sign-Up)\")\nelse:\n    log(f\"created admin {EMAIL}, but could not make sign-up invite-only ({status}): {text[:300]}\")\n"
                    },
                    "USER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs password-reset, verification and OAuth state tokens. Generated per deploy.",
                      "defaultValue": "{{USER_AUTH_SECRET}}"
                    },
                    "DISABLE_VECTOR_DB": {
                      "isOptional": false,
                      "description": "Onyx Lite switch: no vector index, connectors or RAG search; chat, uploads and Projects stay on.",
                      "defaultValue": "true"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password (from the Postgres service).",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "FILE_STORE_BACKEND": {
                      "isOptional": false,
                      "description": "Lite: uploaded files live in Postgres instead of S3/MinIO.",
                      "defaultValue": "postgres"
                    },
                    "DISABLE_MODEL_SERVER": {
                      "isOptional": false,
                      "description": "No local embedding model server runs in Lite, so Onyx never tries to reach one.",
                      "defaultValue": "true"
                    },
                    "ENCRYPTION_KEY_SECRET": {
                      "isOptional": false,
                      "description": "Encrypts stored LLM keys and credentials. Never change it after saving any.",
                      "defaultValue": "{{ENCRYPTION_KEY_SECRET}}"
                    },
                    "POSTGRES_API_SERVER_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Connections per pool; the API opens two pools, sized to fit Postgres' 100-connection cap.",
                      "defaultValue": "20"
                    },
                    "POSTGRES_API_SERVER_POOL_OVERFLOW": {
                      "isOptional": false,
                      "description": "Extra connections per pool under load.",
                      "defaultValue": "10"
                    }
                  }
                },
                "37f80e3a-8e9e-4947-84db-3895d017b831": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "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": "Database Onyx migrates into.",
                      "defaultValue": "onyx"
                    },
                    "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": {},
                  "volumeMounts": {
                    "37f80e3a-8e9e-4947-84db-3895d017b831": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "835661bb-0871-490e-b8e0-d8ee48c58807": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "Caddy",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'printenv CADDYFILE > /etc/caddy/Caddyfile && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/proxy-healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Caddy listens on; the public domain targets it. Leave as is.",
                      "defaultValue": "8080"
                    },
                    "API_HOST": {
                      "isOptional": false,
                      "description": "Private address of api-server; /api, /scim, /auth/saml and /openapi.json go here.",
                      "defaultValue": "${{api-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "WEB_HOST": {
                      "isOptional": false,
                      "description": "Private address of web-server; every other path goes here.",
                      "defaultValue": "${{web-server.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "CADDYFILE": {
                      "isOptional": false,
                      "description": "Caddy config written to disk at boot: upstream Onyx routing plus a starting page.",
                      "defaultValue": "{\n\tadmin off\n\tauto_https off\n\tservers {\n\t\ttrusted_proxies static private_ranges 100.64.0.0/10\n\t}\n}\n\n:{$PORT} {\n\tlog\n\n\thandle /proxy-healthz {\n\t\trespond \"ok\" 200\n\t}\n\n\thandle /api/* {\n\t\turi strip_prefix /api\n\t\treverse_proxy {$API_HOST}\n\t}\n\n\t@backend path /openapi.json /auth/saml /auth/saml/* /scim /scim/*\n\thandle @backend {\n\t\treverse_proxy {$API_HOST}\n\t}\n\n\thandle {\n\t\treverse_proxy {$WEB_HOST}\n\t}\n\n\thandle_errors 502 503 504 {\n\t\theader Cache-Control \"no-store\"\n\t\theader Retry-After \"10\"\n\t\theader Content-Type \"text/html; charset=utf-8\"\n\t\trespond <<HTML\n\t\t\t<!doctype html>\n\t\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t<meta charset=\"utf-8\">\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<meta name=\"color-scheme\" content=\"light dark\">\n\t\t\t<meta http-equiv=\"refresh\" content=\"10\">\n\t\t\t<title>Onyx is starting</title>\n\t\t\t</head>\n\t\t\t<body style=\"font-family: system-ui, sans-serif; max-width: 34rem; margin: 20vh auto; padding: 0 1rem; line-height: 1.5\">\n\t\t\t<h1>Onyx is starting</h1>\n\t\t\t<p>The API or web server is not answering yet. A first deploy applies the database migrations before Onyx accepts requests, which takes a few minutes.</p>\n\t\t\t<p>This page reloads every 10 seconds.</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\tHTML 503\n\t}\n}\n"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "f7a22c27-a372-413a-b167-7721e6e16b07": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg",
                  "name": "web-server",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "onyxdotapp/onyx-web-server:v4.8.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Next.js server listens on. Leave as is.",
                      "defaultValue": "3000"
                    },
                    "WEB_DOMAIN": {
                      "isOptional": false,
                      "description": "Public URL of the Onyx service; SSO callbacks redirect here.",
                      "defaultValue": "https://${{Caddy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "INTERNAL_URL": {
                      "isOptional": false,
                      "description": "Private URL the web server uses to reach the API.",
                      "defaultValue": "http://${{api-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Caddy",
      "method": "GET",
      "path": "/proxy-healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-25T16:14:54.488Z",
  "generator_version": "0.1.0"
}
