Deploy Open WebUI

OpenWebUI Pro Stack: Open Web UI, LiteLLM, persistent Postgres and Redis.

Deploy Open WebUI

Just deployed

/data

Just deployed

/app/backend/data

Just deployed

/var/lib/postgresql/data

Deploy and Host Open WebUI Pro Stack on Railway

Open WebUI Pro Stack combines a self-hosted AI chat interface with LiteLLM, PostgreSQL and Redis in one Railway template. Get a shared AI workspace with centrally managed provider connections, persistent chat history and uploaded files.

Open WebUI, also searched as OpenWebUI or Open Web UI, is the chat application. Pro Stack describes the included infrastructure, not a paid edition of Open WebUI. Bring your own provider credentials; hosting and model usage are billed separately.

About Hosting Open WebUI Pro Stack

The template connects the applications and databases through Railway's private network, with generated authentication secrets and persistent volumes already defined.

Included serviceWhat it adds to your workspace
Open WebUIBrowser chat, user accounts, chat history, file uploads and the application's knowledge features. A volume is mounted at /app/backend/data.
LiteLLMA separate model gateway and admin interface. Add supported provider models in one place and expose their aliases to Open WebUI through an OpenAI-compatible API. Model configuration is stored in PostgreSQL.
PostgreSQLPersistent relational storage for application records and LiteLLM configuration, using Railway's PostgreSQL service image and standard connection variables. Its data volume is mounted at /var/lib/postgresql/data.
RedisA connected Redis service, including Open WebUI's Redis WebSocket manager, with a persistent volume at /data.

The chat path is browser → Open WebUI → LiteLLM → your model provider. Databases use internal Railway addresses. Public applications use login authentication.

Why Deploy Open WebUI Pro Stack on Railway?

Why choose this template instead of a basic Open WebUI deployment?

The added value is the preconnected four-service architecture: a dedicated gateway for provider configuration, PostgreSQL for records, Redis for shared WebSocket state and an Open WebUI data volume for files. You can manage models through LiteLLM's UI without editing a model configuration file for every addition.

Your priorityWhen this template fits
Several model providers in one workspaceManage compatible OpenAI, Anthropic, Gemini and other supported provider connections through LiteLLM, then select configured models in Open WebUI.
A team chat workspaceKeep user accounts and conversations in PostgreSQL, and manage access in Open WebUI.
Persistent uploaded documentsKeep file data on the Open WebUI volume as well as application records in the database.
Visible, editable infrastructureInspect each service, its variables, logs and storage in your Railway project.
The smallest possible personal installationA single-service Open WebUI template may be simpler and cost less. This stack adds separate gateway and database services.
Bundled GPU inferenceThis template does not include a GPU server, downloaded language model or inference credits. Connect a supported external or separately hosted model endpoint.

Choose this stack for Open WebUI with LiteLLM, PostgreSQL, Redis and persistent file storage in one deployable project.

Common Use Cases

  • A self-hosted ChatGPT-style workspace with your own accounts and chat history.
  • A shared team interface for comparing configured models from different providers.
  • A central LiteLLM gateway used by Open WebUI and other authorized API clients.
  • Document Q&A and knowledge workflows using Open WebUI's retrieval features, after configuring suitable embedding and chat models.
  • A development workspace for testing provider connections before rolling out an internal AI tool.

How do I deploy Open WebUI with LiteLLM on Railway?

  1. Deploy this template into your Railway workspace. It creates Open WebUI, LiteLLM, PostgreSQL and Redis. Wait for the application services and databases to finish starting.
  2. Create your Open WebUI administrator account promptly. Open the open-webui service's public domain. On a fresh installation, the first account becomes the administrator.
  3. Add a model in LiteLLM. Open the litellm service's public domain followed by /ui. Sign in using UI_USERNAME (default admin) and the generated UI_PASSWORD in that service's Railway variables. Add a supported provider model, its credentials and a model alias in the model management screen.
  4. Start a real conversation. Return to Open WebUI, refresh the model list, choose that alias and send a message. A running service alone does not confirm that your external provider credentials work.
  5. Set your access policy. Create or invite the users you need, then disable public signups in Open WebUI's admin settings. Keep authentication enabled. Some settings persist in the application database, so use the admin interface when a later environment-variable change appears to have no effect.

The included services are connected for you. Configure your provider and any optional features after deployment.

Frequently Asked Questions

Do I need an OpenAI API key? Can I use Claude or Gemini?

You need credentials for the provider you choose, not necessarily OpenAI. Configure a provider and model supported by your deployed LiteLLM version. Model capabilities, available regions and account permissions depend on that provider. A ChatGPT or Claude consumer subscription should not be assumed to include API access or credits.

Where do I enter my model provider API key?

Add the provider credentials in LiteLLM's model management UI. Open WebUI already connects to the LiteLLM gateway. Its OPENAI_API_KEY variable references the gateway's LITELLM_MASTER_KEY: that is an internal proxy credential, not your OpenAI, Anthropic or Gemini provider key. Do not replace it just to add a provider.

Will my chats, models and uploaded files survive a restart or redeploy?

The template includes persistent storage: PostgreSQL holds application records and saved LiteLLM model configuration; the Open WebUI volume holds uploaded files and other local application data. STORE_MODEL_IN_DB=True is set for LiteLLM. Keep the existing database, volumes and generated secrets when redeploying. Deleting a volume or the project deletes storage; persistence is not a backup. Configure and verify backups for the database and Open WebUI volume before relying on them for important work.

Is this a private or fully local AI workspace?

You host the chat application and its storage in your Railway project. When you use a cloud model, prompts and any document excerpts sent with them go to that provider. Self-hosting the interface does not make cloud inference local. Choose providers, retention policies and access controls appropriate to your data. Ollama is disabled by default and no local inference server is bundled.

Does document RAG, web search or image generation work immediately?

Open WebUI provides these features, but they have different prerequisites. Document Q&A needs working document ingestion, an embedding model and a chat model. Web search needs a configured search backend. Image generation needs a compatible image backend or provider. The template enables relevant feature flags; it does not supply every external backend, API key or model. Verify each feature you plan to use.

Can I connect Ollama or another self-hosted model?

Yes, with a reachable endpoint and compatible configuration. Add a separately hosted inference service through LiteLLM, or configure Open WebUI's direct Ollama connection using ENABLE_OLLAMA_API and OLLAMA_BASE_URL. Size that inference service separately; this template does not provision GPU capacity.

How much does this Open WebUI Railway template cost?

Budget for Railway resources and storage across four services, plus model provider usage. Costs depend on your workload, documents and retention. No inference credits or fixed hosting price are included. Review usage with your own workload.

What should I check if the model list is empty or chat fails?

Confirm that LiteLLM has a saved model and that its provider credentials and model identifier are valid. Check the LiteLLM logs, then verify Open WebUI's gateway URL and proxy key references. Test both a message in the browser and a streamed response. LiteLLM's /health/readiness checks service readiness; it does not prove that a particular provider can complete a request.

Dependencies for Open WebUI Pro Stack Hosting

  • Open WebUI container: ghcr.io/open-webui/open-webui:main.
  • LiteLLM container: ghcr.io/berriai/litellm:main-latest.
  • Railway PostgreSQL service image and Redis, with their standard connection variables.
  • A Railway account and credentials for your chosen model provider or endpoint.

The application image tags track upstream builds. Back up your data and review upstream release notes before upgrading. Adding replicas or configuring high availability requires additional storage and application planning.

Key settings already connected

  • DATABASE_URL: internal PostgreSQL connection for both applications.
  • OPENAI_API_BASE_URL: Open WebUI's private LiteLLM URL, ending in /v1.
  • OPENAI_API_KEY: references LiteLLM's generated master key.
  • WEBUI_SECRET_KEY: stable Open WebUI session/encryption secret; preserve it across routine redeploys.
  • UI_USERNAME / UI_PASSWORD: LiteLLM admin login.
  • REDIS_URL and WEBSOCKET_MANAGER=redis: Open WebUI's Redis connection and WebSocket state configuration.

Deployment Dependencies


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
NEW
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7