Deploy Open WebUI (All-in-One Bundle)
Open WebUI + PostgreSQL (pgvector) + Redis + SearXNG
Open WebUI
Just deployed
/app/backend/data
Postgres
Just deployed
/var/lib/postgresql/data
SearXNG
Just deployed
Redis
Just deployed
Deploy and Host Open WebUI on Railway
Open WebUI is a self-hosted, extensible web interface for chatting with large language models. It connects to OpenAI, Anthropic, Ollama, and other OpenAI-compatible providers, and adds RAG document chat, multi-model conversations, web search, and a plugin ecosystem inside one polished, ChatGPT-style UI.
About Hosting Open WebUI
Open WebUI runs as a Python/FastAPI backend serving a compiled Svelte frontend, listening on port 8080. Rather than the single-container SQLite default, this template follows Open WebUI's own scaling guide and deploys four services pre-wired over Railway's private network: Open WebUI itself, a Postgres service (the pgvector/pgvector image, which backs both the application database and the vector store for document embeddings), SearXNG (a privacy-respecting metasearch engine that powers in-chat web search), and Redis (a shared state store). User accounts, chat history, and prompts live in PostgreSQL; uploaded-document embeddings live in pgvector inside that same database (the vector extension is created automatically on first boot); Redis coordinates sessions, sign-out token revocation, and realtime websocket events so the app can scale to multiple replicas; and the Open WebUI service keeps its file uploads on a persistent volume at /app/backend/data. The template wraps all of this with automatic Railway PORT binding, a /health healthcheck, and auto-generated secrets. You add an LLM provider key (or point at Ollama) and you have a private, production-shaped AI chat workspace.
Common Use Cases
- Private ChatGPT alternative — a self-hosted chat UI where your conversations and data stay on your own infrastructure
- Team AI workspace — shared multi-user access with sign-up controls and role-based permissions
- RAG document chat — upload PDFs and documents and ask questions grounded in their content
- Ollama frontend — a clean web UI for locally hosted open-source models over Railway's private network
- Multi-provider playground — compare GPT, Claude, and open models side by side in one interface
Dependencies for Open WebUI Hosting
- PostgreSQL (pgvector) — bundled as the
pgvector/pgvectorservice; stores accounts, chats, and document embeddings - SearXNG — bundled (reuses the
protemplate/searxngtemplate) to power in-chat web search - Redis — bundled (
redis:7-alpine) for token revocation, sessions, and multi-replica websocket coordination - Persistent volume — Open WebUI file uploads are stored at
/app/backend/data - LLM provider — at least one of an OpenAI key, an Anthropic key, or a reachable Ollama instance to actually run inference
- Modern browser — the interface is a single-page Svelte app
Deployment Dependencies
- Open WebUI GitHub repository
- Open WebUI documentation
- Open WebUI container image (GHCR)
- Environment variable reference
Why Deploy Open WebUI on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Open WebUI on Railway, you get the full stack pre-wired over private networking — the app, a PostgreSQL/pgvector database, a SearXNG search backend, and a Redis state store — with a persistent volume for uploads, automatic PORT binding, a public HTTPS domain, auto-generated secrets, and built-in logs and metrics. Connect it to a self-hosted Ollama service over Railway's private network, or bring your own provider keys, and host your AI chat workspace alongside your databases, agents, and the rest of your stack.
Template Content
Open WebUI
ghcr.io/open-webui/open-webui:mainPostgres
pgvector/pgvector:pg16SearXNG
protemplate/searxngRedis
redis:7-alpine