DEV Community

Cover image for Deploying OpenWebUI Local AI Interface on Ubuntu 24.04
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya • Originally published at docs.vultr.com

Deploying OpenWebUI Local AI Interface on Ubuntu 24.04

Open WebUI is a self-hosted, ChatGPT-style interface for local and remote AI models, supporting Ollama, OpenAI-compatible endpoints, and per-user authentication. This guide deploys Open WebUI using Docker Compose with Traefik handling automatic HTTPS. By the end, you'll have an Open WebUI instance running securely at your domain, ready to point at a model backend.


Set Up the Directory Structure

1. Create the project directory:

$ mkdir -p ~/openwebui/data
$ cd ~/openwebui
Enter fullscreen mode Exit fullscreen mode

2. Create the environment file:

$ nano .env
Enter fullscreen mode Exit fullscreen mode
DOMAIN=openwebui.example.com
LETSENCRYPT_EMAIL=admin@example.com
Enter fullscreen mode Exit fullscreen mode

Deploy with Docker Compose

1. Create the Docker Compose manifest:

$ nano docker-compose.yaml
Enter fullscreen mode Exit fullscreen mode
services:
  traefik:
    image: traefik:v3.6
    container_name: traefik
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: unless-stopped

  openwebui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: openwebui
    hostname: openwebui
    expose:
      - "8080"
    volumes:
      - "./data:/app/backend/data"
    environment:
      - WEBUI_AUTH=true
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openwebui.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.openwebui.entrypoints=websecure"
      - "traefik.http.routers.openwebui.tls.certresolver=letsencrypt"
      - "traefik.http.services.openwebui.loadbalancer.server.port=8080"
    restart: unless-stopped

volumes:
  letsencrypt:
Enter fullscreen mode Exit fullscreen mode

2. Start the services:

$ docker compose up -d
Enter fullscreen mode Exit fullscreen mode

3. Verify the services are running:

$ docker compose ps
Enter fullscreen mode Exit fullscreen mode

4. View the logs:

$ docker compose logs
Enter fullscreen mode Exit fullscreen mode

Access Open WebUI

Open https://openwebui.example.com in a browser. The first user you register becomes the administrator. Additional users sign up through the same flow and can be managed from Admin Panel → Users.


Next Steps

Open WebUI is running and served securely over HTTPS. From here you can:

  • Connect a local Ollama instance or any OpenAI-compatible endpoint as a model backend
  • Enable RAG by uploading documents to the knowledge base
  • Configure per-user model permissions and rate limits from the admin panel

For the full guide with additional tips, visit the original article on Vultr Docs.

Top comments (0)