From 20429cb41b06047e6bede39233bca2b086d3b9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Wed, 11 Mar 2026 13:34:03 -0700 Subject: [PATCH] feat: migrate Open WebUI to PostgreSQL on glyph Configure Open WebUI to use the local PostgreSQL instance instead of SQLite for improved reliability and backup support. Co-Authored-By: Claude Opus 4.6 --- hosts/glyph/services/db.nix | 8 ++++++-- hosts/glyph/services/open-webui.nix | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hosts/glyph/services/db.nix b/hosts/glyph/services/db.nix index 21a22c95..45bb924a 100644 --- a/hosts/glyph/services/db.nix +++ b/hosts/glyph/services/db.nix @@ -12,12 +12,16 @@ port = 5432; max_connections = 150; }; - ensureDatabases = ["atticd" "pocketid"]; + ensureDatabases = ["atticd" "open-webui" "pocketid"]; ensureUsers = [ { name = "atticd"; ensureDBOwnership = true; } + { + name = "open-webui"; + ensureDBOwnership = true; + } { name = "pocketid"; ensureDBOwnership = true; @@ -27,6 +31,6 @@ services.postgresqlBackup = { enable = true; - databases = ["atticd" "pocketid"]; + databases = ["atticd" "open-webui" "pocketid"]; }; } diff --git a/hosts/glyph/services/open-webui.nix b/hosts/glyph/services/open-webui.nix index 40db00ef..59e1f49f 100644 --- a/hosts/glyph/services/open-webui.nix +++ b/hosts/glyph/services/open-webui.nix @@ -27,6 +27,7 @@ OAUTH_ALLOWED_ROLES = "users, admins"; OAUTH_ADMIN_ROLES = "admins"; ENABLE_LOGIN_FORM = "false"; + DATABASE_URL = "postgresql:///open-webui?host=/run/postgresql"; }; }; }