{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c0d42c03-332e-4a23-907c-faa167c1e5f0",
    "slug": "ollama-open-webui",
    "name": "Open WebUI and Ollama",
    "description": "Private AI: Ollama inference behind an authenticated Open WebUI chat UI",
    "url": "https://railway.com/deploy/ollama-open-webui",
    "upstream": {
      "image": "ghcr.io/open-webui/open-webui:v0.10.2"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "OpenWebUI",
      "source": {
        "image": "ghcr.io/open-webui/open-webui:v0.10.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Ollama",
      "source": {
        "image": "ollama/ollama:0.32.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.ollama",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Standard Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default ACL user created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Convenience alias of the generated password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated password for the default user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "OpenWebUI",
      "description": "HTTP port the app listens on",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "HF_HOME",
      "service": "OpenWebUI",
      "description": "Baked-in Hugging Face cache",
      "secret": false,
      "strategy": "default",
      "default": "/app/backend/data/cache/embedding/models"
    },
    {
      "key": "DATA_DIR",
      "service": "OpenWebUI",
      "description": "Volume path for uploads and vectors",
      "secret": false,
      "strategy": "default",
      "default": "/data"
    },
    {
      "key": "REDIS_URL",
      "service": "OpenWebUI",
      "description": "Shared application state store",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WEBUI_URL",
      "service": "OpenWebUI",
      "description": "Public URL for OAuth and search",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "USER_AGENT",
      "service": "OpenWebUI",
      "description": "Identifier for outbound fetches",
      "secret": false,
      "strategy": "default",
      "default": "open-webui-railway/1.0"
    },
    {
      "key": "WEBUI_AUTH",
      "service": "OpenWebUI",
      "description": "Require login for access",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "OpenWebUI",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENABLE_SIGNUP",
      "service": "OpenWebUI",
      "description": "Open signup until first admin exists",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OLLAMA_BASE_URL",
      "service": "OpenWebUI",
      "description": "Private Ollama endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OMP_NUM_THREADS",
      "service": "OpenWebUI",
      "description": "Caps PyTorch threads to vCPU",
      "secret": false,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "UVICORN_WORKERS",
      "service": "OpenWebUI",
      "description": "Single worker avoids duplicate automations",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "WEBUI_SECRET_KEY",
      "service": "OpenWebUI",
      "description": "Signs JWTs, cookies, sessions",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CORS_ALLOW_ORIGIN",
      "service": "OpenWebUI",
      "description": "Restrict browser origins",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DEFAULT_USER_ROLE",
      "service": "OpenWebUI",
      "description": "New signups await admin review",
      "secret": false,
      "strategy": "default",
      "default": "pending"
    },
    {
      "key": "ENABLE_OLLAMA_API",
      "service": "OpenWebUI",
      "description": "Enable the Ollama model provider",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_OPENAI_API",
      "service": "OpenWebUI",
      "description": "Keep the stack fully self-contained",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WEBSOCKET_MANAGER",
      "service": "OpenWebUI",
      "description": "Use Redis for websockets",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "WHISPER_MODEL_DIR",
      "service": "OpenWebUI",
      "description": "Baked-in Whisper model cache",
      "secret": false,
      "strategy": "default",
      "default": "/app/backend/data/cache/whisper/models"
    },
    {
      "key": "DATABASE_POOL_SIZE",
      "service": "OpenWebUI",
      "description": "Postgres connection pool size",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "TIKTOKEN_CACHE_DIR",
      "service": "OpenWebUI",
      "description": "Baked-in tiktoken encoding cache",
      "secret": true,
      "strategy": "default",
      "default": "/app/backend/data/cache/tiktoken"
    },
    {
      "key": "WEBSOCKET_REDIS_URL",
      "service": "OpenWebUI",
      "description": "Websocket coordination backend",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_POOL_TIMEOUT",
      "service": "OpenWebUI",
      "description": "Seconds to wait for connection",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "AIOHTTP_CLIENT_TIMEOUT",
      "service": "OpenWebUI",
      "description": "Upstream Ollama request timeout",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "ENABLE_WEBSOCKET_SUPPORT",
      "service": "OpenWebUI",
      "description": "Enable realtime streaming and channels",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WHISPER_MODEL_AUTO_UPDATE",
      "service": "OpenWebUI",
      "description": "Use baked-in Whisper model",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_POOL_MAX_OVERFLOW",
      "service": "OpenWebUI",
      "description": "Extra pool connections allowed",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "SENTENCE_TRANSFORMERS_HOME",
      "service": "OpenWebUI",
      "description": "Baked-in embedding model cache",
      "secret": false,
      "strategy": "default",
      "default": "/app/backend/data/cache/embedding/models"
    },
    {
      "key": "ENABLE_VERSION_UPDATE_CHECK",
      "service": "OpenWebUI",
      "description": "Skip outbound version check calls",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAG_EMBEDDING_MODEL_AUTO_UPDATE",
      "service": "OpenWebUI",
      "description": "Use baked-in embedding model",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAG_RERANKING_MODEL_AUTO_UPDATE",
      "service": "OpenWebUI",
      "description": "Use baked-in reranking model",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OAUTH_SESSION_TOKEN_ENCRYPTION_KEY",
      "service": "OpenWebUI",
      "description": "Encrypts OAuth session tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory, a subdirectory of the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Standard PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "libpq alias of the superuser name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "libpq alias of the default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "libpq alias of the superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity window of the generated self-signed TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for in-flight connections on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Ollama",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "11434"
    },
    {
      "key": "OLLAMA_HOST",
      "service": "Ollama",
      "description": "IPv6 bind, required for private DNS",
      "secret": false,
      "strategy": "default",
      "default": "[::]:11434"
    },
    {
      "key": "OLLAMA_MODELS",
      "service": "Ollama",
      "description": "Model storage path on volume",
      "secret": false,
      "strategy": "default",
      "default": "/root/.ollama/models"
    },
    {
      "key": "OLLAMA_NO_CLOUD",
      "service": "Ollama",
      "description": "Disable remote cloud model inference",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "OLLAMA_KEEP_ALIVE",
      "service": "Ollama",
      "description": "Loaded model idle retention",
      "secret": false,
      "strategy": "default",
      "default": "10m"
    },
    {
      "key": "OLLAMA_NUM_PARALLEL",
      "service": "Ollama",
      "description": "Concurrent request slots per model",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "OLLAMA_CONTEXT_LENGTH",
      "service": "Ollama",
      "description": "Pinned context window size",
      "secret": false,
      "strategy": "default",
      "default": "4096"
    },
    {
      "key": "OLLAMA_MAX_LOADED_MODELS",
      "service": "Ollama",
      "description": "Max simultaneously resident models",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ollama-open-webui"
      }
    },
    "cli": "railway deploy --template ollama-open-webui",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c0d42c03-332e-4a23-907c-faa167c1e5f0",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2a861599-1697-46dd-9b63-366744ed8cc1": {
                  "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": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Standard Redis port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default ACL user created on first boot",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Convenience alias of the generated password",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the default user",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "2a861599-1697-46dd-9b63-366744ed8cc1": {
                      "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."
                  }
                },
                "3b37b9cc-960b-4e01-b9d4-a93fe2391b70": {
                  "icon": "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@latest/dark/openwebui.png",
                  "name": "OpenWebUI",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/open-webui/open-webui:v0.10.2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the app listens on",
                      "defaultValue": "8080"
                    },
                    "HF_HOME": {
                      "isOptional": false,
                      "description": "Baked-in Hugging Face cache",
                      "defaultValue": "/app/backend/data/cache/embedding/models"
                    },
                    "DATA_DIR": {
                      "isOptional": false,
                      "description": "Volume path for uploads and vectors",
                      "defaultValue": "/data"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Shared application state store",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "WEBUI_URL": {
                      "isOptional": false,
                      "description": "Public URL for OAuth and search",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "USER_AGENT": {
                      "isOptional": false,
                      "description": "Identifier for outbound fetches",
                      "defaultValue": "open-webui-railway/1.0"
                    },
                    "WEBUI_AUTH": {
                      "isOptional": false,
                      "description": "Require login for access",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ENABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Open signup until first admin exists",
                      "defaultValue": "true"
                    },
                    "OLLAMA_BASE_URL": {
                      "isOptional": false,
                      "description": "Private Ollama endpoint",
                      "defaultValue": "http://${{Ollama.RAILWAY_PRIVATE_DOMAIN}}:11434"
                    },
                    "OMP_NUM_THREADS": {
                      "isOptional": false,
                      "description": "Caps PyTorch threads to vCPU",
                      "defaultValue": "8"
                    },
                    "UVICORN_WORKERS": {
                      "isOptional": false,
                      "description": "Single worker avoids duplicate automations",
                      "defaultValue": "1"
                    },
                    "WEBUI_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Signs JWTs, cookies, sessions",
                      "defaultValue": "{{WEBUI_SECRET_KEY}}"
                    },
                    "CORS_ALLOW_ORIGIN": {
                      "isOptional": false,
                      "description": "Restrict browser origins",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DEFAULT_USER_ROLE": {
                      "isOptional": false,
                      "description": "New signups await admin review",
                      "defaultValue": "pending"
                    },
                    "ENABLE_OLLAMA_API": {
                      "isOptional": false,
                      "description": "Enable the Ollama model provider",
                      "defaultValue": "true"
                    },
                    "ENABLE_OPENAI_API": {
                      "isOptional": false,
                      "description": "Keep the stack fully self-contained",
                      "defaultValue": "false"
                    },
                    "WEBSOCKET_MANAGER": {
                      "isOptional": false,
                      "description": "Use Redis for websockets",
                      "defaultValue": "redis"
                    },
                    "WHISPER_MODEL_DIR": {
                      "isOptional": false,
                      "description": "Baked-in Whisper model cache",
                      "defaultValue": "/app/backend/data/cache/whisper/models"
                    },
                    "DATABASE_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Postgres connection pool size",
                      "defaultValue": "10"
                    },
                    "TIKTOKEN_CACHE_DIR": {
                      "isOptional": false,
                      "description": "Baked-in tiktoken encoding cache",
                      "defaultValue": "/app/backend/data/cache/tiktoken"
                    },
                    "WEBSOCKET_REDIS_URL": {
                      "isOptional": false,
                      "description": "Websocket coordination backend",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_POOL_TIMEOUT": {
                      "isOptional": false,
                      "description": "Seconds to wait for connection",
                      "defaultValue": "30"
                    },
                    "AIOHTTP_CLIENT_TIMEOUT": {
                      "isOptional": false,
                      "description": "Upstream Ollama request timeout",
                      "defaultValue": "300"
                    },
                    "ENABLE_WEBSOCKET_SUPPORT": {
                      "isOptional": false,
                      "description": "Enable realtime streaming and channels",
                      "defaultValue": "true"
                    },
                    "WHISPER_MODEL_AUTO_UPDATE": {
                      "isOptional": false,
                      "description": "Use baked-in Whisper model",
                      "defaultValue": "false"
                    },
                    "DATABASE_POOL_MAX_OVERFLOW": {
                      "isOptional": false,
                      "description": "Extra pool connections allowed",
                      "defaultValue": "5"
                    },
                    "SENTENCE_TRANSFORMERS_HOME": {
                      "isOptional": false,
                      "description": "Baked-in embedding model cache",
                      "defaultValue": "/app/backend/data/cache/embedding/models"
                    },
                    "ENABLE_VERSION_UPDATE_CHECK": {
                      "isOptional": false,
                      "description": "Skip outbound version check calls",
                      "defaultValue": "false"
                    },
                    "RAG_EMBEDDING_MODEL_AUTO_UPDATE": {
                      "isOptional": false,
                      "description": "Use baked-in embedding model",
                      "defaultValue": "false"
                    },
                    "RAG_RERANKING_MODEL_AUTO_UPDATE": {
                      "isOptional": false,
                      "description": "Use baked-in reranking model",
                      "defaultValue": "false"
                    },
                    "OAUTH_SESSION_TOKEN_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts OAuth session tokens",
                      "defaultValue": "{{OAUTH_SESSION_TOKEN_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "3b37b9cc-960b-4e01-b9d4-a93fe2391b70": {
                      "mountPath": "/data"
                    }
                  }
                },
                "7015b064-bfd9-404a-8ddf-8624b9959ecb": {
                  "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:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory, a subdirectory of the volume mount",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Standard PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser name",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "libpq alias of the default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity window of the generated self-signed TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for in-flight connections on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "7015b064-bfd9-404a-8ddf-8624b9959ecb": {
                      "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."
                  }
                },
                "8f429621-bedd-4453-9eab-64693dcad451": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/ollama-dark.svg",
                  "name": "Ollama",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ollama/ollama:0.32.5"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "11434"
                    },
                    "OLLAMA_HOST": {
                      "isOptional": false,
                      "description": "IPv6 bind, required for private DNS",
                      "defaultValue": "[::]:11434"
                    },
                    "OLLAMA_MODELS": {
                      "isOptional": false,
                      "description": "Model storage path on volume",
                      "defaultValue": "/root/.ollama/models"
                    },
                    "OLLAMA_NO_CLOUD": {
                      "isOptional": false,
                      "description": "Disable remote cloud model inference",
                      "defaultValue": "1"
                    },
                    "OLLAMA_KEEP_ALIVE": {
                      "isOptional": false,
                      "description": "Loaded model idle retention",
                      "defaultValue": "10m"
                    },
                    "OLLAMA_NUM_PARALLEL": {
                      "isOptional": false,
                      "description": "Concurrent request slots per model",
                      "defaultValue": "1"
                    },
                    "OLLAMA_CONTEXT_LENGTH": {
                      "isOptional": false,
                      "description": "Pinned context window size",
                      "defaultValue": "4096"
                    },
                    "OLLAMA_MAX_LOADED_MODELS": {
                      "isOptional": false,
                      "description": "Max simultaneously resident models",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "8f429621-bedd-4453-9eab-64693dcad451": {
                      "mountPath": "/root/.ollama"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenWebUI",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T22:14:37.124Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T22:51:25.902Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a784872d68c94c53a72c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 194,
    "typical_build_seconds": 0,
    "typical_start_seconds": 72,
    "slowest_service": "OpenWebUI"
  }
}
