Skip to content

Use embedded postgres db to simplify self-hosted setup #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

debanjum
Copy link
Member

@debanjum debanjum commented Mar 27, 2025

Use pgserver python package as an embedded postgres db, installed directly as a khoj python package dependency.

This significantly simplifies self-hosting setup with just a pip install khoj. No need to also install postgres separately.

Still use standard postgres server for multi-user, production use-cases.

@debanjum debanjum requested a review from sabaimran March 27, 2025 20:53
@debanjum debanjum changed the title Use embedded postgres db to simplify self-hosted setup significantly Use embedded postgres db to simplify self-hosted setup Mar 27, 2025
Copy link
Member

@sabaimran sabaimran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be SO COOL for self-hosted users. No more Docker setup since Postgres install may not be an issue. Good find! 🎉

I'm trying to set it up locally but it seems to be hanging. Leaving code-only review until I can get it working locally.

EDIT: got it working. Sweet!

@debanjum debanjum force-pushed the use-embbedded-pg-to-simplify-selfhosting branch from 640745f to aa97c78 Compare March 28, 2025 03:39
@debanjum debanjum force-pushed the use-embbedded-pg-to-simplify-selfhosting branch 3 times, most recently from 9f4fab0 to 814e59a Compare March 28, 2025 18:31
Use pgserver python package as an embedded postgres db, installed
directly as a khoj python package dependency.

This significantly simplifies self-hosting with just a
`pip install khoj'. No need to also install postgres separately.

Still use standard postgres server for multi-user, production
use-cases.
@debanjum debanjum force-pushed the use-embbedded-pg-to-simplify-selfhosting branch from 814e59a to c07ea0b Compare March 28, 2025 18:33
@debanjum debanjum merged commit 5ee5137 into master Mar 28, 2025
9 checks passed
@debanjum debanjum deleted the use-embbedded-pg-to-simplify-selfhosting branch March 28, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants