diff --git a/docs/setup.md b/docs/setup.md index ec60a3d3..ce948a0e 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -123,6 +123,40 @@ python -m pip install khoj-assistant ##### Local Server Start +Before getting started, configure the following environment variables in your terminal for the first run + + + +#### **MacOS** + +```shell +export KHOJ_ADMIN_EMAIL= +export KHOJ_ADMIN_PASSWORD= +``` + +#### **Windows** + +If you're using PowerShell: +```shell +$env:KHOJ_ADMIN_EMAIL="" +$env:KHOJ_ADMIN_PASSWORD="" +``` + +If you're using a Unix shell: +```shell +export KHOJ_ADMIN_EMAIL="" +export KHOJ_ADMIN_PASSWORD="" +``` + +#### **Linux** + +```shell +export KHOJ_ADMIN_EMAIL= +export KHOJ_ADMIN_PASSWORD= +``` + + + Run the following command from your terminal to start the Khoj backend and open Khoj in your browser. ```shell diff --git a/src/khoj/app/settings.py b/src/khoj/app/settings.py index 39af3d7a..2b86e5cc 100644 --- a/src/khoj/app/settings.py +++ b/src/khoj/app/settings.py @@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.getenv("KHOJ_DJANGO_SECRET_KEY") +SECRET_KEY = os.getenv("KHOJ_DJANGO_SECRET_KEY", "!secret") # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.getenv("KHOJ_DEBUG") == "True"