Skip to content

How to Deploy Open WebUI on a VPS

Updated Aug 2026

verified on Ubuntu 26.04 · Aug 2026

Self-host Open WebUI on your own VPS — a feature-rich, ChatGPT-style interface for Ollama and any OpenAI-compatible API with RAG, multi-user support, and model management.

Before you start
  • A VPS with 2+ GB RAM for Open WebUI itself
  • Ollama running either on the same server or accessible remotely
  • A fresh Ubuntu 26.04 server with root/sudo SSH access

What Open WebUI is

Open WebUI is a self-hosted, feature-rich alternative to ChatGPT's web interface. It connects to Ollama (or any OpenAI-compatible API) and gives you a polished chat UI with conversation history, model switching, document upload (RAG), image generation, and multi-user support — all running on your own infrastructure.

The appeal is the same as any self-hosted AI tool: your data stays yours. Chat histories, uploaded documents, and user accounts never leave your server. You also get features that commercial AI interfaces charge for — multiple users, conversation organization, and the ability to mix models from different backends.

Open WebUI is lightweight on its own (the Python backend and Svelte frontend run in a single container), but it needs a model backend to do anything useful. Ollama is the natural pairing — run both on the same VPS, and you have a complete, private AI chat platform for the cost of a single box.

Server sizing — the UI is light, the backend is not

Open WebUI itself needs surprisingly little: 2 GB RAM handles the web interface, authentication, and document indexing comfortably. The heavy lifting is model inference, which happens in Ollama (or your chosen backend).

Standalone sizing (UI only):

  • 2 GB RAM — plenty for the web interface, user management, and RAG indexing
  • 4 GB RAM — if you're running many concurrent users or large document uploads

Combined with Ollama on the same box: Add the Ollama sizing requirements on top. A 7B model needs ~16 GB total RAM (8 GB for Ollama + model, 8 GB for Open WebUI + OS). If you're running the UI separately, 2-4 GB is enough.

The key insight: Open WebUI is a frontend, not a compute engine. It proxies requests to your model backend. The VPS specs that matter are for the backend, not the UI.

A Hetzner CX22 (2 vCPU / 4 GB) works well if Ollama runs elsewhere. For a combined setup with a 7B model, you need at least 16 GB RAM — the Hetzner CX42 (8 vCPU / 16 GB) is the floor.

Prepare the server

Start from a fresh Ubuntu 24.04 or 26.04 server. Update and create a non-root user:

apt update && apt upgrade -y
adduser deploy
usermod -aG sudo deploy

Lock down the firewall:

ufw allow OpenSSH
ufw allow 80
ufw allow 443
ufw enable

Install Docker:

curl -fsSL https://get.docker.com | sh
usermod -aG docker deploy

Log out and back in as deploy so the docker group takes effect.

Install Open WebUI

Create a working directory:

mkdir ~/open-webui && cd ~/open-webui

Create a compose file:

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:8080"
    volumes:
      - open-webui_data:/app/backend/data
    environment:
      - OLLAMA_BASE_URL=http://host.docker.internal:11434
    extra_hosts:
      - "host.docker.internal:host-gateway"

volumes:
  open-webui_data:

The OLLAMA_BASE_URL tells Open WebUI where to find Ollama. If Ollama runs on the same server, host.docker.internal reaches it via Docker's internal network. If Ollama is on a different server, replace it with the actual URL (e.g., http://ollama-server:11434).

Start it:

docker compose up -d

Open WebUI listens on port 3000 (mapped to 8080 inside the container). The 127.0.0.1 bind keeps it private — a reverse proxy handles public access.

Connect to Ollama

If Ollama isn't running yet, install it first — see Deploy Ollama on a VPS for the full setup. The quick version:

# In a separate directory
mkdir ~/ollama && cd ~/ollama
cat > compose.yaml <<EOF
services:
  ollama:
    image: ollama/ollama:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:11434:11434"
    volumes:
      - ollama_data:/root/.ollama
volumes:
  ollama_data:
EOF
docker compose up -d

Pull a model so Ollama has something to serve:

docker exec -it ollama ollama pull llama3.2

Once Ollama is running and has at least one model, Open WebUI should detect it automatically. Load the web interface and you'll see the model in the dropdown.

HTTPS + domain

Open WebUI needs HTTPS for production use — especially if you're enabling user accounts or accessing it remotely. Point a reverse proxy at 127.0.0.1:3000 and terminate HTTPS on 443.

The simplest path is Automatic HTTPS with Caddy. Point an A record for your hostname (say chat.example.com) at the server's public IP, then have Caddy reverse-proxy that hostname to 127.0.0.1:3000.

If you're using the Caddy container approach, put Open WebUI and Caddy in the same compose file and proxy to the Open WebUI service name:

reverse_proxy open-webui:8080

First-run setup

Load https://chat.example.com in your browser. On a fresh install, Open WebUI shows an admin account setup screen.

Create the admin account immediately. Like most self-hosted tools, the setup screen is open until the first account exists — whoever registers first becomes the admin. Set your email and a strong password before you do anything else.

Once you're in:

  1. Check the model dropdown — it should show models from your Ollama instance. If it's empty, verify Ollama is running and the OLLAMA_BASE_URL is correct.
  2. Send a test message — type something and confirm you get a response. This verifies the full chain: browser → Open WebUI → Ollama → model → response.
  3. Upload a document — try uploading a PDF or text file and ask a question about it. This tests the RAG (retrieval-augmented generation) pipeline, which indexes documents and retrieves relevant chunks for the model.

If the model dropdown is empty, check the Open WebUI logs:

docker compose logs open-webui | tail -20

Common issues: Ollama not reachable (wrong URL), Ollama not running, or firewall blocking the connection.

Multi-user setup

Open WebUI supports multiple users with role-based access. After creating the admin account:

  1. Disable open registration (Settings → General → "Allow New Sign Ups") once you've created all the accounts you need. Leaving registration open means anyone who finds your URL can create an account.
  2. Create user accounts (Admin Panel → Users → Add User) for each person who needs access.
  3. Set default models (Settings → General → "Default Model") to control which model new conversations start with.

Users get their own conversation history and settings, but they all share the same Ollama backend and its models. There's no per-user model isolation — everyone sees the same models.

Backups

The important data lives in the Open WebUI volume:

docker run --rm -v open-webui_data:/data -v $(pwd):/backup alpine \
  tar czf /backup/open-webui-$(date +%F).tar.gz -C /data .

This backs up conversation history, user accounts, settings, and indexed documents. The backup is self-contained — restore it to a fresh Open WebUI instance and everything comes back.

For Ollama, see Deploy Ollama on a VPS for backup instructions.

Upgrades

Pull the newer image and recreate:

docker compose pull
docker compose up -d

Open WebUI runs database migrations automatically on startup, so upgrades are usually seamless. Check the Open WebUI changelog for any breaking changes before a major version bump.

Troubleshooting

Model dropdown is empty. Ollama isn't reachable. Check that Ollama is running (docker compose ps in the Ollama directory) and that the OLLAMA_BASE_URL is correct. If both are on the same server, http://host.docker.internal:11434 should work.

Responses are very slow. Open WebUI is waiting for Ollama, which is doing CPU inference. This is expected without a GPU. Check Ollama's logs for model loading errors.

"Unauthorized" errors when chatting. Your session may have expired, or you may have disabled registration before creating your account. If you're locked out, you can reset the admin password by setting ADMIN_EMAIL and ADMIN_PASSWORD environment variables in the compose file and restarting.

Document upload fails. Check disk space — RAG indexing stores embeddings locally. Also verify the file isn't corrupted or too large (there's a per-file size limit in the settings).

Can't register new users. Registration is disabled in the admin settings. Log in as admin and enable "Allow New Sign Ups" in Settings → General.

Verification + next steps

You're done when you can: load the web interface over HTTPS, sign in as admin, send a message and get a response from Ollama, upload a document and ask questions about it, and create additional user accounts.

From here, connect Ollama with additional models (pull different sizes for different use cases), enable image generation if you have a Stable Diffusion backend, or integrate Open WebUI with other self-hosted tools via its API. For a document-focused AI workspace, see AnythingLLM. A Hetzner CX22 (2 vCPU / 4 GB) handles the UI alone; pair it with a CX42 (8 vCPU / 16 GB) for the Ollama backend with 7B models. See Best VPS for AI & ML Workloads for the ranked picks.

Next steps

Search SelfHost Atlas

Search apps, comparisons, guides, and categories.

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.