---
title: "Deploy Open WebUI | (Just Updated) ChatGPT-Style UI for Any LLM, Chats Survive Redeploys"
description: "Self-hosted ChatGPT-style UI for any LLM. Chats persist on a volume."
category: "AI/ML"
url: https://railway.com/deploy/open-webui-or-just-updated-chatgpt-style
---

# Deploy Open WebUI | (Just Updated) ChatGPT-Style UI for Any LLM, Chats Survive Redeploys

Self-hosted ChatGPT-style UI for any LLM. Chats persist on a volume.

**[Deploy Open WebUI | (Just Updated) ChatGPT-Style UI for Any LLM, Chats Survive Redeploys on Railway](https://railway.com/template/open-webui-or-just-updated-chatgpt-style)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/open-webui-or-just-updated-chatgpt-style/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** AI/ML

## Template content

### open-webui

- **Image:** ghcr.io/open-webui/open-webui:v0.12.0@sha256:1565038903151ced924b5a3226f73f40f16963df4b910441f6391f10144afdaa
- **Start command:** `/bin/sh -c 'set -e; N=1; if [ -r /sys/fs/cgroup/cpu.max ]; then read Q P < /sys/fs/cgroup/cpu.max; [ "$Q" != max ] && N=$(( (Q + P - 1) / P )); else N=$(nproc); fi; export OMP_NUM_THREADS=$N MKL_NUM_THREADS=$N ENABLE_OLLAMA_API=false DEFAULT_USER_ROLE=pending SCARF_NO_ANALYTICS=true DO_NOT_TRACK=true ANONYMIZED_TELEMETRY=false; echo "[railway] uid=$(id -u) threads=$N data=$(stat -c %u:%g /app/backend/data)"; test -w /app/backend/data && echo "[railway] data writable"; cd /app/backend; exec bash start.sh'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Open WebUI on Railway

Open WebUI is a self-hosted, ChatGPT-style chat interface for large language models. It connects to OpenAI-compatible APIs (OpenAI, OpenRouter, Groq, vLLM, LiteLLM, Ollama and others) and adds multi-user accounts, chat history, document upload with retrieval, prompt libraries and model management. This template runs the official Open WebUI image from a digest-pinned tag as a single service with a Railway volume holding all data.

## About Hosting Open WebUI

- **The first account to sign up becomes the admin.** Open the public URL and register; that user is the administrator. Every later signup lands as `pending` (`DEFAULT_USER_ROLE=pending`) until the admin approves it, so strangers who find the URL cannot use your API keys.
- **Sessions and secrets are set for you.** `WEBUI_SECRET_KEY` is generated per deploy and `WEBUI_URL` is set to the public domain, so logins survive restarts and OAuth redirects point at the right address.
- **Chats survive redeploys.** The volume is mounted at `/app/backend/data`, where Open WebUI keeps its SQLite database, uploaded files and vector store. The start command prints the user id and whether the directory is writable in the deploy log.
- **Thread counts follow your plan.** The start command reads the container CPU limit and sets `OMP_NUM_THREADS` and `MKL_NUM_THREADS` from it, so the embedding model does not oversubscribe the host's cores.
- **No bundled Ollama.** The built-in Ollama API is switched off. Add a model provider under Admin Panel, Settings, Connections (an OpenAI-compatible URL and key), or point it at an Ollama service in the same project.
- **Telemetry is off.** Scarf and anonymized telemetry are disabled.

## Common Use Cases

- A private ChatGPT-style front end for your team, backed by OpenAI, OpenRouter or Groq keys
- A chat UI for a self-hosted model served by Ollama, vLLM or LiteLLM in the same Railway project
- Document question answering: upload PDFs and notes and chat with them
- A shared prompt and model library with per-user accounts and an admin approval step

## Dependencies for Open WebUI Hosting

- One Railway volume for the data directory (created by the template)
- A model provider: an OpenAI-compatible API key, or an Ollama or vLLM endpoint

### Deployment Dependencies

- Open WebUI documentation: https://docs.openwebui.com/
- Source and image: https://github.com/open-webui/open-webui

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `WEBUI_SECRET_KEY` | Signs login sessions, generated per deploy. |
| `WEBUI_URL` | Public URL of the deployment, used for redirects and OAuth. |

The first boot downloads the default embedding model, so the service can take a few minutes to become healthy.

## 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 are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/open-webui-or-just-updated-chatgpt-style
