{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4bb0c250-f4a0-4106-be98-684ba50b417f",
    "slug": "open-webui-litellm",
    "name": "Open WebUI + LiteLLM | Team ChatGPT with an AI Gateway",
    "description": "Team ChatGPT-style UI with a LiteLLM gateway for 100+ model providers",
    "url": "https://railway.com/deploy/open-webui-litellm",
    "upstream": {
      "image": "ghcr.io/open-webui/open-webui:v0.12.0"
    }
  },
  "services": [
    {
      "name": "Open WebUI",
      "source": {
        "image": "ghcr.io/open-webui/open-webui:v0.12.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/backend/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17.11-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "LiteLLM",
      "source": {
        "image": "ghcr.io/berriai/litellm:v1.105.0"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Open WebUI",
      "description": "Port Open WebUI listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "WEBUI_URL",
      "service": "Open WebUI",
      "description": "Public URL of Open WebUI (links, OAuth callbacks) - set it to your custom domain after adding one",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Open WebUI",
      "description": "Users, chats and settings live in Postgres on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "Open WebUI",
      "description": "Key Open WebUI uses to call LiteLLM (its master key)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WEBUI_SECRET_KEY",
      "service": "Open WebUI",
      "description": "Signs login sessions and encrypts stored OAuth tokens - changing it logs everyone out",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENABLE_OLLAMA_API",
      "service": "Open WebUI",
      "description": "No bundled Ollama - models come through LiteLLM",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "OPENAI_API_BASE_URL",
      "service": "Open WebUI",
      "description": "LiteLLM on the private network - every model you add in LiteLLM shows up here (only read on first boot, later edit it in Admin Settings > Connections)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "Open WebUI",
      "description": "First boot runs the database migrations and downloads the small local embedding model for document search",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Open WebUI's database (LiteLLM gets a second database, litellm, on first boot)",
      "secret": false,
      "strategy": "default",
      "default": "openwebui"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "LiteLLM",
      "description": "Port LiteLLM listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "4000"
    },
    {
      "key": "DATABASE_URL",
      "service": "LiteLLM",
      "description": "LiteLLM's own database (models, virtual keys, spend) in the shared Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LITELLM_SALT_KEY",
      "service": "LiteLLM",
      "description": "Encrypts provider API keys stored in the database. BACK IT UP and never change it, or stored keys become unreadable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORE_MODEL_IN_DB",
      "service": "LiteLLM",
      "description": "Add and edit models in the LiteLLM admin UI instead of a config file",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "LITELLM_MASTER_KEY",
      "service": "LiteLLM",
      "description": "Admin API key, and the password for the LiteLLM admin UI at /ui (username admin)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "LiteLLM",
      "description": "First boot applies a few hundred database migrations before the health check can pass",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "open-webui-litellm"
      }
    },
    "cli": "railway deploy --template open-webui-litellm",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4bb0c250-f4a0-4106-be98-684ba50b417f",
            "serializedConfig": {
              "services": {
                "3b56cc11-7d8d-4b32-97be-e40c98f7142a": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/open-webui-litellm-railway/main/icon.svg",
                  "name": "Open WebUI",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/open-webui/open-webui:v0.12.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Open WebUI listens on - leave as is",
                      "defaultValue": "8080"
                    },
                    "WEBUI_URL": {
                      "isOptional": false,
                      "description": "Public URL of Open WebUI (links, OAuth callbacks) - set it to your custom domain after adding one",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Users, chats and settings live in Postgres on the private network",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "Key Open WebUI uses to call LiteLLM (its master key)",
                      "defaultValue": "${{LiteLLM.LITELLM_MASTER_KEY}}"
                    },
                    "WEBUI_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Signs login sessions and encrypts stored OAuth tokens - changing it logs everyone out",
                      "defaultValue": "{{WEBUI_SECRET_KEY}}"
                    },
                    "ENABLE_OLLAMA_API": {
                      "isOptional": false,
                      "description": "No bundled Ollama - models come through LiteLLM",
                      "defaultValue": "False"
                    },
                    "OPENAI_API_BASE_URL": {
                      "isOptional": false,
                      "description": "LiteLLM on the private network - every model you add in LiteLLM shows up here (only read on first boot, later edit it in Admin Settings > Connections)",
                      "defaultValue": "http://${{LiteLLM.RAILWAY_PRIVATE_DOMAIN}}:4000/v1"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot runs the database migrations and downloads the small local embedding model for document search",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "4ad34bf1-4dd6-4b28-ab49-00b2b24e03d0": {
                      "mountPath": "/app/backend/data"
                    }
                  }
                },
                "4c1b87ac-d8a7-4668-b15e-902551224b78": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": "/bin/sh -c \"echo 'CREATE DATABASE litellm;' > /docker-entrypoint-initdb.d/10-litellm.sql && exec docker-entrypoint.sh postgres\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17.11-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Open WebUI's database (LiteLLM gets a second database, litellm, on first boot)",
                      "defaultValue": "openwebui"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "d072beab-8870-4593-91a8-9989da7e6b66": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "a0878fd2-5b35-424a-91d3-58503d873cce": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/open-webui-litellm-railway/main/litellm.png",
                  "name": "LiteLLM",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health/liveliness",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/berriai/litellm:v1.105.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port LiteLLM listens on - leave as is",
                      "defaultValue": "4000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "LiteLLM's own database (models, virtual keys, spend) in the shared Postgres",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/litellm"
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional Google AI Studio key, used by models you add in LiteLLM without their own key",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional OpenAI key, used by models you add in LiteLLM without their own key",
                      "defaultValue": ""
                    },
                    "LITELLM_SALT_KEY": {
                      "isOptional": false,
                      "description": "Encrypts provider API keys stored in the database. BACK IT UP and never change it, or stored keys become unreadable",
                      "defaultValue": "{{LITELLM_SALT_KEY}}"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional Anthropic key, used by models you add in LiteLLM without their own key",
                      "defaultValue": ""
                    },
                    "STORE_MODEL_IN_DB": {
                      "isOptional": false,
                      "description": "Add and edit models in the LiteLLM admin UI instead of a config file",
                      "defaultValue": "True"
                    },
                    "LITELLM_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Admin API key, and the password for the LiteLLM admin UI at /ui (username admin)",
                      "defaultValue": "{{LITELLM_MASTER_KEY}}"
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional OpenRouter key, used by models you add in LiteLLM without their own key",
                      "defaultValue": ""
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot applies a few hundred database migrations before the health check can pass",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Open WebUI",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-10-14T10:14:43.564Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-12T00:45:49.521Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_95ba3dec1aa84e24b72d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 158,
    "typical_build_seconds": 0,
    "typical_start_seconds": 91,
    "slowest_service": "Open WebUI"
  }
}
