System Requirements

Internet access is only required if you plan to connect with cloud-based Git services like GitHub, GitLab, or Bitbucket. For self-hosted Git tools within your network, external internet access is optional.

Deployment Process

Need help?

Schedule a call with our founder to get help with your deployment.

1. Domain Name Setup (Optional)

If you’re planning to integrate Kodus with cloud-based Git providers (GitHub, GitLab, or Bitbucket), you’ll need a domain name or fixed IP address. This allows your server to receive webhooks for proper Code Review functionality.

We recommend using a subdomain like kodus.yourdomain.com. After acquiring your domain, configure the DNS records to point to your server’s IP address.

Note: If you’re only connecting to self-hosted Git tools on your network, you can skip this step.

2. Get the Kodus Installer

Clone our installer repository:

git clone https://github.com/kodustech/kodus-installer.git
cd kodus-installer

3. Configure Environment Variables

First, copy the example environment file:

cp .env.example .env

Generate secure keys for the required environment variables using:

# For most security keys
openssl rand -base64 32

# Specifically for API_CRYPTO_KEY
openssl rand -hex 32

You’ll need to generate values for these security keys:

  • WEB_NEXTAUTH_SECRET (use openssl rand -base64 32)
  • WEB_JWT_SECRET_KEY (use openssl rand -base64 32)
  • API_CRYPTO_KEY (use openssl rand -hex 32)
  • API_JWT_SECRET (use openssl rand -base64 32)
  • API_JWT_REFRESHSECRET (use openssl rand -base64 32)

Never commit your .env file to version control. Keep your API keys and database credentials secure.

Then update your .env file with the following required variables:

# Core System Settings
WEB_NODE_ENV="self-hosted"                     # Keep as "self-hosted" for self-hosted setup
WEB_HOSTNAME_API="localhost"                   # API hostname
WEB_PORT_API=3001                              # API port
WEB_PORT=3000                                  # Web application port
GLOBAL_API_CONTAINER_NAME="kodus-orchestrator" # API container name


# Authentication Settings
NEXTAUTH_URL="http://localhost:3000"      # Base URL for authentication
WEB_NEXTAUTH_SECRET=""                        # NextAuth secret key (generate with: openssl rand -base64 32)
WEB_JWT_SECRET_KEY=""                         # JWT secret key (generate with: openssl rand -base64 32)

# API Configuration
API_NODE_ENV="development"                    # Keep as "development" for local setup
API_LOG_LEVEL=error                           # Error logging level
API_LOG_PRETTY=true                           # Pretty print logs
API_HOST=0.0.0.0                              # API host
API_PORT=3001                                 # API port
API_RATE_MAX_REQUEST=100                      # Rate limiting: max requests
API_RATE_INTERVAL=1000                        # Rate limiting: time window (ms)
API_CRYPTO_KEY=                               # Crypto key (generate with: openssl rand -hex 32)
API_JWT_EXPIRES_IN=365d                       # JWT token expiration time
API_JWT_SECRET=                               # JWT secret key
API_JWT_REFRESHSECRET=                        # JWT refresh token secret key
API_JWT_REFRESH_EXPIRES_IN=7d                 # JWT refresh token expiration time

# Database Configuration
API_DATABASE_ENV="development"                # Database environment
API_PG_DB_HOST=db_kodus_postgres              # PostgreSQL host
API_PG_DB_PORT=5432                          # PostgreSQL port
API_PG_DB_USERNAME=kodusdev                  # Database username
API_PG_DB_PASSWORD=                          # Database password
API_PG_DB_DATABASE=kodus_db                  # Database name

# MongoDB Configuration
API_MG_DB_HOST=db_kodus_mongodb              # MongoDB host
API_MG_DB_PORT=27017                         # MongoDB port
API_MG_DB_USERNAME=kodusdev                  # Database username
API_MG_DB_PASSWORD=                          # Database password
API_MG_DB_DATABASE=kodus_db                  # Database name

LLM Integration Settings

Configure your AI providers by adding the following variables:

# LLM API Keys
API_OPEN_AI_API_KEY=                          # OpenAI API key
API_GOOGLE_AI_API_KEY=                       # Google AI API key
API_ANTHROPIC_API_KEY=                       # Anthropic API key
API_NOVITA_AI_API_KEY=                       # Novita AI API key
API_VERTEX_AI_API_KEY=                       # Vertex AI API key

LLM API Keys Resources

When configuring your environment variables, you’ll need API keys for AI providers. Use these official resources:

Git Provider Configuration

Choose and configure your preferred Git provider. For basic token-based authentication, you only need to set the webhook URL:

For token-based authentication, you only need to configure the webhook URL. The other variables are required only if you want to use OAuth for authentication.

# Required for token-based authentication
API_GITHUB_CODE_MANAGEMENT_WEBHOOK=          # GitHub webhook URL

# Optional - Only needed if using OAuth
API_GITHUB_APP_ID=                           # GitHub App ID
API_GITHUB_CLIENT_SECRET=                    # GitHub App Client Secret
API_GITHUB_PRIVATE_KEY=""                    # GitHub App Private Key
WEB_GITHUB_INSTALL_URL=""                    # GitHub App Installation URL
WEB_OAUTH_GITHUB_CLIENT_ID=""                # GitHub OAuth Client ID
WEB_OAUTH_GITHUB_CLIENT_SECRET=""            # GitHub OAuth Client Secret
GLOBAL_GITHUB_CLIENT_ID=
GLOBAL_GITHUB_REDIRECT_URI=

Never commit your .env file to version control. Keep your API keys and database credentials secure.

4. Run the Installation Script

Looking for more control? Check out our docker-compose file for manual deployment options.

Set the proper permissions for the installation script:

chmod +x scripts/install.sh

Run the script:

./scripts/install.sh

.env variables that you need to change

  • KODUS_ORCHESTRATOR_API_URL: The URL of the Kodus Orchestrator API.
  • KODUS_WEB_APP_URL: The URL of the Kodus Web Application.
  • KODUS_GIT_PROVIDER: The Git provider you want to use.
  • KODUS_GIT_PROVIDER_API_KEY: The API key for the Git provider.

What the Installer Does

Our installer automates several important steps:

  • Verifies Docker installation
  • Creates networks for Kodus services
  • Clones repositories and configures environment files
  • Runs docker-compose to start all services
  • Executes database migrations
  • Seeds initial data

🎉 Success! When complete, Kodus Orchestrator API and Web Application should be running on your machine.

You can verify your installation by visiting http://localhost:3000 - you should see the Kodus Web Application interface.

Code Review features will not work yet unless you complete the reverse proxy setup. Without this configuration, external Git providers cannot send webhooks to your instance.

Setting Up a Reverse Proxy

To make your Kodus instance accessible from external systems (required for Code Review webhooks), you’ll need to configure a reverse proxy with Nginx.

Here’s a sample Nginx configuration:

server {
    listen 80;
    server_name kodus.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /api {
        proxy_pass http://localhost:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Save this configuration to /etc/nginx/sites-available/kodus and create a symbolic link to enable it:

sudo ln -s /etc/nginx/sites-available/kodus /etc/nginx/sites-enabled/
sudo nginx -t  # Test the configuration
sudo systemctl reload nginx  # Apply the changes

Post-Installation Guide

After successfully deploying Kodus on your VM, follow these steps to get the most out of your installation:

For production deployments, we strongly recommend setting up SSL with Let’s Encrypt:

# Install Certbot for Let's Encrypt
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx

# Obtain and install certificates
sudo certbot --nginx -d kodus.yourdomain.com

This will automatically configure your Nginx setup to use HTTPS and redirect HTTP traffic.

Completing Initial Setup

Once you access the web interface for the first time, you’ll need to:

  1. Create your admin account - This will be the first user with full system access
  2. Configure your Git provider - Connect GitHub, GitLab, or Bitbucket following the on-screen instructions
  3. Select repositories for analysis - Choose which code repositories Kody will review

For detailed steps on the initial configuration process, refer to our Getting Started Guide.

Updating Kodus

To update your Kodus installation to the latest version:

# Navigate to your Kodus installation directory
cd kodus-installer

# Pull the latest changes from the repository
git pull

# Pull the latest Docker images
docker-compose pull

# Restart the services with the new images
docker-compose up -d

Monitoring Your Installation

You can monitor your Kodus installation using the following tools:

# Check container status
docker-compose ps

# View real-time logs from all services
docker-compose logs -f

# Monitor system resource usage
docker stats

Accessing Service Logs

When troubleshooting or monitoring your Kodus installation, you may need to access service logs:

Troubleshooting Common Issues

Get help with our community

Join our community to get help with your deployment.