Overview
Kortix can be self-hosted using either Docker Compose (recommended) or manual installation. The automated setup wizard (setup.py) handles all configuration, from dependencies to database initialization.
System Requirements
Hardware
- CPU: 4+ cores recommended
- RAM: 8GB minimum, 16GB recommended
- Storage: 20GB+ free space
Software
- OS: Linux, macOS, or Windows (WSL2)
- Python: 3.11 or higher
- Node.js: 18.x or higher
- Docker: Latest version (for Docker setup)
Installation Methods
Choose between two setup methods:- Docker (Recommended)
- Manual
Docker Setup
The Docker setup runs all services in containers for isolation and easy management.Advantages:- Isolated environments
- Easy deployment and scaling
- Consistent across platforms
- Simple service management
- Redis (containerized)
- Backend API (containerized)
- Frontend (containerized)
- Agent runtime (containerized)
Currently, local Supabase is not supported with Docker Compose. Use cloud Supabase for Docker setups.
Step-by-Step Installation
Run the Setup Wizard
Launch the interactive setup wizard:The wizard automatically:
- Checks system dependencies
- Installs required Python packages (
pydantic,rich) - Guides you through configuration
- Saves progress for resumable setup
If interrupted, simply run
python setup.py again to resume from where you left off.Choose Setup Method
The wizard will ask you to choose:Select based on your preference and requirements.
Verify Dependencies
The wizard checks for required tools:For Docker Setup:
- Docker and Docker Compose
- Git
- Python 3.11+
- Node.js 18+
- pnpm
- uv (Python package installer)
- Git
- Docker (for Redis only)
Configure LLM Providers
Add API keys for your preferred LLM providers:Get your key from: https://console.anthropic.com/
- Anthropic (Claude)
- OpenAI
- Groq
- Together AI
Configure Optional Integrations
The wizard will prompt for optional services:
Search APIs
Search APIs
Tavily Search API
- Enables web search capabilities
- Get key from: https://tavily.com/
- Web scraping and crawling
- Get key from: https://firecrawl.dev/
RapidAPI
RapidAPI
- Access to various third-party APIs
- Get key from: https://rapidapi.com/
Composio
Composio
- Pre-built integrations for 200+ apps
- Get key from: https://app.composio.dev/
MCP Tools
MCP Tools
- Model Context Protocol integration
- Extend agents with custom tools
- Configure during setup or later
All integrations are optional. Skip any you don’t need and add them later.
Environment Generation
The wizard automatically generates configuration files:Files created:
backend/.env- Backend API configurationapps/frontend/.env- Frontend configuration.setup_progress- Resume state (can be deleted after setup)
Database Initialization
The wizard sets up the database schema:This creates all necessary tables for:
- User authentication
- Agent configurations
- Conversation threads
- File storage
- Workflow state
Starting Kortix
After installation, use the service manager:Service Manager Features
Thestart.py script automatically:
- Detects your setup method (Docker or Manual)
- Manages appropriate services
- Shows real-time status
- Handles graceful shutdown
- Provides log file locations
Monitoring and Logs
- Manual Setup
- Docker Setup
Updating Configuration
To add or update API keys after installation:- Add/Update API Keys - Modify existing configuration
- Clear setup and start fresh - Remove all configuration
Architecture Deep Dive
Kortix consists of four main components:1. Backend API (Port 8000)
Python/FastAPI service providing:- REST API endpoints
- Thread management
- Agent orchestration
- LLM integration via LiteLLM
- Tool execution
- WebSocket streaming
2. Frontend Dashboard (Port 3000)
Next.js/React application:- Next.js 14+
- React 18+
- Tailwind CSS
- Supabase Auth
3. Agent Runtime
Isolated Docker containers for each agent:4. Database & Storage
Supabase provides:Network Configuration
Default Ports
| Service | Port | Description |
|---|---|---|
| Frontend | 3000 | Web dashboard |
| Backend | 8000 | REST API |
| Redis | 6379 | Message queue |
| Supabase | 54321 | Local DB (manual only) |
DNS Configuration
Docker setup uses optimized DNS:Security Best Practices
Production Checklist
Environment Variables
- Store secrets in a secure vault (e.g., AWS Secrets Manager)
- Use separate credentials for production
- Enable environment variable validation
Database Security
- Enable Row Level Security (RLS) in Supabase
- Use connection pooling
- Configure backup retention
- Enable audit logging
Network Security
- Deploy behind a reverse proxy (nginx, Caddy)
- Enable HTTPS with valid certificates
- Configure CORS policies
- Use VPC for internal services
Troubleshooting
Setup wizard fails to install dependencies
Setup wizard fails to install dependencies
Problem: Missing
pydantic or rich packagesSolution:Docker Compose command not found
Docker Compose command not found
Problem: Docker Compose not installedSolution:
Port conflicts (3000 or 8000 already in use)
Port conflicts (3000 or 8000 already in use)
Problem: Another service is using required portsSolution:
Database connection errors
Database connection errors
Problem: Cannot connect to SupabaseSolution:
- Verify credentials in
backend/.env - Check network connectivity
- For local Supabase:
npx supabase status - For cloud: verify project is active
- Check firewall rules
Frontend build fails
Frontend build fails
Problem: pnpm build errorsSolution:
Backend API errors
Backend API errors
Problem: 500 errors from backendSolution:
Uninstalling
To completely remove Kortix:Next Steps
Configuration Guide
Deep dive into environment variables and settings
Deploy to Production
Production deployment best practices
API Reference
Explore the complete REST API
Agent Development
Start building custom agents