{
  "manifest_version": "1.0.0",
  "template": {
    "id": "76b44952-5eb0-4915-84b4-427d172f08d8",
    "slug": "open-source-llm-models",
    "name": "Open Source LLM Models",
    "description": "[Jun '26] Self host open LLMs + connect your ChatGPT Account",
    "url": "https://railway.com/deploy/open-source-llm-models",
    "upstream": {
      "image": "ghcr.io/open-webui/open-webui"
    }
  },
  "services": [
    {
      "name": "ollama",
      "source": {
        "image": "ollama/ollama"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.ollama",
      "http": false
    },
    {
      "name": "Open WebUI",
      "source": {
        "image": "ghcr.io/open-webui/open-webui"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/backend/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "OLLAMA_HOST",
      "service": "ollama",
      "description": "Allows Ollama to listen on all interfaces",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "OLLAMA_ORIGINS",
      "service": "ollama",
      "description": "Comma-separated list of allowed origins for CORS. Needed if you’re connecting a web app (like OpenWebUI) from a different host/domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OLLAMA_DEFAULT_MODELS",
      "service": "ollama",
      "description": "Comma separated list of models to download at boot start. Default is gemma3:270m",
      "secret": false,
      "strategy": "default",
      "default": "gemma3:270m"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "Open WebUI",
      "description": "Enter your OpenAI API Key to access all the OpenAI models inside Open WebUI\"",
      "secret": true,
      "strategy": "default",
      "default": "<Put your API key or leave it as is>"
    },
    {
      "key": "OLLAMA_BASE_URL",
      "service": "Open WebUI",
      "description": "Points OpenWebUI to the internal Ollama API endpoint for model access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WEBUI_SECRET_KEY",
      "service": "Open WebUI",
      "description": "Secret key used by OpenWebUI to secure sessions and authentication.",
      "secret": true,
      "strategy": "default",
      "default": "t0p-s3cr3t"
    },
    {
      "key": "CORS_ALLOW_ORIGIN",
      "service": "Open WebUI",
      "description": "Allows the web UI to connect from any origin.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "open-source-llm-models"
      }
    },
    "cli": "railway deploy --template open-source-llm-models",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "76b44952-5eb0-4915-84b4-427d172f08d8",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2c0b82e0-e1d7-45aa-a16f-fbb3dfb0480a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/ollama-dark.svg",
                  "name": "ollama",
                  "deploy": {
                    "startCommand": "bash -c \"ollama serve & sleep 5 && for model in $(echo $OLLAMA_DEFAULT_MODELS | tr ',' ' '); do ollama pull $model; done && wait\"",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ollama/ollama"
                  },
                  "variables": {
                    "OLLAMA_HOST": {
                      "isOptional": false,
                      "description": "Allows Ollama to listen on all interfaces",
                      "defaultValue": "::"
                    },
                    "OLLAMA_ORIGINS": {
                      "isOptional": false,
                      "description": "Comma-separated list of allowed origins for CORS. Needed if you’re connecting a web app (like OpenWebUI) from a different host/domain",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:*"
                    },
                    "OLLAMA_DEFAULT_MODELS": {
                      "isOptional": false,
                      "description": "Comma separated list of models to download at boot start. Default is gemma3:270m",
                      "defaultValue": "gemma3:270m"
                    }
                  },
                  "volumeMounts": {
                    "2c0b82e0-e1d7-45aa-a16f-fbb3dfb0480a": {
                      "mountPath": "/root/.ollama"
                    }
                  }
                },
                "74b26f18-30e1-4715-a046-f958cfa4abaf": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/open-webui-light.svg",
                  "name": "Open WebUI",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/open-webui/open-webui"
                  },
                  "variables": {
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "Enter your OpenAI API Key to access all the OpenAI models inside Open WebUI\"",
                      "defaultValue": "<Put your API key or leave it as is>"
                    },
                    "OLLAMA_BASE_URL": {
                      "isOptional": false,
                      "description": "Points OpenWebUI to the internal Ollama API endpoint for model access.",
                      "defaultValue": "http://${{ollama.RAILWAY_PRIVATE_DOMAIN}}:11434"
                    },
                    "WEBUI_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret key used by OpenWebUI to secure sessions and authentication.",
                      "defaultValue": "t0p-s3cr3t"
                    },
                    "CORS_ALLOW_ORIGIN": {
                      "isOptional": false,
                      "description": "Allows the web UI to connect from any origin.",
                      "defaultValue": "*"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "74b26f18-30e1-4715-a046-f958cfa4abaf": {
                      "mountPath": "/app/backend/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T19:41:21.473Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e7d3290068414338ae16",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 119,
    "typical_build_seconds": 0,
    "typical_start_seconds": 62,
    "slowest_service": "Open WebUI"
  }
}
