Railway

Deploy Open WebUI

Your self-hosted interface for local and cloud AI models.

Deploy Open WebUI

Just deployed

/app/backend/data

Deploy and Host Open WebUI on Railway

Open WebUI is a self-hosted AI interface for chatting with local and cloud AI models from one modern web application. It provides a familiar chat experience while giving you control over users, conversations, model connections, knowledge, prompts, tools, and integrations.

About Hosting Open WebUI

This template deploys Open WebUI as a standalone AI workspace with persistent storage.

Open WebUI can connect to Ollama, OpenAI-compatible APIs, LiteLLM, OpenRouter, remote model gateways, and other supported AI backends. Providers are configured after deployment, so the template stays flexible and is not tied to one model vendor.

Persistent storage keeps user accounts, conversations, settings, knowledge data, and application state available across restarts and redeployments.

Included Architecture

ComponentPurpose
Open WebUIAI chat interface and model workspace
Persistent VolumeStores users, conversations, settings, and application data
Railway Public NetworkingHTTPS access to the Open WebUI interface
AI ProviderConnected by the user after deployment
                    ┌─────────────────┐
                    │      User       │
                    └────────┬────────┘
                             │
                             ▼
                  Railway HTTPS Proxy
                             │
                             ▼
                    ┌─────────────────┐
                    │   Open WebUI    │
                    │                 │
                    │ Chat / Models   │
                    │ Knowledge       │
                    │ Tools / Users   │
                    └────────┬────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
           Ollama         LiteLLM        OpenAI
                                            │
                                  OpenAI-compatible APIs

Common Use Cases

  • Run your own private AI chat interface
  • Connect local and cloud AI models from one dashboard
  • Manage multiple AI providers
  • Create internal AI assistants
  • Build team AI workspaces
  • Chat with self-hosted Ollama models
  • Connect LiteLLM or other OpenAI-compatible gateways
  • Work with documents and knowledge bases
  • Manage prompts and tools
  • Keep conversations and application data on infrastructure you control
  • Provide a familiar AI interface for internal users

Open WebUI vs Hosted AI Interfaces

FeatureOpen WebUIHosted AI Platforms
Self-hosted✅ Yes❌ Usually managed
Multiple providers✅ Yes⚠️ Platform dependent
Local models✅ Yes❌ Usually unavailable
OpenAI-compatible APIs✅ Yes⚠️ Platform dependent
User management✅ Yes✅ Usually
Knowledge workflows✅ Yes✅ Varies
Infrastructure control✅ Full❌ Provider controlled

Open WebUI is particularly useful when you want one interface for different AI providers without locking the application experience to a single model vendor.

Supported Connections

Open WebUI can connect to a broad range of AI backends.

Typical options include:

  • Ollama
  • OpenAI
  • OpenAI-compatible APIs
  • LiteLLM
  • OpenRouter
  • Self-hosted model gateways
  • Other supported AI providers

Provider configuration can be managed from the Open WebUI administration interface after deployment.

Persistent Storage

Open WebUI application data is stored persistently under:

/app/backend/data

Persistent data can include:

  • User accounts
  • Conversations
  • Application settings
  • Provider configurations
  • Model settings
  • Knowledge data
  • Uploaded files
  • Prompts
  • Local application state

This prevents important workspace data from disappearing when the service restarts or redeploys.

Getting Started

After deployment:

  1. Open the public Railway domain assigned to Open WebUI.
  2. Create your first account.
  3. The first registered account becomes the administrator.
  4. Open the Admin interface.
  5. Go to Connections.
  6. Add the AI provider or model gateway you want to use.
  7. Save the connection.
  8. Select an available model.
  9. Start a new conversation.

No external AI provider is required during the initial deployment.

Connecting Ollama

You can connect Open WebUI to an existing Ollama instance.

A typical Ollama endpoint looks like:

http://:11434

If Ollama is running inside the same Railway project, use Railway private networking instead of exposing the Ollama API publicly.

This keeps model traffic internal to the project.

Connecting OpenAI-Compatible APIs

Open WebUI can also connect to gateways exposing OpenAI-compatible endpoints.

Examples include:

  • LiteLLM
  • OmniRoute
  • OpenRouter
  • Custom AI gateways
  • Other OpenAI-compatible inference services

This makes Open WebUI useful as the frontend while a separate gateway handles model routing, provider credentials, budgets, or fallback logic.

Health and Availability

Open WebUI runs as a standard web application on port:

8080

No custom start command is required for this template.

Railway handles public HTTPS routing to the application while the persistent volume retains the workspace data.

Security Considerations

Open WebUI may contain conversations, uploaded documents, provider configuration, and access to external AI services.

For production environments:

  • Keep administrator credentials private.
  • Use strong user passwords.
  • Avoid exposing model backends directly when private networking is available.
  • Protect external provider API keys.
  • Keep the WebUI secret persistent across redeployments.
  • Restrict user registration when running a private workspace.
  • Review provider access and tool permissions before enabling them for users.

Dependencies for Open WebUI Hosting

  • Open WebUI — self-hosted AI interface and workspace
  • Persistent Volume — stores users, conversations, settings, and application state
  • Railway Public Networking — HTTPS access to the interface
  • AI Provider or Model Backend — configured by the user after deployment

No PostgreSQL, Redis, Ollama, or external model provider is bundled with this standalone template.

Deployment Dependencies

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 a persistent, self-hosted AI workspace with a modern interface and the flexibility to connect local models, cloud providers, and OpenAI-compatible gateways from one place.


Template Content

More templates in this category

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

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

Jan Kubica
3
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
63