{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d621dea5-9c93-4a26-95d5-efe85e02b423",
    "slug": "khoj",
    "name": "Khoj | Open Source Personal AI Assistant",
    "description": "Self Host Khoj. AI second brain with document search and custom agents",
    "url": "https://railway.com/deploy/khoj",
    "upstream": {
      "image": "ghcr.io/khoj-ai/khoj-cloud:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "SearxNG",
      "source": {
        "image": "searxng/searxng:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Khoj",
      "source": {
        "image": "ghcr.io/khoj-ai/khoj-cloud:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.khoj",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "pgvector/pgvector:pg16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Terrarium",
      "source": {
        "image": "ghcr.io/khoj-ai/terrarium:latest"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "SEARXNG_BASE_URL",
      "service": "SearxNG",
      "description": "Internal base URL",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:8080/"
    },
    {
      "key": "PORT",
      "service": "Khoj",
      "description": "Gunicorn listening port",
      "secret": false,
      "strategy": "default",
      "default": "42110"
    },
    {
      "key": "KHOJ_DEBUG",
      "service": "Khoj",
      "description": "Production mode",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "KHOJ_DOMAIN",
      "service": "Khoj",
      "description": "Public domain for CSRF",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Khoj",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "khoj"
    },
    {
      "key": "RESEND_EMAIL",
      "service": "Khoj",
      "description": "Sender email for magic link delivery",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "KHOJ_NO_HTTPS",
      "service": "Khoj",
      "description": "Railway provides TLS termination",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "Khoj",
      "description": "Internal Postgres hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "Khoj",
      "description": "Database port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Khoj",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "RESEND_API_KEY",
      "service": "Khoj",
      "description": "Resend API key for magic link emails",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Khoj",
      "description": "Run as root for volume access",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "GUNICORN_WORKERS",
      "service": "Khoj",
      "description": "Worker count (reduce for 8GB)",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "KHOJ_ADMIN_EMAIL",
      "service": "Khoj",
      "description": "Admin account email",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "KHOJ_SEARXNG_URL",
      "service": "Khoj",
      "description": "Web search URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Khoj",
      "description": "Database password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KHOJ_TERRARIUM_URL",
      "service": "Khoj",
      "description": "Code sandbox URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KHOJ_ADMIN_PASSWORD",
      "service": "Khoj",
      "description": "Admin password (bootstrap-only)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KHOJ_DJANGO_SECRET_KEY",
      "service": "Khoj",
      "description": "Django session signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "KHOJ_TELEMETRY_DISABLE",
      "service": "Khoj",
      "description": "Disable telemetry",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database",
      "secret": false,
      "strategy": "default",
      "default": "khoj"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database superuser",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "khoj"
      }
    },
    "cli": "railway deploy --template khoj",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d621dea5-9c93-4a26-95d5-efe85e02b423",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0f61411c-294c-4bf2-99ab-0fe06b97ea6a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/searxng.svg",
                  "name": "SearxNG",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "searxng/searxng:latest"
                  },
                  "variables": {
                    "SEARXNG_BASE_URL": {
                      "isOptional": false,
                      "description": "Internal base URL",
                      "defaultValue": "http://localhost:8080/"
                    }
                  }
                },
                "2eb3b16c-6034-49e6-b160-11038d6eabe1": {
                  "icon": "https://avatars.githubusercontent.com/u/134046886?v=4",
                  "name": "Khoj",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "preDeployCommand": [
                      "python3 src/khoj/manage.py migrate --noinput"
                    ],
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/khoj-ai/khoj-cloud:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Gunicorn listening port",
                      "defaultValue": "42110"
                    },
                    "KHOJ_DEBUG": {
                      "isOptional": false,
                      "description": "Production mode",
                      "defaultValue": "False"
                    },
                    "KHOJ_DOMAIN": {
                      "isOptional": false,
                      "description": "Public domain for CSRF",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "khoj"
                    },
                    "RESEND_EMAIL": {
                      "description": "Sender email for magic link delivery",
                      "defaultValue": "{{RESEND_EMAIL}}"
                    },
                    "KHOJ_NO_HTTPS": {
                      "isOptional": false,
                      "description": "Railway provides TLS termination",
                      "defaultValue": "False"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Internal Postgres hostname",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "postgres"
                    },
                    "RESEND_API_KEY": {
                      "description": "Resend API key for magic link emails",
                      "defaultValue": "{{RESEND_API_KEY}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root for volume access",
                      "defaultValue": "0"
                    },
                    "GUNICORN_WORKERS": {
                      "isOptional": false,
                      "description": "Worker count (reduce for 8GB)",
                      "defaultValue": "2"
                    },
                    "KHOJ_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Admin account email",
                      "defaultValue": "{{KHOJ_ADMIN_EMAIL}}"
                    },
                    "KHOJ_SEARXNG_URL": {
                      "isOptional": false,
                      "description": "Web search URL",
                      "defaultValue": "http://${{SearxNG.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password reference",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "KHOJ_TERRARIUM_URL": {
                      "isOptional": false,
                      "description": "Code sandbox URL",
                      "defaultValue": "http://${{Terrarium.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "KHOJ_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Admin password (bootstrap-only)",
                      "defaultValue": "{{KHOJ_ADMIN_PASSWORD}}"
                    },
                    "KHOJ_DJANGO_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Django session signing key",
                      "defaultValue": "{{KHOJ_DJANGO_SECRET_KEY}}"
                    },
                    "KHOJ_TELEMETRY_DISABLE": {
                      "isOptional": false,
                      "description": "Disable telemetry",
                      "defaultValue": "True"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "2eb3b16c-6034-49e6-b160-11038d6eabe1": {
                      "mountPath": "/root/.khoj"
                    }
                  }
                },
                "5d527bf1-1536-454f-9ff3-07175039c4dc": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgres.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database",
                      "defaultValue": "khoj"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database superuser",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "5d527bf1-1536-454f-9ff3-07175039c4dc": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "a7823e95-d40d-46d4-a768-f5746cd39f3c": {
                  "icon": "https://res.cloudinary.com/asset-cloudinary/image/upload/v1777310664/khoj-logo_dwyiol.webp",
                  "name": "Terrarium",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/khoj-ai/terrarium:latest"
                  },
                  "variables": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T04:14:41.730Z",
  "generator_version": "0.1.0"
}
