{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e061a4e1-4409-434b-9724-801c56163114",
    "slug": "openwebui",
    "name": "Open WebUI [with Postgres & Redis]",
    "description": "Self-host OpenWebUI; Postgres survives redeploys, Redis scales sessions",
    "url": "https://railway.com/deploy/openwebui",
    "upstream": {
      "image": "ghcr.io/open-webui/open-webui"
    }
  },
  "services": [
    {
      "name": "Open WebUI",
      "source": {
        "image": "ghcr.io/open-webui/open-webui"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Open WebUI",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "REDIS_URL",
      "service": "Open WebUI",
      "description": "Redis connection string for caching",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WEBUI_URL",
      "service": "Open WebUI",
      "description": "Public URL for OpenWebUI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WEBUI_AUTH",
      "service": "Open WebUI",
      "description": "Enable authentication for web interface",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "Open WebUI",
      "description": "Postgres connection string for OpenWebUI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DO_NOT_TRACK",
      "service": "Open WebUI",
      "description": "Disable tracking signals",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Open WebUI",
      "description": "Container runtime user ID",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "WEBUI_SECRET_KEY",
      "service": "Open WebUI",
      "description": "Secret key for session security",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WEBSOCKET_MANAGER",
      "service": "Open WebUI",
      "description": "Use Redis for websocket scaling",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "DATABASE_POOL_SIZE",
      "service": "Open WebUI",
      "description": "Base database connection pool size",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "SCARF_NO_ANALYTICS",
      "service": "Open WebUI",
      "description": "Disable Scarf package analytics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OPENAI_API_BASE_URL",
      "service": "Open WebUI",
      "description": "Base endpoint for OpenAI API. Modify if using Gemini. Note: OpenWebUI doesnt support Anthropic's format. Need to proxy that if you want to use it",
      "secret": false,
      "strategy": "default",
      "default": "https://api.openai.com/v1"
    },
    {
      "key": "WEBSOCKET_REDIS_URL",
      "service": "Open WebUI",
      "description": "Redis backend for websocket manager",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ANONYMIZED_TELEMETRY",
      "service": "Open WebUI",
      "description": "Disable anonymous usage telemetry",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_POOL_RECYCLE",
      "service": "Open WebUI",
      "description": "Seconds before recycling connections",
      "secret": false,
      "strategy": "default",
      "default": "1800"
    },
    {
      "key": "DATABASE_POOL_TIMEOUT",
      "service": "Open WebUI",
      "description": "Seconds to wait for connection",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "ENABLE_WEBSOCKET_SUPPORT",
      "service": "Open WebUI",
      "description": "Enable real-time websocket communication",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_POOL_MAX_OVERFLOW",
      "service": "Open WebUI",
      "description": "Extra connections beyond pool size",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Directory storing database files",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal hostname for Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Default Postgres server port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Username for Postgres login",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for Postgres authentication",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created during initialization",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Internal Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default Postgres administrator user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate validity duration",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for Postgres admin user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "External Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Graceful shutdown draining time",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal hostname for Redis service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Default Redis server port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis authentication username",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal Redis connection URI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password alias variable",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password for Redis authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "External Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "openwebui"
      }
    },
    "cli": "railway deploy --template openwebui",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e061a4e1-4409-434b-9724-801c56163114",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "059982f7-8566-4b71-ba8f-78ceef0817b8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/open-webui-light.svg",
                  "name": "Open WebUI",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/open-webui/open-webui"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "8080"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string for caching",
                      "defaultValue": "redis://default:${{Redis.REDISPASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379/0"
                    },
                    "WEBUI_URL": {
                      "isOptional": false,
                      "description": "Public URL for OpenWebUI",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WEBUI_AUTH": {
                      "isOptional": false,
                      "description": "Enable authentication for web interface",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string for OpenWebUI",
                      "defaultValue": "postgresql://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.PGHOST}}:5432/${{Postgres.PGDATABASE}}"
                    },
                    "DO_NOT_TRACK": {
                      "isOptional": false,
                      "description": "Disable tracking signals",
                      "defaultValue": "true"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional OpenAI API key",
                      "defaultValue": ""
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Container runtime user ID",
                      "defaultValue": "0"
                    },
                    "WEBUI_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret key for session security",
                      "defaultValue": "{{WEBUI_SECRET_KEY}}"
                    },
                    "WEBSOCKET_MANAGER": {
                      "isOptional": false,
                      "description": "Use Redis for websocket scaling",
                      "defaultValue": "redis"
                    },
                    "DATABASE_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Base database connection pool size",
                      "defaultValue": "10"
                    },
                    "SCARF_NO_ANALYTICS": {
                      "isOptional": false,
                      "description": "Disable Scarf package analytics",
                      "defaultValue": "true"
                    },
                    "OPENAI_API_BASE_URL": {
                      "isOptional": false,
                      "description": "Base endpoint for OpenAI API. Modify if using Gemini. Note: OpenWebUI doesnt support Anthropic's format. Need to proxy that if you want to use it",
                      "defaultValue": "https://api.openai.com/v1"
                    },
                    "WEBSOCKET_REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis backend for websocket manager",
                      "defaultValue": "redis://default:${{Redis.REDISPASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379/0"
                    },
                    "ANONYMIZED_TELEMETRY": {
                      "isOptional": false,
                      "description": "Disable anonymous usage telemetry",
                      "defaultValue": "false"
                    },
                    "DATABASE_POOL_RECYCLE": {
                      "isOptional": false,
                      "description": "Seconds before recycling connections",
                      "defaultValue": "1800"
                    },
                    "DATABASE_POOL_TIMEOUT": {
                      "isOptional": false,
                      "description": "Seconds to wait for connection",
                      "defaultValue": "30"
                    },
                    "ENABLE_WEBSOCKET_SUPPORT": {
                      "isOptional": false,
                      "description": "Enable real-time websocket communication",
                      "defaultValue": "true"
                    },
                    "DATABASE_POOL_MAX_OVERFLOW": {
                      "isOptional": false,
                      "description": "Extra connections beyond pool size",
                      "defaultValue": "5"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "c0da6d34-32b9-47b6-ac79-5363e77cc5ae": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory storing database files",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for Postgres",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Default Postgres server port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for Postgres login",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres authentication",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created during initialization",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default Postgres administrator user",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate validity duration",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres admin user",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown draining time",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "c0da6d34-32b9-47b6-ac79-5363e77cc5ae": {
                      "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."
                  }
                },
                "c6c999dc-7b29-4090-ba19-7634a7149d3e": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for Redis service",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Default Redis server port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis authentication username",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection URI",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password alias variable",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for Redis authentication",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External Redis connection string",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "c6c999dc-7b29-4090-ba19-7634a7149d3e": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T17:53:33.038Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_05bee18297614a2a9dd7",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 102,
    "typical_build_seconds": 0,
    "typical_start_seconds": 61,
    "slowest_service": "Open WebUI"
  }
}
