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

git clone https://github.com/kortix-ai/suna.git
cd suna
2

Run the Setup Wizard

Launch the interactive setup wizard:
python setup.py
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:
How would you like to set up Kortix?
  [1] Docker - Run all services in containers (recommended)
  [2] Manual - Run services natively on your system
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:
How would you like to set up Supabase?
  [1] Use Kortix Cloud Supabase (easiest)
  [2] Use your own cloud Supabase
  [3] Use local Supabase (manual setup only)
# Uses pre-configured staging Supabase
# No additional setup required
# Recommended for quick start
6

Configure LLM Providers

Add API keys for your preferred LLM providers:
Enter your Anthropic API key: sk-ant-...
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:
✓ Writing backend/.env
✓ Writing apps/frontend/.env
✓ Validating configuration
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:
✓ Connecting to Supabase
✓ Creating tables
✓ Running migrations
✓ Setting up authentication
This creates all necessary tables for:
  • User authentication
  • Agent configurations
  • Conversation threads
  • File storage
  • Workflow state
10

Install Dependencies

The wizard installs required packages:
 Building Docker images
 Pulling base images
 Installing dependencies in containers

Starting Kortix

After installation, use the service manager:
python start.py

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
# Redis (Docker container)
docker compose up -d redis

# Backend (native process)
cd backend && uv run api.py

# Frontend (native process) 
cd apps/frontend && pnpm run dev

Monitoring and Logs

# View both backend and frontend logs
tail -f backend.log frontend.log

# View backend only
tail -f backend.log

# View frontend only
tail -f frontend.log
Log files are created in the repository root.

Updating Configuration

To add or update API keys after installation:
python setup.py
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:
# Core API modules
- /v1/agents      # Agent management
- /v1/threads     # Conversation threads
- /v1/runs        # Agent executions
- /v1/tools       # Tool registry
- /v1/mcp         # MCP integration
- /v1/knowledge   # Knowledge bases
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:
// Main features
- Chat interface
- Agent builder
- Workflow designer
- Monitoring dashboard
- Settings management
Technologies:
  • Next.js 14+
  • React 18+
  • Tailwind CSS
  • Supabase Auth

3. Agent Runtime

Isolated Docker containers for each agent:
services:
  agent-runtime:
    image: kortix-agent-runtime
    features:
      - Browser automation (Playwright)
      - Code interpreter (Python)
      - File system access
      - Tool integration
      - Security sandboxing

4. Database & Storage

Supabase provides:
-- Core tables
users                 -- User accounts
agents                -- Agent configurations  
threads               -- Conversation threads
messages              -- Chat messages
runs                  -- Execution records
tools                 -- Available tools
knowledge_bases       -- Agent knowledge

Network Configuration

Default Ports

ServicePortDescription
Frontend3000Web dashboard
Backend8000REST API
Redis6379Message queue
Supabase54321Local DB (manual only)

DNS Configuration

Docker setup uses optimized DNS:
# docker-compose.yaml
dns:
  - 8.8.8.8      # Google DNS
  - 1.1.1.1      # Cloudflare DNS
dns_search:
  - .
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:
# Manual installation
pip install pydantic rich

# Or with uv
uv pip install pydantic rich

# Then re-run setup
python setup.py
Problem: Docker Compose not installedSolution:
# For Docker Desktop (Mac/Windows)
# Install from docker.com

# For Linux
sudo apt-get install docker-compose-plugin

# Verify installation
docker compose version
Problem: Another service is using required portsSolution:
# Find process using port 3000
lsof -i :3000

# Kill the process
kill -9 <PID>

# Or modify ports in docker-compose.yaml
ports:
  - "3001:3000"  # Map to different host port
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:
# Clear cache and reinstall
cd apps/frontend
rm -rf node_modules .next
pnpm install
pnpm run build

# If still failing, check Node version
node --version  # Should be 18+
Problem: 500 errors from backendSolution:
# Check backend logs
tail -f backend.log

# Or for Docker
docker compose logs backend

# Common issues:
# - Missing API keys in .env
# - Invalid Supabase credentials
# - Redis not running

Uninstalling

To completely remove Kortix:
# Stop and remove all services
docker compose down -v

# Remove images
docker rmi $(docker images 'ghcr.io/suna-ai/*' -q)

# Delete repository
cd ..
rm -rf suna

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.

Build docs developers (and LLMs) love