-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Bug Description
Setting USE_EMBEDDED_DB="true" does not switch Khoj to use SQLite when PostgreSQL was previously configured/connected.
Steps to Reproduce
- Install Khoj with PostgreSQL backend configured
- Run:
USE_EMBEDDED_DB="true" khoj --anonymous-mode - Khoj still attempts to connect to PostgreSQL instead of using embedded SQLite
Expected Behavior
When USE_EMBEDDED_DB="true" is set, Khoj should use the embedded SQLite database regardless of any existing PostgreSQL configuration.
Actual Behavior
Khoj ignores the environment variable and continues to use PostgreSQL, leading to errors if the PostgreSQL schema has issues.
Environment
- Khoj version: 1.42.10
- Python: 3.12.12
- OS: macOS (Darwin 25.2.0)
Additional Context
This was discovered while trying to work around issue #1244 (migration mismatch). Setting USE_EMBEDDED_DB="true" was attempted as a workaround but the env var was not respected.
The documentation at https://docs.khoj.dev/get-started/setup/ suggests this should work:
USE_EMBEDDED_DB="true" khoj --anonymous-mode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels