{
  "manifest_version": "1.0.0",
  "template": {
    "id": "eb4c3906-dbd3-4a6d-9cd9-7bc6aef7559a",
    "slug": "ollama-production",
    "name": "Ollama | Private LLMs on CPU with Open WebUI and a Secured API",
    "description": "Run open LLMs on CPU: slim Ollama, token-gated API, Open WebUI chat",
    "url": "https://railway.com/deploy/ollama-production",
    "upstream": {
      "image": "ghcr.io/open-webui/open-webui:v0.12.3"
    }
  },
  "services": [
    {
      "name": "Open WebUI",
      "source": {
        "image": "ghcr.io/open-webui/open-webui:v0.12.3"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/backend/data",
      "http": true
    },
    {
      "name": "Ollama",
      "source": {
        "repo": "https://github.com/two-workspaces/ollama"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.ollama",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Open WebUI",
      "description": "Port Railway routes to - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "WEBUI_URL",
      "service": "Open WebUI",
      "description": "Public URL of Open WebUI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "OLLAMA_BASE_URL",
      "service": "Open WebUI",
      "description": "Ollama over Railway's private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WEBUI_SECRET_KEY",
      "service": "Open WebUI",
      "description": "Signs login sessions",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WEBUI_ADMIN_EMAIL",
      "service": "Open WebUI",
      "description": "Admin login email, created on first boot (change it later in Settings)",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "RAG_EMBEDDING_MODEL",
      "service": "Open WebUI",
      "description": "Ollama embedding model (must be in OLLAMA_PULL_MODELS)",
      "secret": false,
      "strategy": "default",
      "default": "nomic-embed-text"
    },
    {
      "key": "RAG_EMBEDDING_ENGINE",
      "service": "Open WebUI",
      "description": "Document embeddings run in Ollama instead of a second model inside Open WebUI",
      "secret": false,
      "strategy": "default",
      "default": "ollama"
    },
    {
      "key": "WEBUI_ADMIN_PASSWORD",
      "service": "Open WebUI",
      "description": "Admin password, created on first boot",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "Open WebUI",
      "description": "First boot runs database migrations",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "PORT",
      "service": "Ollama",
      "description": "Port Railway routes to - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "OLLAMA_API_KEY",
      "service": "Ollama",
      "description": "Bearer token for the public Ollama API (Open WebUI uses the private network and doesn't need it)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OLLAMA_PULL_MODELS",
      "service": "Ollama",
      "description": "Models pulled at boot, comma-separated (ollama.com/library names)",
      "secret": false,
      "strategy": "default",
      "default": "llama3.2:3b,nomic-embed-text"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ollama-production"
      }
    },
    "cli": "railway deploy --template ollama-production",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "eb4c3906-dbd3-4a6d-9cd9-7bc6aef7559a",
            "serializedConfig": {
              "services": {
                "42438626-4578-4322-8834-d7d411c88b09": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/ollama/main/open-webui.png",
                  "name": "Open WebUI",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/open-webui/open-webui:v0.12.3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to - leave as is",
                      "defaultValue": "8080"
                    },
                    "WEBUI_URL": {
                      "isOptional": false,
                      "description": "Public URL of Open WebUI",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "OLLAMA_BASE_URL": {
                      "isOptional": false,
                      "description": "Ollama over Railway's private network",
                      "defaultValue": "http://${{Ollama.RAILWAY_PRIVATE_DOMAIN}}:11434"
                    },
                    "WEBUI_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Signs login sessions",
                      "defaultValue": "{{WEBUI_SECRET_KEY}}"
                    },
                    "WEBUI_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Admin login email, created on first boot (change it later in Settings)",
                      "defaultValue": "admin@example.com"
                    },
                    "RAG_EMBEDDING_MODEL": {
                      "isOptional": false,
                      "description": "Ollama embedding model (must be in OLLAMA_PULL_MODELS)",
                      "defaultValue": "nomic-embed-text"
                    },
                    "RAG_EMBEDDING_ENGINE": {
                      "isOptional": false,
                      "description": "Document embeddings run in Ollama instead of a second model inside Open WebUI",
                      "defaultValue": "ollama"
                    },
                    "WEBUI_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Admin password, created on first boot",
                      "defaultValue": "{{WEBUI_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot runs database migrations",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "46ece8a0-09eb-4860-be54-a15ecfee65e2": {
                      "mountPath": "/app/backend/data"
                    }
                  }
                },
                "9e59963f-eea8-4b95-ba6c-b7750c1cd4ed": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/ollama/main/icon.png",
                  "name": "Ollama",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/ollama",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to - leave as is",
                      "defaultValue": "8080"
                    },
                    "OLLAMA_API_KEY": {
                      "isOptional": false,
                      "description": "Bearer token for the public Ollama API (Open WebUI uses the private network and doesn't need it)",
                      "defaultValue": "{{OLLAMA_API_KEY}}"
                    },
                    "OLLAMA_NUM_THREADS": {
                      "isOptional": true,
                      "description": "CPU threads per model; empty = your plan's vCPU quota",
                      "defaultValue": ""
                    },
                    "OLLAMA_PULL_MODELS": {
                      "isOptional": true,
                      "description": "Models pulled at boot, comma-separated (ollama.com/library names)",
                      "defaultValue": "llama3.2:3b,nomic-embed-text"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "630d22d5-7d55-4ad3-86ad-23b7e60c5c81": {
                      "mountPath": "/root/.ollama"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Open WebUI",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-20T04:14:47.318Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-20T03:06:32.708Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f3c93529f70a4b5c80d3",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 226,
    "typical_build_seconds": 0,
    "typical_start_seconds": 73,
    "slowest_service": "Open WebUI"
  }
}
