← All posts

Open WebUI on Ubuntu: Docker Compose and HTTPS with Traefik

Your own ChatGPT-style UI for Ollama and OpenAI-compatible APIs — a step-by-step deploy with Let's Encrypt.

Open WebUI on Ubuntu: Docker Compose and HTTPS with Traefik
Contents

In brief

Open WebUI is a self-hosted web UI for local and remote LLMs (Ollama, OpenAI-compatible endpoints) with user authentication. A Dev.to guide deploys the stack on Ubuntu 24.04: Docker Compose, Traefik v3, and automatic HTTPS.

What happened

The author (Vultr) outlines a minimal production setup:

  1. Directory ~/openwebui and a ./data volume for backend data.
  2. .env with DOMAIN and LETSENCRYPT_EMAIL.
  3. docker-compose.yaml with Traefik (ports 80/443, ACME HTTP challenge) and openwebui (ghcr.io/open-webui/open-webui:main, WEBUI_AUTH=true).
  4. Traefik labels route Host(${DOMAIN}) to container port 8080.

The first registered user becomes administrator; others are managed in the Admin Panel.

Why it matters

Teams want a private chat with models without sending prompts to public SaaS, but without building a UI from scratch. Open WebUI covers portal + users + RAG documents while models stay on Ollama or an external API.

Piece Purpose
Traefik TLS and HTTP→HTTPS redirect without manual certbot on the host
WEBUI_AUTH=true Do not leave the instance wide open on the internet
data volume Persist settings and uploaded documents

After the base deploy you can wire RAG, per-user limits, and multiple model backends.

In practice

  1. Point a DNS A record to a VPS running Ubuntu 24.04.
  2. Create .env and the compose manifest from the guide; check docker compose ps and logs.
  3. Open https://<DOMAIN>, register admin, disable public signup if needed.
  4. In settings, point to Ollama on the same host or an OpenAI-compatible URL.
  5. For production: backup ./data, schedule image updates, firewall to 80/443 only.

This is an infrastructure recipe, not a data-security policy — keep API secrets in env, not in git.

Takeaway

Open WebUI + Traefik is a fast path to your own AI portal on a VPS. Useful for internal sandboxes, labs, and teams already running Ollama who want a proper UI and accounts.