mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #16132] [MERGED] feat: Implement SQLCipher support for database encryption #24042
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/16132
Author: @rndmcnlly
Created: 7/29/2025
Status: ✅ Merged
Merged: 8/9/2025
Merged by: @tjbck
Base:
dev← Head:feature/sqlcipher-database-encryption📝 Commits (2)
c9a4bc1feat: Implement SQLCipher support for database encryption414d026fix: swap sqlcipher dependency to sqlcipher3-wheels📊 Changes
5 files changed (+102 additions, -24 deletions)
View changed files
📝
backend/open_webui/env.py(+3 -0)📝
backend/open_webui/internal/db.py(+29 -1)📝
backend/open_webui/internal/wrappers.py(+38 -16)📝
backend/open_webui/migrations/env.py(+31 -7)📝
backend/requirements.txt(+1 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
By specifying
DATABASE_TYPEassqlite+sqlcipherand providing aDATABASE_PASSWORD, we get full-database encryption via SQLCipher. As an alternative to settingDATABASE_TYPE, a fullDATABASE_URLcan be used instead (but the key always comes fromDATABASE_PASSWORD).Changed
Behavior when
sqlite+sqlcipheris not mentioned is preserved.Deprecated
n/a
Removed
n/a
Fixed
n/a
Security
Breaking Changes
n/a
Additional Information
sqlcipher3package that set up an environmental dependency on build tools. After it was swapped for thesqlcipher3-wheelspackage, this is no longer the case.Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.