---
title: "Deploy OpenWebUI [Updated Sep'26]"
description: "Self-host Open WebUI for teams — durable Postgres, scalable sessions"
category: "AI/ML"
url: https://railway.com/deploy/openwebui-team-production
---

# Deploy OpenWebUI [Updated Sep'26]

Self-host Open WebUI for teams — durable Postgres, scalable sessions

**[Deploy OpenWebUI [Updated Sep'26] on Railway](https://railway.com/template/openwebui-team-production)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/openwebui-team-production/manifest.json

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

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Open WebUI https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/open-webui-light.svg

- **Image:** ghcr.io/open-webui/open-webui
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Open WebUI on Railway

Open WebUI is the most popular self-hosted AI chat interface — a private, ChatGPT-style UI for OpenAI, Anthropic, and other models, with multi-user accounts, roles, and built-in RAG. This template deploys it production-grade: PostgreSQL for durable data that survives every redeploy, and Redis for shared session and WebSocket state so it scales cleanly across multiple instances. It's the setup for a team that depends on Open WebUI daily — where the default single-container SQLite build isn't enough — with authentication and persistence wired from the first deploy.

---

## What This Template Deploys

| Service | Purpose |
| --- | --- |
| **Open WebUI** | The AI chat interface — multi-model UI, users, roles, RAG (port 8080) |
| **PostgreSQL** | Durable storage for chats, users, settings, and documents |
| **Redis** | Shared session, cache, and WebSocket state for multi-instance scaling |

All three connect over Railway's private network. Open WebUI serves the chat UI, PostgreSQL replaces the default SQLite for reliable persistence, and Redis holds shared state so you can run more than one instance — a production stack for teams.

---

## About Hosting

This is Open WebUI built for teams and production, and the Postgres and Redis wiring is exactly what the default deploy lacks — both handled here.

**PostgreSQL for durable data — not fragile SQLite.** By default Open WebUI stores everything in a single SQLite file, which is fine for one user but a liability for a team: it's a single point of failure, harder to back up, and strained by concurrent writes. This template wires `DATABASE_URL` to a managed PostgreSQL, so all chats, users, settings, and documents live in a real database that survives redeploys, backs up cleanly, and handles many users writing at once. This is the difference between a personal instance and one a team relies on.

**Redis scales sessions and WebSockets across instances.** A single Open WebUI container keeps session and live-chat (WebSocket) state in memory, so you can't run more than one — a second instance wouldn't share logins or streams. This template wires Redis for shared session, cache, and WebSocket state, so Open WebUI can run multiple replicas behind Railway's load balancing without users being logged out or losing streaming responses. It's what makes the deployment horizontally scalable.

**Authenticated and private from boot.** Set `WEBUI_SECRET_KEY` to a stable value, create the first admin account, and set `ENABLE_SIGNUP=false` so the workspace stays behind a login. Every conversation and document stays on your infrastructure, with role-based access for team members — no per-seat fees and no data sent to a vendor.

**Bring your own models, with built-in RAG.** Add `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or point at any OpenAI-compatible endpoint, and those models appear in the interface, selectable per chat, with inference running on your provider. Open WebUI also includes document upload with retrieval-augmented generation, a tool runner, and model management, so your team queries internal documents from the same private UI — all backed by the durable Postgres store.

Typical cost: **~$10–15/month** on Railway for Open WebUI, PostgreSQL, and Redis — more than a single-container deploy, but the reliability and scaling are the point for team use. Open WebUI is free and open source.

---

## How It Compares

| | Open WebUI + Postgres/Redis | Open WebUI (SQLite) | ChatGPT Team | Cloud AI SaaS |
| --- | --- | --- | --- | --- |
| Durable database | PostgreSQL | Single SQLite file | Vendor | Vendor |
| Multi-instance scaling | Yes (Redis) | No | Managed | Managed |
| Multi-user + roles | Yes | Yes | Yes | Varies |
| Cost model | Flat infra | Flat infra | Per seat | Per seat |
| Data ownership | Full — your infra | Full | Vendor | Vendor |
| Self-hostable | Yes | Yes | No | No |

A default single-container Open WebUI on SQLite is great for one person but doesn't back up cleanly or scale past one instance. ChatGPT Team and cloud AI platforms are managed but bill per seat and keep your data. This stack's edge is Open WebUI run the way a team needs it — durable Postgres storage and Redis-backed scaling — self-hosted, with every conversation on infrastructure you own and no per-seat cost.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** — Open WebUI, PostgreSQL, and Redis build and wire together (~3 minutes)
2. Confirm `DATABASE_URL` and the Redis connection are set, and set `WEBUI_SECRET_KEY`
3. Add `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or an OpenAI-compatible endpoint
4. Open your Railway URL, create your admin account, and set `ENABLE_SIGNUP=false`
5. Invite your team, and scale to multiple instances as usage grows — Redis keeps sessions shared

Your chats and users live in Postgres, so they survive every redeploy and back up cleanly.

---

## Common Use Cases

- **Team AI workspace** — a shared, private ChatGPT-style UI with durable data and roles
- **Production Open WebUI** — Postgres persistence and Redis scaling for daily-driver reliability
- **Private document AI** — RAG over internal docs, backed by a real database
- **Multi-model front-end** — one private UI over OpenAI, Anthropic, and compatible endpoints

---

## Configuration

| Variable | Required | Description |
| --- | --- | --- |
| `DATABASE_URL` | Auto-injected | PostgreSQL connection — durable storage, not SQLite |
| Redis connection | Auto-injected | Shared session, cache, and WebSocket state for scaling |
| `WEBUI_SECRET_KEY` | Required | Signs sessions — set a stable random value |
| `ENABLE_SIGNUP` | Recommended | `false` after creating your admin, so no one else registers |
| `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Optional | Add cloud models (or an OpenAI-compatible endpoint) |

> **Postgres and Redis are the point.** `DATABASE_URL` puts all data in durable PostgreSQL (surviving redeploys, backing up cleanly), and Redis shares session and WebSocket state so you can run multiple instances — both wired here, unlike a default SQLite build.

> **Lock it down.** Set a stable `WEBUI_SECRET_KEY`, create your admin, and set `ENABLE_SIGNUP=false` so the workspace stays private with role-based access.

---

## Dependencies for Open WebUI Hosting

- Railway account — ~$10–15/month for Open WebUI, PostgreSQL, and Redis
- PostgreSQL and Redis (both included and wired via Railway references)
- An LLM provider key or OpenAI-compatible endpoint for models
- A modern browser; invite team members from the admin settings

### Deployment Dependencies

- [Open WebUI GitHub Repository](https://github.com/open-webui/open-webui)
- [Open WebUI Documentation](https://docs.openwebui.com/)
- [Open WebUI Environment Configuration](https://docs.openwebui.com/getting-started/env-configuration)
- [Railway Private Networking](https://docs.railway.com/guides/private-networking)

### Implementation Details

The template runs the official `ghcr.io/open-webui/open-webui` image on port `8080`, wired to a Railway-managed PostgreSQL database via `DATABASE_URL` and a Redis service over the private network. PostgreSQL replaces Open WebUI's default SQLite store so chats, users, settings, and documents persist durably, back up cleanly, and tolerate concurrent writes from many users; Redis holds shared session, cache, and WebSocket state, which is what allows more than one Open WebUI instance to run behind load balancing without breaking logins or streaming responses.

Authentication is enabled with `WEBUI_SECRET_KEY` signing sessions, the first account as administrator, and `ENABLE_SIGNUP=false` keeping the instance private with role-based access. Models are configured by adding `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or any OpenAI-compatible base URL, with inference running on the provider side so the container stays light. Built-in RAG (document upload and retrieval), a tool runner, and model management are backed by the Postgres store.

Because the state that normally lives in a single container is externalized to Postgres and Redis, this deployment is both durable across redeploys and horizontally scalable — the production shape for team use rather than a single-user instance. PostgreSQL is the primary backup target.

---

## Frequently Asked Questions

**Why Postgres instead of the default SQLite?** Open WebUI defaults to a single SQLite file, which is a single point of failure, harder to back up, and strained by concurrent users. This template wires PostgreSQL so a team's chats, users, and documents persist durably, back up cleanly, and handle many simultaneous writes.

**What does Redis do here?** It holds shared session, cache, and WebSocket state so Open WebUI can run as multiple instances without users being logged out or losing streaming responses. A default single-container deploy keeps that state in memory and can't scale past one instance.

**Does my data persist and back up?** Yes — all data lives in PostgreSQL, so it survives redeploys and backs up as a normal database dump, unlike a SQLite file inside a container. Postgres is the backup target.

**Can I run more than one instance?** Yes — that's why Redis is included. Shared session and WebSocket state let you run multiple replicas behind Railway's load balancing as your team's usage grows.

---

## 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 this Open WebUI stack on Railway you get the production shape of the most popular self-hosted AI chat UI — PostgreSQL for durable data that survives redeploys, Redis for scalable sessions, and authentication wired in. A private, team-ready ChatGPT alternative, self-hosted on infrastructure you own.

## 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/openwebui-team-production
