Transform your VPS into a powerful AI-powered second brain with Khoj's advanced document search, chat capabilities, and automation features.
Khoj AI is an open-source, self-hostable AI assistant that acts as your "AI second brain," providing advanced features like document search, web integration, custom agents, and automation capabilities. Unlike cloud-hosted AI services, self-hosting provides unmatched privacy, customization, and control over your data.
Search your personal files and the internet with support for PDFs, Markdown, Word documents, and more to get accurate answers from your knowledge base.
Connect to various AI models including OpenAI GPT, Anthropic Claude, Google Gemini, and local models via Ollama for maximum flexibility.
Create specialized agents tailored to your specific needs and workflows with personalized knowledge bases and tools.
Use it through a web browser, desktop app, mobile, or integrate it with tools like Obsidian and WhatsApp.
We recommend the 4GB Standard Cloud VPS plan for optimal Khoj AI performance:
Connect to your RamNode VPS via SSH and ensure the system is updated:
Docker provides better isolation and easier management for Khoj deployment
Edit the docker-compose.yml file to configure your Khoj instance
Key configurations to modify:
Generate a strong secret key using:
Monitor the startup process:
Open your browser and navigate to:
Admin panel access:
Set up Nginx with SSL for production deployments (recommended)
Install Nginx and Certbot:
Create Nginx configuration:
Add this configuration:
Enable site and get SSL certificate:
By default, self-hosted Khoj runs in anonymous mode, but you can enable authentication with Magic Links or Google OAuth. For multi-user environments, configure authentication in the admin panel at /server/admin.
Start using Khoj immediately by uploading documents through the web interface:
http://your-vps-ip:42110For continuous document sync, consider:
For enhanced privacy and reduced API costs, set up local AI models with Ollama
Update your docker-compose.yml to use local models by uncommenting the OPENAI_BASE_URL setting.
If Khoj errors out with "Killed" messages, increase RAM available to Docker containers. For VPS deployments, ensure you have adequate memory allocated (4GB minimum, 8GB recommended).
If you can't access Khoj remotely:
For HTTPS access problems:
Get started with RamNode's high-performance VPS hosting