Skip to content

How to Update Open WebUI (Docker, Compose, pip) Without Losing Data

6–9 minutes
Woman in a server room holding a tablet with an UPDATE OPEN WEBUI card, hook update safely keep your chats

Updating Open WebUI is quick once you know the rule: your chats, users and settings live in the data volume, not in the container. For Docker you pull a newer image and recreate the container with the same volume. For a pip install you upgrade the package and restart. Done right, nothing is lost.

Done wrong, an update can log everyone out, show the old version, or leave you stuck after a one-way database migration. This guide shows how to avoid all three.

It covers choosing a version tag, backing up, updating with Docker Run, Docker Compose and pip, checking the update worked, rolling back, automatic update tools, and fixes for common problems. It follows the official Open WebUI documentation as of December 2026.

TL;DR

  • Back up first: database migrations are one-way.
  • Docker Run: docker rm -f open-webui, docker pull ghcr.io/open-webui/open-webui:main, then run it again with -v open-webui:/app/backend/data.
  • Compose: docker compose pull then docker compose up -d.
  • pip: pip install -U open-webui then open-webui serve.
  • Stay logged in: set a fixed WEBUI_SECRET_KEY.
  • After: hard-refresh the browser with Ctrl+F5 or Cmd+Shift+R.

Pick a Version Tag

Your setup Recommended
Personal or homelab :main, pulled manually when you want the latest
Shared or team instance Pin a version such as :vX.Y.Z and use Diun for alerts
Production Pin a version, read the release notes, test in staging
Testing what is next Run :dev on a second instance with its own volume

:main always points to the latest build and can include breaking changes. Pinned tags look like ghcr.io/open-webui/open-webui:vX.Y.Z, with -cuda and -ollama variants.

The -ollama image bundles Ollama, which only updates when you pull a newer Open WebUI image; run Ollama as its own container if you want to update it separately (see our how to update Ollama guide).

Before You Update

  1. Back up your data (next section).
  2. Read the release notes on the Open WebUI GitHub releases page for breaking changes.
  3. Make sure you know the exact tag your container runs (docker ps shows the image).
  4. Check you have a fixed WEBUI_SECRET_KEY. Generate one with openssl rand -hex 32 if not.
  5. Running several replicas? Plan to stop all of them; rolling updates are not supported across schema changes.

Admins can also click Check for updates in Settings > General (admin section) to see the latest release. It is on by default via ENABLE_VERSION_UPDATE_CHECK and disabled by OFFLINE_MODE=true.

Back Up Your Data

The open-webui volume holds the database (chats, users, settings), uploaded files and knowledge content, and generated images. Back it up to a dated archive:

docker run --rm -v open-webui:/data -v $(pwd):/backup \
  alpine tar czf /backup/openwebui-$(date +%Y%m%d).tar.gz /data

Do this before every update and on a regular schedule. If you use an external database such as PostgreSQL or object storage, back those up with their own tools too.

Update With Docker Run

  1. Stop and remove the container. Your data in the volume stays safe:
    docker rm -f open-webui
  2. Pull the new image (or a pinned version):
    docker pull ghcr.io/open-webui/open-webui:main
  3. Recreate the container with the same volume and secret key:
    docker run -d -p 3000:8080 \
      --add-host=host.docker.internal:host-gateway \
      -v open-webui:/app/backend/data \
      -e WEBUI_SECRET_KEY="your-secret-key" \
      --name open-webui --restart always \
      ghcr.io/open-webui/open-webui:main
  4. Hard-refresh the browser.

For NVIDIA GPUs, add --gpus all and use the :cuda tag. Pull the same tag you run: a container started from :cuda, :ollama or a version tag keeps starting the old version if you only pulled :main. New to the Docker setup? See our Open WebUI with Ollama setup guide.

Update With Docker Compose

docker compose pull
docker compose up -d

Make sure your docker-compose.yml keeps the volume at /app/backend/data and a fixed secret key:

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - "3000:8080"
    volumes:
      - open-webui:/app/backend/data
    extra_hosts:
      - host.docker.internal:host-gateway
    environment:
      - WEBUI_SECRET_KEY=your-secret-key
    restart: unless-stopped
volumes:
  open-webui:

Our Ollama in Docker guide has a full Compose file with Ollama and GPU support.

Update a pip Install

  1. Activate the same virtual environment you run Open WebUI from.
  2. Upgrade the package:
    pip install -U open-webui
  3. Restart the server:
    open-webui serve

If you installed with uv, upgrade with the same tool and environment you used to install it.

Check the Update Worked

  1. Check the version in the logs:
    docker logs open-webui 2>&1 | head -20
  2. Open http://localhost:3000 and confirm the login page loads.
  3. If the UI looks broken, clear the browser cache with Ctrl+F5 or Cmd+Shift+R.
  4. If the logs show migration errors, check the release notes for known issues.
  5. If nothing changed, check the volume mount (see Troubleshooting).

Roll Back or Restore

To go back, run a pinned older tag with the same volume:

docker rm -f open-webui
docker pull ghcr.io/open-webui/open-webui:v0.8.3
docker run -d -p 3000:8080 -v open-webui:/app/backend/data \
  --add-host=host.docker.internal:host-gateway \
  -e WEBUI_SECRET_KEY="your-secret-key" \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:v0.8.3

For Compose, change the image tag and run docker compose pull and docker compose up -d. For pip, run pip install open-webui==0.8.3. (v0.8.3 is the docs’ example; use the version you had.)

Important: rolling back the container does not undo a database migration. If the new version migrated the database, restore the backup you took before updating:

docker stop open-webui
docker run --rm -v open-webui:/data -v $(pwd):/backup \
  alpine sh -c "rm -rf /data/* && tar xzf /backup/openwebui-YYYYMMDD.tar.gz -C /"
docker start open-webui

This restore deletes everything in the volume first, so double-check the file name.

Get Notified or Auto-Update

Tool Auto-updates Best for
Diun No, alerts only Production
What’s Up Docker (WUD) Manual via web UI Managed setups
Watchtower Yes Homelabs

The original containrrr/watchtower is unmaintained and fails with Docker 29+, so use the nickfedor/watchtower fork:

# One-time update
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
  nickfedor/watchtower --run-once open-webui

# Check every 6 hours
docker run -d --name watchtower --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  nickfedor/watchtower --interval 21600 open-webui

Set WATCHTOWER_CLEANUP=true to remove old images. Auto-updates can break things on releases with breaking changes, so keep backups.

Recent Changes to Watch

  • v0.13.5 moves chat messages into a new chat_message table on first start. It can take a while on big instances and resumes if interrupted. Back up first.
  • Terminals are now machines: API paths moved to /api/v1/machines. See our Open Terminal guide.
  • Arena models became router models with a Random default.
  • Image settings became image connections; old image environment variables are read only on the first start.
  • Direct Connections were replaced by Tether for personal models and tools.

Find Your Current Version

Knowing the version you run makes rollbacks and release notes much easier to use.

  • In the app: open Settings > General in the admin section, where Check for updates compares your build with the latest release.
  • Docker logs: docker logs open-webui 2>&1 | head -20 prints the version at startup.
  • Docker image: docker ps shows the image and tag the container was started from, such as :main or :cuda.
  • pip: pip show open-webui inside your virtual environment.

Write the version down before you update. If something breaks, that is the tag you roll back to, and the release notes between the two versions tell you which migrations ran. If you follow :main, consider switching to pinned tags once other people depend on your instance, so updates only happen when you choose.

Troubleshooting

Everyone is logged out after every update

No fixed WEBUI_SECRET_KEY, so a new one is generated each time. Set one and keep it.

The version did not change

Check the mount. It must be /app/backend/data, never /app/backend, which hides the new code. Change ./backend:/app/backend to ./backend/data:/app/backend/data. Also check you pulled the same tag you run.

All my chats are gone

The new container used a different volume name. Recreate it with the original -v open-webui:/app/backend/data.

UI is blank or buttons are missing

Stale browser files. Hard-refresh or clear the site cache.

Old version breaks after rollback

The newer version migrated the database. Restore your pre-update backup.

Watchtower errors on Docker 29

Switch from containrrr/watchtower to nickfedor/watchtower.

Locked out after updating

Follow our Open WebUI password reset guide.

FAQ

Will updating delete my chats?

No, as long as you reuse the same volume or data folder.

How often should I update?

Homelabs can follow :main. Teams should pin versions and update after reading release notes.

Can I update from the web interface?

No. Check for updates only tells you a new release exists; you update with Docker or pip.

Does updating Open WebUI update Ollama?

Only for the bundled -ollama image. A separate Ollama install updates on its own.

What is the :dev tag?

A pre-release build. Run it on a second instance with its own volume to test upcoming changes.

How do I update several replicas?

Stop all of them, let one instance migrate, then start the rest on the new version.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a server room holding a tablet with an UPDATE OPEN WEBUI card, hook update safely keep your chats