OpenWebUI: return an account-bearing DB to login-less instead of a sign-in wall (#70) - #71
Open
cdamken wants to merge 1 commit into
Open
OpenWebUI: return an account-bearing DB to login-less instead of a sign-in wall (#70)#71cdamken wants to merge 1 commit into
cdamken wants to merge 1 commit into
Conversation
…wall (v1.32.0) (#70) A pre-existing OpenWebUI DB kept auth on forever, so any new signup landed in 'pending' behind a sign-in wall, defeating chati's login-less default (which only applied to a fresh DB). ailocal now detects an account-bearing DB and returns it to login-less, automatically during 'upgrade webui' and on demand via a new 'ailocal reset webui'. Skipped when WEBUI_AUTH is set (real multi-user setups untouched) and non-destructive: the old DB moves to a timestamped login-reset-backup-* folder and 'ailocal restore' still applies. SearXNG web-search wiring unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Yakko: closes the root cause behind #70, where a returning user gets stuck on OpenWebUI's "Account Activation Pending / Contact Admin" wall.
Why
chati runs OpenWebUI login-less by default, but that only applies to a FRESH DB. Once a DB has accounts, OpenWebUI keeps auth on forever and refuses to turn it back off, so a new signup lands in
pending. A real Mac instance hit exactly this: the old account stopped working, a new one was created, and it went straight to the pending wall withadmin@localhostas the only admin.What
ai_local/ailocalgains a login-less recovery path:webui_db_user_count/webui_db_has_accountsdetect an account-bearing DB (via python3 stdlib sqlite3, read-only, no systemsqlite3binary needed).reset_webui_loginlessmoves the DB (webui.db+-wal/-shm) to a timestampedlogin-reset-backup-*folder so the next start comes up login-less. Never deletes.upgrade webui, right after the existing snapshot, so an update clears the stale sign-in state (this is the "next update fixes it" behavior);ailocal reset webui.WEBUI_AUTHis set on, so intentional multi-user setups are never touched.Safety
Non-destructive by construction: the DB is moved, not removed, and
upgradealready snapshots viacreate_backup(soailocal restorealso brings the old state back). This honors the 12.06.2026 data-loss incident.Tests
tests/run_tests.sh: newtest_webui_loginless_resetbuilds fixture DBs (with accounts / empty user table / missing file) and checks detection through an internal__webui-accountshook, plus thatreset webuiis documented and rejects a bad target. Full suite: 128 passed, 0 failed.Versions bumped: repo 1.31.0 → 1.32.0, ailocal 3.2.0 → 3.3.0. README badge + CHANGELOG updated.
Generic (not macOS-specific), so it belongs in the base and both forks inherit it via
git merge upstream/main.