Skip to main content

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:

Step-by-Step Installation

1

Clone the Repository

2

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.
3

Choose Setup Method

The wizard will ask you to choose:
Select based on your preference and requirements.
4

Verify Dependencies

The wizard checks for required tools:For Docker Setup:
  • Docker and Docker Compose
  • Git
For Manual Setup:
  • Python 3.11+
  • Node.js 18+
  • pnpm
  • uv (Python package installer)
  • Git
  • Docker (for Redis only)
Missing dependencies will be flagged. Install them before continuing.
5

Configure Supabase

Choose your Supabase setup:
6

Configure LLM Providers

Add API keys for your preferred LLM providers:
Get your key from: https://console.anthropic.com/
You can configure multiple providers and switch between them in the dashboard.
7

Configure Optional Integrations

The wizard will prompt for optional services:
Tavily Search APIFirecrawl API
  • 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.
8

Environment Generation

The wizard automatically generates configuration files:
Files created:
  • backend/.env - Backend API configuration
  • apps/frontend/.env - Frontend configuration
  • .setup_progress - Resume state (can be deleted after setup)
9

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
10

Install Dependencies

The wizard installs required packages:

Starting Kortix

After installation, use the service manager:

Service Manager Features

The start.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

Log files are created in the repository root.

Updating Configuration

To add or update API keys after installation:
The wizard offers options to:
  1. Add/Update API Keys - Modify existing configuration
  2. Clear setup and start fresh - Remove all configuration
Clearing setup will delete all .env files and progress state.

Architecture Deep Dive

Kortix consists of four main components:

1. Backend API (Port 8000)

Python/FastAPI service providing:
Key Features:
  • REST API endpoints
  • Thread management
  • Agent orchestration
  • LLM integration via LiteLLM
  • Tool execution
  • WebSocket streaming

2. Frontend Dashboard (Port 3000)

Next.js/React application:
Technologies:
  • 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

DNS Configuration

Docker setup uses optimized DNS:
This reduces DNS lookup latency for third-party API calls.

Security Best Practices

Critical Security Steps:
  1. Never commit .env files to version control
  2. Use strong database passwords
  3. Rotate API keys regularly
  4. Enable HTTPS in production
  5. Restrict network access to necessary ports
  6. Keep Docker images updated

Production Checklist

1

Environment Variables

  • Store secrets in a secure vault (e.g., AWS Secrets Manager)
  • Use separate credentials for production
  • Enable environment variable validation
2

Database Security

  • Enable Row Level Security (RLS) in Supabase
  • Use connection pooling
  • Configure backup retention
  • Enable audit logging
3

Network Security

  • Deploy behind a reverse proxy (nginx, Caddy)
  • Enable HTTPS with valid certificates
  • Configure CORS policies
  • Use VPC for internal services
4

Monitoring

  • Set up health checks
  • Configure alerting
  • Enable application logging
  • Monitor resource usage

Troubleshooting

Problem: Missing pydantic or rich packagesSolution:
Problem: Docker Compose not installedSolution:
Problem: Another service is using required portsSolution:
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
Problem: pnpm build errorsSolution:
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
For deployment to cloud platforms (AWS, GCP, Azure), see our Cloud Deployment Guide.