khoj-ai / khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (e.g gpt, claude, gemini, llama, qwen, mistral).
https://khoj.dev
GNU Affero General Public License v3.0
14.18k stars 705 forks source link

Using Khoj with the Postgres DB on Remote Server #588

Closed Yi-Lyu closed 10 months ago

Yi-Lyu commented 10 months ago

Question, if my Postgres database is deployed on a remote server, how should I configure the database configuration when deploying it myself?

sabaimran commented 10 months ago

Hi @Yi-Lyu , the Khoj application takes in the following environment variables:

POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_HOST

By setting these, you can configure the connection between your Khoj server and your remote DB. If you're using Docker, you can directly update the environment variables. If you're using the local code or pypi package directly, you can set them however you configure your environment variables in your CLI.