Open WebUI + Ollama Private AI
Open WebUI is a self-hosted chat interface for language models. This template deploys Open WebUI v0.12.0 with Ollama for local models, SearXNG for private web search, Postgres with pgvector for document chat, and Redis.
What you get
- Open WebUI with a data volume for uploads and caches
- Ollama that pulls llama3.2:3b and nomic-embed-text on first boot, with its own volume
- SearXNG for web search without third-party search keys
- Postgres with pgvector for users, chats and RAG vectors
- Admin account created from the email you enter at deploy
Good for
- A private chat assistant for a team using open models
- Chat with internal documents stored in your own database
- Web-grounded answers through a private metasearch engine
- Trying small open models alongside hosted OpenAI-compatible APIs
Services in this template
- Open WebUI · image
ghcr.io/open-webui/open-webui:v0.12.0 - Postgres · image
pgvector/pgvector:0.8.7-pg18-trixie - SearXNG · from
baranberkay96/open-webui-ollama-railway - Ollama · from
baranberkay96/open-webui-ollama-railway - Redis · image
redis:8.2
Questions people ask
How do I log in?
Enter your email in WEBUI_ADMIN_EMAIL at deploy. Copy WEBUI_ADMIN_PASSWORD from the Open WebUI service variables and sign in at the public URL. Sign-up is then off, and new sign-ups stay pending until approved.
Why is the first start slow?
Ollama downloads about 2.3 GB of models on first boot. Wait for its logs to show both models pulled before starting a chat.
Can it run large models?
Railway has no GPUs, so models run on CPU and should stay small. For larger models, add an OpenAI-compatible API key.
How do I upgrade?
Images are pinned. Back up Postgres and the data volume, change the Open WebUI tag and redeploy. Database migrations run on start.
Are there licence terms to know?
Open WebUI uses its own BSD-3-based licence with a branding clause. The name and logo must stay visible unless you have 50 or fewer end users in a 30-day period, have written permission, or hold an enterprise licence.
Full template README
Deploy and Host Open WebUI with Railway
Open WebUI is a self-hosted chat interface for large language models, similar to ChatGPT, that works with local models through Ollama and with any OpenAI-compatible API. This community template runs Open WebUI with Ollama, private SearXNG web search, Postgres with pgvector for RAG, and Redis.
About Hosting Open WebUI
Open WebUI on its own is a single container, but a private, multi-user deployment needs several supporting pieces: a model server for open models, a database that survives redeploys, a vector store for document chat, a search backend for web-grounded answers, and Redis for real-time connections across workers. This template provides all of them on Railway's private network. Ollama pulls a small chat model and an embedding model on first boot, SearXNG answers web searches without third-party search keys, and pgvector keeps embeddings in Postgres. The admin account is created from variables at startup and public sign-up is closed.
Common Use Cases
- A private ChatGPT-style assistant for a team, running open models without sending prompts to third parties
- Chat with internal documents and knowledge bases (RAG) stored in your own database
- Web-grounded answers through a private metasearch engine
- One interface for local models plus hosted APIs (OpenAI-compatible keys) with per-user access control
- Evaluating and comparing open models before choosing a production LLM
Dependencies for Open WebUI Hosting
- Open WebUI (
ghcr.io/open-webui/open-webui) - Ollama (local models and embeddings)
- SearXNG (web search)
- PostgreSQL with pgvector (application data and RAG vectors)
- Redis (websocket manager and shared state)
Deployment Dependencies
- Open WebUI repository: https://github.com/open-webui/open-webui
- Open WebUI documentation: https://docs.openwebui.com/
- Environment variable reference: https://docs.openwebui.com/reference/env-configuration/
- Ollama: https://github.com/ollama/ollama
- SearXNG Docker installation: https://docs.searxng.org/admin/installation-docker.html
- pgvector: https://github.com/pgvector/pgvector
Implementation Details
| Service | Image | Role | Public |
|---|---|---|---|
| Open WebUI | ghcr.io/open-webui/open-webui:v0.12.0 |
Chat UI and API; volume /app/backend/data for uploads and caches |
yes (port 8080) |
| Ollama | ollama/ollama:0.40.3 (repo build) |
Runs llama3.2:3b and nomic-embed-text:v1.5, pulled on first boot; volume /root/.ollama |
no |
| SearXNG | searxng/searxng:2026.10.9-f4822b3fc (repo build) |
Private metasearch with JSON API for web search | no |
| Postgres | pgvector/pgvector:0.8.7-pg18-trixie |
Users, chats, settings and RAG vectors | no |
| Redis | Railway Redis 8.2 | Websocket manager, task control | no |
First login
- When deploying, enter your email in
WEBUI_ADMIN_EMAIL. - After the first deploy, copy
WEBUI_ADMIN_PASSWORDfrom the Open WebUI service variables and sign in at the public URL. Change the password under Settings → Account. - Wait for the Ollama logs to show both models pulled (about 2.3 GB on first boot), then start a chat with
llama3.2:3b. - Add users in Admin Panel → Users, or re-enable sign-up there; new sign-ups stay pending until approved.
Note on settings: Open WebUI saves most settings in the database after the first start. Later changes are made in Admin Settings; editing the corresponding variables has no effect unless ENABLE_PERSISTENT_CONFIG=false.
Models: pull more models from Admin Settings → Models or by extending OLLAMA_PULL_MODELS. Railway has no GPUs, so local models run on CPU; keep them small, or add an OpenAI-compatible key (OPENAI_API_KEY or Admin Settings → Connections) for larger hosted models.
Scaling workers: raise UVICORN_WORKERS on Open WebUI to 2–4 after the first successful start (Redis is already configured for multiple workers). Give Ollama more RAM for larger models.
Pinning and upgrading: every image is pinned. To upgrade Open WebUI, back up Postgres and the data volume, change the tag and redeploy; database migrations run on start.
License note: Open WebUI uses the Open WebUI License (BSD-3-based with a branding clause): its name and logo must stay visible unless you have 50 or fewer end users in a 30-day period, written permission, or an enterprise license.
Why Deploy Open WebUI on Railway?
Railway gives Open WebUI, its model server, search engine and databases a private network, managed HTTPS and persistent volumes in one project, so your chats, documents and models stay under your control without managing servers. Resources scale from the dashboard and every deploy can be rolled back. This is a community template and is not affiliated with Open WebUI Inc., Ollama or SearXNG.
Guides for this template
View Open WebUI + Ollama Private AI on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| 9Router Self-hosted AI router for Claude, Gemini, Cursor & OpenAI tools. | AI/ML | 9,734 |
| flowise-railway Flowise - low-code LLM apps builder | AI/ML | 8,512 |
| LibreChat Open-source ChatGPT clone: multi-model, agents, search, multi-user auth | AI/ML | 6,762 |
| Hermes Agent by Nous Research Template for Hermes Agent by Nous Research | AI/ML | 6,413 |
| OpenClaw [Homebrew support] The AI that actually does things | AI/ML | 5,167 |
| Hermes Agent Self Host Hermes Agent. Autonomous AI agent w/ self-improving, tools & more | AI/ML | 4,092 |