Open WebUI: "alembic.util.exc.CommandError: Can't locate revision identified by '…'"

By MV2 of Munim, Inc., with AI agents. Checked on 9 November 2026 against every Open WebUI release tag from v0.3.17 to v0.13.3 (8 November 2026), the newest release then.

Open WebUI stops at startup, often in a restart loop, and its log shows Error running migrations: Can't locate revision identified by '…' followed by alembic.util.exc.CommandError: Can't locate revision identified by '…' with a 12-character id.

Short answer: the id is the last database migration your Open WebUI data has been through. A newer Open WebUI release applied it, and the release you are starting now is older, so it doesn't know that id and refuses to start. Find your id below to see which release first shipped it, then run that release or any newer one (the newest on 9 November 2026 was v0.13.3). Open WebUI's migrations only go forward, so you can't go back to an older release on the same data. Going back means restoring a backup taken before the upgrade.

Why it happens

Open WebUI records the newest migration it has applied in the alembic_version table of its database. Each time it starts, it runs command.upgrade(alembic_cfg, 'head') (its run_migrations() in config.py; ENABLE_DB_MIGRATIONS is on unless you set it to false). Alembic first looks up the recorded id among the migrations that release ships. If the id is from a newer release, it isn't there, and Alembic stops with this error. Open WebUI never runs a downgrade.

It usually shows up after one of these:

Ids reported in public threads

If you rolled back because the :ollama image had no Ollama

On 8 November 2026 an Open WebUI maintainer confirmed in #33942 that the amd64 :ollama images for 0.13.1 and 0.13.2 were built without Ollama, and that rolling back to 0.13.0 does not work because 0.13.1 added a database migration (9f6c2a8d1b43, the id in the error). On 9 November the maintainer added that the 0.13.3 :ollama image (amd64 and arm64) ships Ollama again. So the fix is to go forward, not back: pull the :ollama image again so you get 0.13.3 or newer, and start it on the same volume.

Find your id

From the log (change open-webui to your container name):

docker logs open-webui 2>&1 | grep "locate revision"

Or read it straight from the database while Open WebUI is stopped. With the default SQLite database in the official Docker image (the volume mounted at /app/backend/data), using a throwaway Python container (change open-webui to your volume name from docker volume ls, or to the host folder you mounted):

docker run --rm -v open-webui:/data python:3.12-slim python3 -c "import sqlite3; print(sqlite3.connect('/data/webui.db').execute('select version_num from alembic_version').fetchall())"

With PostgreSQL (DATABASE_URL starts with postgresql://), run SELECT version_num FROM alembic_version; in that database (in the schema named by DATABASE_SCHEMA, if you set it).

Fix it

  1. Look up the id in the table. The release in its row is the oldest one that can start on your data.
  2. Run that release or newer. With Docker, pin the tag, for example docker pull ghcr.io/open-webui/open-webui:v0.13.3, then start the container again with the same options and volume you used before, changing only the image tag. With Docker Compose, set image: ghcr.io/open-webui/open-webui:v0.13.3 and run docker compose up -d. With pip, pip install "open-webui==0.13.3". A pinned tag keeps a floating tag from moving you back again.
  3. If you really need the older release (say a newer one has a bug that blocks you), stop Open WebUI and restore the copy of your data volume or webui.db (or your PostgreSQL dump) taken before the upgrade, then start the older release on it. Anything created after that backup is lost. If you have no such backup, stay on the newer release and wait for a fix.

Don't edit alembic_version to an older id ("stamping"), and don't set ENABLE_DB_MIGRATIONS=false to force the old release to start. Either way the tables keep the newer layout that the old code doesn't expect, and the next upgrade tries to apply migrations whose changes are already there. Before any upgrade, copy the data volume (or dump the database) first; the 0.13.1 release notes recommend backing up the database and all associated data before upgrading in production.

All 72 Open WebUI migration ids, newest first

72 migrations, first shipped across 26 releases from v0.3.17 to v0.13.3. "Image tag" shows the pinned tag on ghcr.io/open-webui/open-webui where ghcr.io had one on 9 November 2026. The same table is available as JSON: openwebui-alembic-revisions.json (CC BY 4.0).

Revision idFirst releaseReleasedMigrationImage tag
6a23bd107e54v0.13.12026-11-08add chat view state:v0.13.1
8bc7e5a902d1v0.13.12026-11-08add auth session:v0.13.1
9f6c2a8d1b43v0.13.12026-11-08add channel lookup indexes:v0.13.1
6f8c2a91d4e7v0.13.02026-11-03add tool is active:v0.13.0
c41f8d9e2a10v0.13.02026-11-03add resource comments:v0.13.0
e42c8f710a36v0.13.02026-11-03add notification inbox:v0.13.0
0bd252b206fbv0.12.12026-10-14add missing auth rows:v0.12.1
c92da83b017fv0.12.12026-10-14add apps:v0.12.1
a7d3e9f2b641v0.12.02026-10-10add mfa and session stamp:v0.12.0
b8e4f0a3c752v0.12.02026-10-10add group hierarchy:v0.12.0
b8f2c6d91a04v0.12.02026-10-10add postgres pending files index:v0.12.0
d6a8c3f912abv0.12.02026-10-10add skill history:v0.12.0
e7b9d4a023bcv0.12.02026-10-10add model history:v0.12.0
f8c0e5b134cdv0.12.02026-10-10add tool history and function history:v0.12.0
1ce6ade7d93bv0.11.12026-08-25add group member user id index:v0.11.1
6d09d1bf1f23v0.11.12026-08-25repair double encoded user oauth:v0.11.1
d4c1a8e37b62v0.11.12026-08-25add chat timer at and chat indexes:v0.11.1
55f1302ac17cv0.11.02026-07-27add memory id user id covering index:v0.11.0
856c5b02fb54v0.11.02026-07-27add chat message meta:v0.11.0
959eaac8f909v0.11.02026-07-27add automation folder id:v0.11.0
9a1b2c3d4e5fv0.11.02026-07-27add current message id to chat:v0.11.0
b0018471bbbev0.11.02026-07-27add user variables:v0.11.0
c49178636c78v0.11.02026-07-27add chat variables:v0.11.0
f0bd01a18a3dv0.11.02026-07-27add unique normalized user email index:v0.11.0
3ff2c63645b8v0.10.02026-06-29reshape config to per key rows:v0.10.0
42e2978c7933v0.10.02026-06-29add memory path and meta:v0.10.0
4c5ce3d2f27fv0.10.02026-06-29add context summary to chat message:v0.10.0
7b3f2a9c1d4ev0.10.02026-06-29add memory type:v0.10.0
3c9b0ca343fdv0.9.62026-06-01add knowledge directory table:v0.9.6
461111b60977v0.9.62026-06-01add missing primary keys to legacy:v0.9.6
4de81c2a3af1v0.9.32026-05-09add pinned note table:v0.9.3
a0b1c2d3e4f5v0.9.32026-05-09add memory user id index:v0.9.3
56359461a091v0.9.02026-04-21add calendar tables:v0.9.0
a3dd5bedd151v0.9.02026-04-21add tasks and summary to chat:v0.9.0
b7c8d9e0f1a2v0.9.02026-04-21add last read at to chat:v0.9.0
c1d2e3f4a5b6v0.9.02026-04-21add shared chat table:v0.9.0
d4e5f6a7b8c9v0.9.02026-04-21add automation tables:v0.9.0
e1f2a3b4c5d6v0.9.02026-04-21add is pinned to note:v0.9.0
b2c3d4e5f6a7v0.8.12026-02-14add scim column to user table:v0.8.1
374d2f66af06v0.8.02026-02-12add prompt history table:v0.8.0
8452d01d26d7v0.8.02026-02-12add chat message table:v0.8.0
a1b2c3d4e5f6v0.8.02026-02-12add skill table:v0.8.0
f1e2d3c4b5a6v0.8.02026-02-12add access grant table:v0.8.0
6283dc0e4d8dv0.6.422025-12-21add channel file table:v0.6.42
81cc2ce44d79v0.6.422025-12-21update channel file and knowledge table:v0.6.42
c440947495f3v0.6.422025-12-21add chat file table:v0.6.42
2f1211949eccv0.6.412025-12-02update message and channel member table:v0.6.41
3e0e00844bb0v0.6.412025-12-02add knowledge file table:v0.6.41
90ef40d4714ev0.6.412025-12-02update channel and channel members table:v0.6.41
b10670c03dd5v0.6.412025-12-02update user table:v0.6.41
37f288994c47v0.6.372025-11-24add group member table:v0.6.37
a5c220713937v0.6.322025-09-29add reply to id column to message:v0.6.32
38d63c18f30fv0.6.272025-09-09add oauth session table:v0.6.27
018012973d35v0.6.232025-08-21add indexes:v0.6.23
3af16a1c9fb6v0.6.232025-08-21update user table:v0.6.23
d31026856c01v0.6.162025-07-14update folder table data:v0.6.16
9f0c9cd09105v0.6.62025-05-05add note table:v0.6.6
3781e22d8b01v0.5.32024-12-31update message table:v0.5.3
57c599a3cb57v0.5.02024-12-25add channel table:v0.5.0
7826ab40b532v0.5.02024-12-25update file table:v0.5.0
922e7a387820v0.4.02024-11-19add group table:v0.4.0
1af9b942657bv0.3.332024-10-24migrate tags:v0.3.33
242a2047eae0v0.3.332024-10-24update chat table:v0.3.33
3ab32c4b8f59v0.3.332024-10-24update tags:v0.3.33
4ace53fd72c8v0.3.332024-10-24update folder table datetime:v0.3.33
af906e964978v0.3.332024-10-24add feedback table:v0.3.33
c29facfe716bv0.3.332024-10-24update file table path:v0.3.33
c69f45358db4v0.3.332024-10-24add folder table:v0.3.33
6a39f3d8e55cv0.3.312024-10-07add knowledge table:v0.3.31
c0fbf31ca0dbv0.3.312024-10-07update file table:v0.3.31
7e5b5dc7342bv0.3.172024-09-04init:v0.3.17
ca81bd47c050v0.3.172024-09-04add config table:v0.3.17

How this was made, and its limits

AI agents working for MV2 of Munim, Inc. listed backend/open_webui/migrations/versions at every release tag (vX.Y.Z) of the Open WebUI git repository, read each migration's own revision and down_revision, and took the first tag that contains it. Dates are GitHub release dates. The mapping is by git tag. A floating image tag (:main, :ollama, :cuda) can point at a build between releases, so it can hold migrations that the next release ships, and a :dev build can hold migrations that are not in this table yet. Helm chart versions are not Open WebUI versions: check the chart's appVersion. Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.

Check the rest of your setup

The free local-ai-checkup script shows which AI ports on your machine other computers can reach, and the CVE checker tells you which security advisories affect your Open WebUI version. Both are read-only and send nothing off the machine.

Want someone to check it for you?

MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.