Record the deployment before closing traffic
Open WebUI 0.13.0 requires a coordinated upgrade because its database migration can leave older instances facing an incompatible schema. The release raises the native tool-call round default from 256 to 1,024 and removes default limits from four sub-agent controls. Recovery and agent budgets therefore belong in the same maintenance plan. Sources: Open WebUI
Treat this guide as a proposed rehearsal, not a tested runbook with measured migration or recovery times. Measure those durations on the deployment before committing to a production window. Open WebUI’s updating guide recommends pinned releases and staging tests for production. Sources: Open WebUI
Record old and target tags, repository digests, local image IDs and architecture. Inventory every host, replica, worker count, ingress point, database type and version, mount and external store. Preserve manifests, environment values, saved Admin settings and secure recovery references for secrets. Open WebUI’s updating guide says a stable WEBUI_SECRET_KEY preserves sessions across container recreation. For Docker, use this inventory and image-prefetch sequence. Sources: Open WebUI
umask 077
mkdir -p rehearsal-record
docker inspect open-webui \
> rehearsal-record/container.json
docker compose config \
> rehearsal-record/compose.resolved.yaml
docker image inspect "$(docker inspect --format '{{.Image}}' open-webui)" \
> rehearsal-record/old-image.json
docker pull ghcr.io/open-webui/open-webui:v0.13.0
docker image inspect ghcr.io/open-webui/open-webui:v0.13.0 \
> rehearsal-record/target-image.jsonKeep inventory originals in restricted storage and redact shared copies because these files can contain credentials. Repeat inventory and prefetching on every host. Close traffic admission and finish or explicitly cancel active work. Disable restart and reconciliation mechanisms, then stop all application writers before backing up.
Back up the database and matching files
Open WebUI’s community backup tutorial says the Admin Database download streams the on-disk webui.db file. Recent writes can remain in webui.db-wal, the SQLite write-ahead log, so the download can omit data. The tutorial identifies /app/backend/data as the usual Docker data mount, containing uploads, vector data and the database. It is a community contribution unsupported by the Open WebUI team. Sources: Open WebUI
Resolve the actual mount and stop writers before running the following SQLite backup sequence. SQLite’s CLI documentation supports the backup and integrity-check command forms shown here. Retain exit status and check output, using ok as the rehearsal acceptance target. Follow with application checks; database integrity alone is not the acceptance endpoint. Sources: SQLite
set -euo pipefail
# Example paths: replace with the recorded deployment paths.
DATA=/srv/open-webui/data
BACKUP=/srv/backups/openwebui-pre-0130
install -d -m 700 "$BACKUP"
test -f "$DATA/webui.db"
sqlite3 "$DATA/webui.db" ".backup '$BACKUP/webui.db'"
sqlite3 "$BACKUP/webui.db" 'PRAGMA integrity_check;'Package matching files separately, excluding live SQLite files in favor of the database backup just created. Test extraction paths, ownership and permissions during restoration. Coordinate separate snapshots for external storage, and preserve configuration and secrets with the recovery set.
tar -C "$DATA" \
--exclude='./webui.db' \
--exclude='./webui.db-wal' \
--exclude='./webui.db-shm' \
-czf "$BACKUP/data-files.tgz" .
sha256sum "$BACKUP/webui.db" "$BACKUP/data-files.tgz" \
> "$BACKUP/SHA256SUMS"For PostgreSQL, select version-matched documentation and verify client compatibility, required roles and extensions. PostgreSQL documents custom-format dumps and pg_restore restoration; listing an archive only displays its contents. The single-transaction restore below stops on error and is atomic. It cannot use parallel jobs and can exhaust lock-table capacity. Preserve ownership and grants, then test authentication as the application user. Treat this as a single-database backup, not a backup of the entire PostgreSQL installation. Sources: PostgreSQL
# Configure libpq service definitions and credentials separately.
pg_dump --dbname='service=owui_source' \
--format=custom \
--file=webui.dump
pg_restore --list webui.dump > webui.dump.contents
# Destination must be a newly created, empty, isolated database.
pg_restore --dbname='service=owui_rehearsal' \
--single-transaction \
--verbose \
webui.dumpProve the restored old deployment works
Restore into fresh application storage and a separate database before attempting migration. Block rehearsal access to production databases, buckets, queues and tool endpoints, including outbound connections. Start the recorded old image with matching configuration and secrets to separate recovery failures from upgrade failures.
The following SQLite restoration sequence uses a new directory. Restore the recorded runtime ownership before starting the application, without assuming a user or group ID. Open WebUI’s updating guide includes users, chats, configuration, uploads and generated content in its backup scope. Check those application functions after restoring. Sources: Open WebUI
RESTORE=/srv/openwebui-rehearsal/data
# This path must be new.
mkdir "$RESTORE"
tar -xzf "$BACKUP/data-files.tgz" -C "$RESTORE"
cp "$BACKUP/webui.db" "$RESTORE/webui.db"
sqlite3 "$RESTORE/webui.db" 'PRAGMA integrity_check;'- Compare recorded user and chat totals, then inspect selected historical records.
- Exercise ordinary-user and administrator login, plus the deployed single sign-on path.
- Open known chats and download known attachments, comparing attachment checksums.
- Record effective Admin settings and investigate differences from the original deployment.
Migrate once and verify the complete fleet
After baseline checks pass, stop the old rehearsal instance and start one target instance for migration. Open WebUI normally runs migrations automatically at startup. Its environment documentation specifies one migrating process with one UVICORN_WORKERS worker. Disable ENABLE_DB_MIGRATIONS on the remaining containers to prevent their migration attempts. Keep every old instance stopped because that setting does not resolve schema incompatibility. Sources: Open WebUI
Capture migration boundaries in startup logs before starting the remaining target instances. Verify image identity and startup evidence for every replica and worker, then repeat login, chat, attachment and integration checks. Do not accept one load-balanced request as proof that every backend passed. The release notes say saved OAuth connection settings load at startup, so changes to those settings require restarting every instance. Include that dependency in integration checks. Reopen traffic only after the complete fleet passes. Sources: Open WebUI
Verify persistent configuration and agent budgets
Make agent budgets explicit before accepting the deployment. The table below compares the new defaults with proposed starting values that preserve the former limits. These are continuity choices, not demonstrated optimal budgets or monetary caps. Use the following environment settings as the starting configuration. Sources: Open WebUI
Table
Agent defaults and proposed starting limits, in rounds, tasks and characters
| Setting | Previous default | 0.13.0 default | Proposed starting value |
|---|---|---|---|
| CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS | 256 | 1,024 | 256 |
| SUBAGENTS_MAX_CONCURRENT | 20 | Unlimited | 20 |
| SUBAGENTS_MAX_ASYNC | 20 | Unlimited | 20 |
| SUBAGENTS_MAX_ITERATIONS | 30 | Unlimited | 30 |
| SUBAGENTS_MAX_OUTPUT | 30,000 characters | Unlimited | 30,000 |
CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS=256
SUBAGENTS_MAX_CONCURRENT=20
SUBAGENTS_MAX_ASYNC=20
SUBAGENTS_MAX_ITERATIONS=30
SUBAGENTS_MAX_OUTPUT=30000Verify all four sub-agent values in Settings > Admin > Sub-agents because persistent configuration can override environment changes. Foreground concurrency changes require restart; background concurrency changes apply immediately. Both limits operate per worker: foreground overflow waits, while background overflow returns an error. Sources: Open WebUI
The startup-only parent-response limit counts native tool-call rounds, counting multiple calls in one round once. Sub-agent iterations override that limit. The output limit counts characters and truncates only the result returned to the parent. Use deterministic stub tools or provider responses where feasible to exercise these boundaries. Sources: Open WebUI
- At the proposed foreground limit of 20, hold delegations open and check whether another waits.
- At the proposed background limit of 20, hold delegations open and capture the next request’s rejection.
- Exercise the proposed boundaries of 30 child iterations and 256 parent native tool-call rounds.
- Return more than 30,000 characters and inspect parent truncation and the retained child result.
- Change foreground concurrency, compare behavior across restart, and distribute load across workers to check the per-worker limit. Sources: Open WebUI
Rehearse rollback and measure acceptance
Test rollback separately because reverting the image does not reverse database migrations. Stop the new deployment, prevent automatic restart and retain migrated storage for diagnosis. Restore the pre-upgrade database and matching files into another clean destination. Start the recorded old image with its configuration and secrets, then repeat baseline acceptance before reopening traffic. Sources: Open WebUI
Create a clearly identified rehearsal-only chat after migration and check whether rollback removes it. Restoring an earlier backup cannot recover later writes through that backup alone. Quantify that potential loss alongside recovery time before choosing the production window.
Record timestamps and command exit codes against the boundaries below. For each run, record source version, image digests, hardware and storage. Include database size, attachment volume, worker and replica counts, and cache state. Repeat from fresh restored copies and retain individual durations and their range. Use successful application acceptance as the recovery endpoint.
- Backup duration: writers stopped to verified backup complete.
- Restore duration: restoration begins to old-version acceptance passes.
- Migration duration: migration begins to migration completes.
- Upgrade outage: traffic closes to the verified new fleet reopening.
- Rollback recovery: rollback begins to the verified old fleet reopening.