{
  "schema_version": 1,
  "generated_at": "2026-10-22T00:00:00.000Z",
  "canonical_url": "https://openlogs.fyi/tools/khoj",
  "slug": "khoj",
  "name": "Khoj",
  "tagline": "Personal AI assistant that answers from the web and your own documents.",
  "replaces": {
    "summary": "Paid AI assistant services, such as ChatGPT.",
    "products": [
      {
        "slug": "chatgpt",
        "name": "ChatGPT",
        "vendor": "OpenAI",
        "url": "https://openlogs.fyi/alternatives/chatgpt"
      }
    ]
  },
  "stack": [
    {
      "kind": "language",
      "name": "Python"
    }
  ],
  "deployment_methods": [
    "docker_compose"
  ],
  "requirements": {
    "min_ram_mb": null,
    "min_cpu_cores": null,
    "source_url": null
  },
  "license": {
    "spdx": "AGPL-3.0",
    "class": "osi",
    "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/LICENSE"
  },
  "business_model": {
    "value": "unknown",
    "notes": "The README at the pinned commit does not state a business model, so it stays unknown.",
    "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/README.md",
    "checked_at": "2026-10-22"
  },
  "difficulty": {
    "value": "medium",
    "reason": "5 services (1 database or broker: pgvector), 6 volume mounts, no env values to set, no elevated host access. Heuristic score 5 of 11: medium."
  },
  "repository": {
    "owner": "khoj-ai",
    "name": "khoj",
    "url": "https://github.com/khoj-ai/khoj"
  },
  "compose_check": {
    "status": "config_ok",
    "validated_at": "2026-10-22",
    "summary": "config_ok on 2026-10-22"
  },
  "recipe": {
    "version": 1,
    "source_path": "docker-compose.yml",
    "source_repo": "khoj-ai/khoj",
    "source_commit_sha": "ae229ca894c0b80ad84664afcfdde523b5e87057",
    "source_kind": "app_repo",
    "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml"
  },
  "install_steps": [
    {
      "order": 1,
      "kind": "prerequisite",
      "language": "text",
      "label": "Docker with the Compose plugin",
      "body": "A host with Docker and the Docker Compose plugin. This entry runs from a compose file.",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "validation_status": "unvalidated"
    },
    {
      "order": 2,
      "kind": "compose",
      "language": "yaml",
      "label": "Save the compose file as docker-compose.yml",
      "body": "services:\n  database:\n    image: docker.io/pgvector/pgvector:pg15\n    environment:\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: postgres\n      POSTGRES_DB: postgres\n    volumes:\n      - khoj_db:/var/lib/postgresql/data/\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U postgres\"]\n      interval: 30s\n      timeout: 10s\n      retries: 5\n  sandbox:\n    image: ghcr.io/khoj-ai/terrarium:latest\n    healthcheck:\n      test: [\"CMD-SHELL\", \"curl -f http://localhost:8080/health\"]\n      interval: 30s\n      timeout: 10s\n      retries: 2\n  search:\n    image: docker.io/searxng/searxng:latest\n    volumes:\n      - khoj_search:/etc/searxng\n    environment:\n      - SEARXNG_BASE_URL=http://localhost:8080/\n  # Creates Computer for Khoj to use.\n  # Set KHOJ_OPERATOR_ENABLED=True in the server service environment variable to enable.\n  computer:\n    container_name: khoj-computer\n    image: ghcr.io/khoj-ai/khoj-computer:latest\n    # build:\n    #   context: .\n    #   dockerfile: computer.Dockerfile\n    ports:\n      - \"5900:5900\"\n    volumes:\n      - khoj_computer:/home/operator\n  server:\n    depends_on:\n      database:\n        condition: service_healthy\n    # Use the following line to use the latest version of khoj. Otherwise, it will build from source. Set this to ghcr.io/khoj-ai/khoj-cloud:latest if you want to use the prod image.\n    image: ghcr.io/khoj-ai/khoj:latest\n    # Uncomment the following line to build from source. This will take a few minutes. Comment the next two lines out if you want to use the official image.\n    # build:\n      # context: .\n    ports:\n      # If changing the local port (left hand side), no other changes required.\n      # If changing the remote port (right hand side),\n      #   change the port in the args in the build section,\n      #   as well as the port in the command section to match\n      - \"42110:42110\"\n    extra_hosts:\n      - \"host.docker.internal:host-gateway\"\n    working_dir: /app\n    volumes:\n      - khoj_config:/root/.khoj/\n      - khoj_models:/root/.cache/torch/sentence_transformers\n      - khoj_models:/root/.cache/huggingface\n      # uncomment line below to mount docker socket to allow khoj to use its computer.\n      # - /var/run/docker.sock:/var/run/docker.sock\n    # Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/\n    environment:\n      - POSTGRES_DB=postgres\n      - POSTGRES_USER=postgres\n      - POSTGRES_PASSWORD=postgres\n      - POSTGRES_HOST=database\n      - POSTGRES_PORT=5432\n      - KHOJ_DJANGO_SECRET_KEY=secret\n      - KHOJ_DEBUG=False\n      - KHOJ_ADMIN_EMAIL=username@example.com\n      - KHOJ_ADMIN_PASSWORD=password\n      # Default URL of Terrarium, the default Python sandbox used by Khoj to run code. Its container is specified above\n      - KHOJ_TERRARIUM_URL=http://sandbox:8080\n      # Uncomment line below to have Khoj run code in remote E2B code sandbox instead of the self-hosted Terrarium sandbox above. Get your E2B API key from https://e2b.dev/.\n      # - E2B_API_KEY=your_e2b_api_key\n      # Default URL of SearxNG, the default web search engine used by Khoj. Its container is specified above\n      - KHOJ_SEARXNG_URL=http://search:8080\n      # Uncomment line below to use with Ollama running on your local machine at localhost:11434.\n      # Change URL to use with other OpenAI API compatible providers like VLLM, LMStudio, DeepInfra, DeepSeek etc.\n      # - OPENAI_BASE_URL=http://host.docker.internal:11434/v1/\n      # - KHOJ_DEFAULT_CHAT_MODEL=qwen3\n      #\n      # Uncomment appropriate lines below to use chat models by OpenAI, Anthropic, Google.\n      # Ensure you set your provider specific API keys.\n      # ---\n      # - OPENAI_API_KEY=your_openai_api_key\n      # - GEMINI_API_KEY=your_gemini_api_key\n      # - ANTHROPIC_API_KEY=your_anthropic_api_key\n      #\n      # Uncomment line below to enable Khoj to use its computer.\n      # - KHOJ_OPERATOR_ENABLED=True\n      # Uncomment appropriate lines below to enable web results with Khoj\n      # Ensure you set your provider specific API keys.\n      # ---\n      # Paid, Fast API. Only does web search. Get API key from https://serper.dev/\n      # - SERPER_DEV_API_KEY=your_serper_dev_api_key\n      # Paid, Higher Read Success API. Only does webpage read. Get API key from https://olostep.com/\n      # - OLOSTEP_API_KEY=your_olostep_api_key\n      # Paid, Open API. Does both web search and webpage read. Get API key from https://firecrawl.dev/\n      # - FIRECRAWL_API_KEY=your_firecrawl_api_key\n      # Paid, Fast API. Does both web search and webpage read. Get API key from https://exa.ai/\n      # - EXA_API_KEY=your_exa_api_key\n      #\n      # Uncomment the necessary lines below to make your instance publicly accessible.\n      # Proceed with caution, especially if you are using anonymous mode.\n      # ---\n      # - KHOJ_NO_HTTPS=True\n      # Replace the KHOJ_DOMAIN with the server's externally accessible domain or I.P address from a remote machie (no http/https prefix).\n      # Ensure this is set correctly to avoid CSRF trusted origin or unset cookie issue when trying to access the admin panel.\n      # - KHOJ_DOMAIN=192.168.0.104\n      # - KHOJ_DOMAIN=khoj.example.com\n      # Replace the KHOJ_ALLOWED_DOMAIN with the server's internally accessible domain or I.P address on the host machine (no http/https prefix).\n      # Only set if using a load balancer/reverse_proxy in front of your Khoj server. If unset, it defaults to KHOJ_DOMAIN.\n      # For example, if the load balancer service is added to the khoj docker network, set KHOJ_ALLOWED_DOMAIN to khoj's docker service name: `server'.\n      # - KHOJ_ALLOWED_DOMAIN=server\n      # - KHOJ_ALLOWED_DOMAIN=127.0.0.1\n      # Uncomment the line below to disable telemetry.\n      # Telemetry helps us prioritize feature development and understand how people are using Khoj\n      # Read more at https://docs.khoj.dev/miscellaneous/telemetry\n      # - KHOJ_TELEMETRY_DISABLE=True\n    # Comment out this line when you're using the official ghcr.io/khoj-ai/khoj-cloud:latest prod image.\n    command: --host=\"0.0.0.0\" --port=42110 -vv --anonymous-mode --non-interactive\n\nvolumes:\n  khoj_config:\n  khoj_db:\n  khoj_models:\n  khoj_search:\n  khoj_computer:\n",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "validation_status": "config_ok"
    },
    {
      "order": 3,
      "kind": "env",
      "language": "text",
      "label": "Set the values the compose file needs",
      "body": "Replace the placeholder values listed under Gotchas.",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "validation_status": "unvalidated"
    },
    {
      "order": 4,
      "kind": "shell",
      "language": "bash",
      "label": "Start it",
      "body": "docker compose up -d",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "validation_status": "unvalidated"
    },
    {
      "order": 5,
      "kind": "verify",
      "language": "text",
      "label": "Open the app",
      "body": "Open http://localhost:42110. The compose file publishes host port 42110 for the server service.",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "validation_status": "unvalidated"
    }
  ],
  "notes": [
    {
      "kind": "gotcha",
      "title": "Some images use the latest tag or no tag",
      "body": "Images without a pinned version: sandbox: ghcr.io/khoj-ai/terrarium:latest, search: docker.io/searxng/searxng:latest, computer: ghcr.io/khoj-ai/khoj-computer:latest, server: ghcr.io/khoj-ai/khoj:latest. A later pull can get a different version.",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "checked_at": "2026-10-22"
    },
    {
      "kind": "gotcha",
      "title": "The compose file has placeholder values",
      "body": "Placeholder values: KHOJ_DJANGO_SECRET_KEY is \"secret\" (server), KHOJ_ADMIN_PASSWORD is \"password\" (server).",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "checked_at": "2026-10-22"
    },
    {
      "kind": "gotcha",
      "title": "The compose file publishes host ports",
      "body": "Host ports: 5900 (computer), 42110 (server). A port without a host address listens on all host network interfaces.",
      "source_url": "https://github.com/khoj-ai/khoj/blob/ae229ca894c0b80ad84664afcfdde523b5e87057/docker-compose.yml",
      "checked_at": "2026-10-22"
    }
  ],
  "signals": {
    "captured_at": "2026-10-22",
    "stars": 37784,
    "forks": 2524,
    "open_issues": 167,
    "last_push": "2026-08-02",
    "days_since_push": 80,
    "latest_release": "2.0.0-beta.28",
    "latest_release_date": "2026-03-26",
    "days_since_release": 209
  },
  "links": {
    "html": "https://openlogs.fyi/tools/khoj",
    "markdown": "https://openlogs.fyi/tools/khoj.md",
    "json": "https://openlogs.fyi/tools/khoj.json"
  },
  "updated_at": "2026-10-22"
}
