An Unraid-first, single-container deployment of Khoj for people who want the easiest reliable self-hosted install without manually wiring PostgreSQL or reworking the upstream compose stack for Unraid.
khoj-aio keeps the critical first-boot dependency bundled: PostgreSQL with pgvector. The wrapper is opinionated for a predictable beginner install, but it does not hide the real tradeoffs: remote exposure still needs correct auth and domain settings, operator/computer features carry meaningful security implications, and advanced search/sandbox/provider integrations still consume real resources.
Optionally set KHOJ_ADMIN_EMAIL, KHOJ_ADMIN_PASSWORD, and KHOJ_DJANGO_SECRET_KEY.
Leave KHOJ_ANONYMOUS_MODE=true for the default private single-user flow.
Start the container and wait for first-boot initialization to complete.
Open the web UI on port 42110.
Restart the container once after the initial setup so all settings are fully applied.
If you leave the admin password or Django secret blank, the wrapper generates secure values and writes them to /root/.khoj/aio/generated.env inside your mapped config path.
This repo is deliberately not a stripped-down wrapper. The template now tracks the practical self-hosted environment surface exposed by upstream source and docs, plus AIO-specific controls for the bundled database flow. In Advanced View you can:
move PostgreSQL out of the container with the standard POSTGRES_* settings
point Khoj at OpenAI, Anthropic, Gemini, Ollama, LM Studio, LiteLLM, vLLM, or other OpenAI-compatible endpoints
configure SearxNG, Serper, Google Search, Firecrawl, Olostep, or Exa for search and webpage reading
enable Terrarium or E2B code execution
tune operator/computer behavior and optionally mount the Docker socket for that path
configure Resend, Google auth, Notion OAuth, Twilio, and AWS-backed upload storage
expose runtime tuning knobs like Gunicorn worker/timeouts and research iteration limits
The wrapper still defaults to the internal bundled database and a minimal beginner-safe install path so new Unraid users are not forced into extra containers on day one.
Upstream Khoj releases are currently tagged as beta releases. This wrapper tracks the latest published production-facing release line rather than floating latest.
The internal PostgreSQL service is bound to loopback inside the container and now uses a generated per-install password instead of a fixed hardcoded credential.
The bundled database user is no longer created as a PostgreSQL superuser; the wrapper creates the vector extension as postgres during initialization instead.
Search, webpage-reading, and code-execution integrations are intentionally optional. The AIO image does not currently bundle SearxNG or Terrarium by default because that would materially increase resource cost and attack surface for all users.
If you expose Khoj beyond your LAN, you should set strong credentials, set KHOJ_DOMAIN and KHOJ_ALLOWED_DOMAIN correctly, and strongly consider disabling anonymous mode.
The Unraid template <Changes> block is synced from CHANGELOG.md during release preparation.
main publishes latest, the pinned upstream version tag, an explicit AIO packaging line tag, and sha-<commit>.
When Docker Hub credentials are configured, the same publish flow pushes Docker Hub tags in parallel with GHCR so the CA template can read Docker Hub metadata.