mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #21843] issue: Startup fails after upgrading from 0.7.2 to 0.8.x #58256
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sjw22263 on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21843
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.8.5
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04.4 LTS
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Restarts and runs:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0e716254b8f0 ghcr.io/open-webui/open-webui:0.7.2 "bash start.sh" 4 hours ago Up 4 hours (healthy) 0.0.0.0:3000->8080/tcp, [::]:3000->8080/tcp open-webui
Actual Behavior
Restarts every ~20 seconds:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bce51819e73e ghcr.io/open-webui/open-webui:main "bash start.sh" 27 minutes ago Restarting (3) 2 seconds ago open-webui
Steps to Reproduce
docker rm -f open-webui
docker pull ghcr.io/open-webui/open-webui:main
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Logs & Screenshots
██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║██���██╗ ██████╔╝██║ ██║██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║
╚██████╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝
v0.8.5 - building the best AI user interface.
https://github.com/open-webui/open-webui
INFO: Started server process [1]
INFO: Waiting for application startup.
2026-02-25 05:20:03.436 | INFO | open_webui.utils.logger:start_logger:198 - GLOBAL_LOG_LEVEL: INFO
2026-02-25 05:20:03.436 | INFO | open_webui.main:lifespan:624 - Installing external dependencies of functions and tools...
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: user.scim
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/main.py", line 625, in lifespan
install_tool_and_function_dependencies()
File "/app/backend/open_webui/utils/plugin.py", line 446, in install_tool_and_function_dependencies
tool_list = Tools.get_tools()
^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/models/tools.py", line 171, in get_tools
users = Users.get_users_by_user_ids(user_ids, db=db) if user_ids else []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/models/users.py", line 538, in get_users_by_user_ids
.all()
^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2704, in all
return self._iter().all() # type: ignore
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2857, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2249, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
return meth(
^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: user.scim
[SQL: SELECT user.id AS user_id, user.email AS user_email, user.username AS user_username, user.role AS user_role, user.name AS user_name, user.profile_banner_image_url AS user_profile_banner_image_url, user.bio AS user_bio, user.gender AS user_gender, user.date_of_birth AS user_date_of_birth, user.timezone AS user_timezone, user.presence_state AS user_presence_state, user.status_emoji AS user_status_emoji, user.status_message AS user_status_message, user.status_expires_at AS user_status_expires_at, user.info AS user_info, user.settings AS user_settings, user.oauth AS user_oauth, user.scim AS user_scim, user.last_active_at AS user_last_active_at, user.updated_at AS user_updated_at, user.created_at AS user_created_at
FROM user
WHERE user.id IN (?)]
[parameters: ('ccd686d3-e99c-43b5-adec-dc40675a7053',)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Application startup failed. Exiting.
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Loading WEBUI_SECRET_KEY from .webui_secret_key
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 374d2f66af06 -> 8452d01d26d7, Add chat_message table
ERROR [open_webui.env] Error running migrations: (sqlite3.OperationalError) table chat_message already exists
[SQL:
CREATE TABLE chat_message (
id TEXT NOT NULL,
chat_id TEXT NOT NULL,
user_id TEXT,
role TEXT NOT NULL,
parent_id TEXT,
content JSON,
output JSON,
model_id TEXT,
files JSON,
sources JSON,
embeds JSON,
done BOOLEAN,
status_history JSON,
error JSON,
usage JSON,
created_at BIGINT,
updated_at BIGINT,
PRIMARY KEY (id),
FOREIGN KEY(chat_id) REFERENCES chat (id) ON DELETE CASCADE
)
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: table chat_message already exists
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/backend/open_webui/config.py", line 68, in run_migrations
command.upgrade(alembic_cfg, "head")
File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 483, in upgrade
script.run_env()
File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 545, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 116, in load_python_file
module = load_module_py(module_id, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 136, in load_module_py
spec.loader.exec_module(module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/app/backend/open_webui/migrations/env.py", line 116, in
run_migrations_online()
File "/app/backend/open_webui/migrations/env.py", line 110, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/usr/local/lib/python3.11/site-packages/alembic/runtime/environment.py", line 969, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/lib/python3.11/site-packages/alembic/runtime/migration.py", line 626, in run_migrations
step.migration_fn(**kw)
File "/app/backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py", line 27, in upgrade
op.create_table(
File "", line 8, in create_table
File "", line 3, in create_table
File "/usr/local/lib/python3.11/site-packages/alembic/operations/ops.py", line 1331, in create_table
return operations.invoke(op)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/alembic/operations/base.py", line 452, in invoke
return fn(self, operation)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/alembic/operations/toimpl.py", line 140, in create_table
operations.impl.create_table(table, **kw)
File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 440, in create_table
self._exec(schema.CreateTable(table, **kw))
File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 256, in _exec
return conn.execute(construct, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
return meth(
^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection
return connection._execute_ddl(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1530, in _execute_ddl
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table chat_message already exists
[SQL:
CREATE TABLE chat_message (
id TEXT NOT NULL,
chat_id TEXT NOT NULL,
user_id TEXT,
role TEXT NOT NULL,
parent_id TEXT,
content JSON,
output JSON,
model_id TEXT,
files JSON,
sources JSON,
embeds JSON,
done BOOLEAN,
status_history JSON,
error JSON,
usage JSON,
created_at BIGINT,
updated_at BIGINT,
PRIMARY KEY (id),
FOREIGN KEY(chat_id) REFERENCES chat (id) ON DELETE CASCADE
)
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
WARNI [open_webui.env] ⚠️ SECURITY WARNING: JWT_EXPIRES_IN is set to '-1'
See: https://docs.openwebui.com/getting-started/env-configuration
WARNI [open_webui.env]
WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║█████╗ ██████╔╝██║ ██║██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║
╚██████╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝
v0.8.5 - building the best AI user interface.
https://github.com/open-webui/open-webui
INFO: Started server process [1]
INFO: Waiting for application startup.
2026-02-25 05:21:11.394 | INFO | open_webui.utils.logger:start_logger:198 - GLOBAL_LOG_LEVEL: INFO
2026-02-25 05:21:11.394 | INFO | open_webui.main:lifespan:624 - Installing external dependencies of functions and tools...
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: user.scim
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 203, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/main.py", line 625, in lifespan
install_tool_and_function_dependencies()
File "/app/backend/open_webui/utils/plugin.py", line 446, in install_tool_and_function_dependencies
tool_list = Tools.get_tools()
^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/models/tools.py", line 171, in get_tools
users = Users.get_users_by_user_ids(user_ids, db=db) if user_ids else []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/models/users.py", line 538, in get_users_by_user_ids
.all()
^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2704, in all
return self._iter().all() # type: ignore
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2857, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2249, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
return meth(
^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: user.scim
[SQL: SELECT user.id AS user_id, user.email AS user_email, user.username AS user_username, user.role AS user_role, user.name AS user_name, user.profile_banner_image_url AS user_profile_banner_image_url, user.bio AS user_bio, user.gender AS user_gender, user.date_of_birth AS user_date_of_birth, user.timezone AS user_timezone, user.presence_state AS user_presence_state, user.status_emoji AS user_status_emoji, user.status_message AS user_status_message, user.status_expires_at AS user_status_expires_at, user.info AS user_info, user.settings AS user_settings, user.oauth AS user_oauth, user.scim AS user_scim, user.last_active_at AS user_last_active_at, user.updated_at AS user_updated_at, user.created_at AS user_created_at
FROM user
WHERE user.id IN (?)]
[parameters: ('ccd686d3-e99c-43b5-adec-dc40675a7053',)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Application startup failed. Exiting.
Additional Information
No response
@Classic298 commented on GitHub (Feb 25, 2026):
https://docs.openwebui.com/troubleshooting/manual-database-migration
@Sjw22263 commented on GitHub (Feb 25, 2026):
Unfortunately, having already read that and followed the process entailed, the manual database migration also fails - giving the same error message as the automatic update process in the docker open-webui logs.
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: user.scim
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
... etc
@Classic298 commented on GitHub (Feb 25, 2026):
Are you sure you ran alembic upgrade head inside the docker container?
@Classic298 commented on GitHub (Feb 25, 2026):
If yes what was your output there
@Classic298 commented on GitHub (Feb 25, 2026):
You are missing the scim table as evident by the error so the alembic migration did not run and did not add the scim table.
@Classic298 commented on GitHub (Feb 25, 2026):
Strongly related: https://github.com/open-webui/open-webui/discussions/21388
@Sjw22263 commented on GitHub (Feb 25, 2026):
Yes, it was run from within the docker container, as per the manual upgrade instructions. This is the output:
root@5490f065c0dc:/app/backend/open_webui# alembic upgrade head
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 37f288994c47 -> 2f1211949ecc, Update messages and channel member table
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: duplicate column name: status
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/alembic", line 10, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line
....
@Sjw22263 commented on GitHub (Feb 25, 2026):
I tried the suggested fixes in #21388 but they did not fix my issue.
@Classic298 commented on GitHub (Feb 25, 2026):
@Sjw22263 ok so the issue is in your case, your migration is failing on the messages and channel member table and not the chat message table.
Interesting.
I'll be back
@Classic298 commented on GitHub (Feb 25, 2026):
Your DB is in a partially-migrated state. The automatic migration on first boot applied some changes (created
chat_messagetable, addedchannel_member.status) but crashed partway through — probably on thechannel_member.joined_atNOT NULL constraint, which is a known SQLite issue. Since SQLite migrations are non-transactional, the partial work stuck butalembic_versionnever advanced. Every subsequent startup retries the same failing migration.The docs cover individual errors ("table already exists", "duplicate column") but don't walk through this compound case where you need to step through a chain of partially-applied migrations one by one.
Here's what to do, inside the container:
1. Back up
2. Set env
3. Confirm your current revision
Should be
37f288994c47.4. Step through migrations one at a time
The approach: try
alembic upgrade <next_revision>. If it succeeds, move on. If it fails with "duplicate column" or "already exists", stamp past it and continue.This will fail (duplicate
statuscolumn). Stamp past it:Now keep going — try each one, stamp if it fails:
Same pattern for each: succeeds → move on, fails with "already exists"/"duplicate column" →
alembic stamp <that_revision>.5. Handle the chat_message migration
Will fail because
chat_messagealready exists. Check if the data backfill ran:alembic stamp 8452d01d26d7alembic stamp 8452d01d26d76. Finish the remaining migrations
These should succeed since they add new things that don't exist yet. If any fail, same approach — stamp past it.
7. Verify and start
If any migration fails with an error that is NOT "already exists" or "duplicate column", stop and post the error here.
@Classic298 commented on GitHub (Feb 25, 2026):
Updating the docs to expand on this.
The docs already cover your case, but i will expand that section even more to make it more clear
@Sjw22263 commented on GitHub (Mar 4, 2026):
Ok, that worked. Thank you for your help, much appreciated.