Skip to main content

System Requirements

  • Docker (latest stable) with the Compose plugin
  • Domain name or fixed IP if you want to receive Git webhooks from cloud providers (GitHub.com, GitLab.com, etc.)
Published on the host by the installer's Compose file.
  • 3000 — Kodus Web App (WEB_PORT)
  • 3001 — API
  • 3332 — Webhooks (API_WEBHOOKS_PORT)
  • 3101 — MCP Manager (API_MCP_MANAGER_PORT), only if API_MCP_SERVER_ENABLED=true
  • 15692 — RabbitMQ Prometheus metrics
PostgreSQL (5432), MongoDB (27017) and RabbitMQ (5672 AMQP, 15672 management UI) are published on random host ports. Containers reach them over the Docker networks; run docker compose port <service> <port> to find the host port.
What ./scripts/install.sh brings up, based on your .env.Core (always on):
  • api — main backend
  • worker — code-review jobs
  • webhooks — Git provider webhook receiver
  • kodus-web — Next.js frontend
  • db_kodus_postgres, db_kodus_mongodb, rabbitmq — local infrastructure. Set USE_LOCAL_DB=false / USE_LOCAL_RABBITMQ=false to point at managed instances. The containers still start as dependencies, but Kodus does not use them.
Optional:
  • kodus-mcp-manager — Model Context Protocol broker. Enable with API_MCP_SERVER_ENABLED=true. See MCP Manager.
  • worker-analytics — Cockpit ingestion (DORA metrics, PR classifier). Self-hosted Enterprise only. Behind the analytics Compose profile, so the installer does not start it. See Analytics Worker.
Code review uses an AST graph + cross-file context that runs in a sandbox — local (default, runs inside the worker) or e2b (paid remote sandbox). See Sandbox & AST Graph for the modes, caching behavior, and when to pick each.
Install-time images must be available from their registries or mirrors, or already loaded on the host. For an internal deployment, use Git and model endpoints reachable on your network. Optional external services need access to their own endpoints.

Domain Name Setup (Optional)

Your Git provider must be able to reach the webhook URL over HTTPS. The installer requires at least one HTTPS webhook URL, including when both Kodus and Git run on a private network. The web app must be reachable by its users and by their browsers when they return from sign-in or a Git provider. We recommend setting up two subdomains:
  • One for the Web Application, e.g., kodus-web.yourdomain.com.
  • One for the API, e.g., kodus-api.yourdomain.com.
Webhooks are handled by a separate service (port 3332). You can either:
  • Use a dedicated webhooks subdomain, e.g., kodus-webhooks.yourdomain.com, or
  • Keep using the API domain and route /github/webhook, /gitlab/webhook, etc. to the webhooks service in your reverse proxy.
Both subdomains should have DNS A records pointing to your server's IP address. The reverse proxy routes each subdomain to the right internal service.

Setup

1

Clone the installer repository

2

Copy the example environment file

3

Generate secure keys for the required environment variables

Run it once, before the first install. Running it again replaces every secret in .env, including the database passwords and API_CRYPTO_KEY, and the existing data stops working.
4

Edit the environment file

Edit .env with your values using your preferred text editor.
Add IMAGE_TAG=<version> to pin the release you install, for example IMAGE_TAG=2.2.11. Without it the installer uses latest. Release versions are listed on the kodus-ai releases page as Self-Hosted Release.See Environment Variables Configuration for detailed instructions.
5

Run the installer

validate-env.sh checks .env against the schema. install.sh refuses to start until the required variables are set and at least one Git webhook URL is valid. The api container runs database migrations and seeds when it starts.
6

Verify the installation

When the installer finishes, the services are running. Check them with:
The first line says whether reviews are running. Each problem after it lists what you lose and how to fix it. Add --verbose to see every check.
7

Access the web interface

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. Connect an LLM provider - Kodus is bring-your-own-key, and no review runs without a model. Open AI providers in the sidebar, or set the model in .env (see LLM Provider Configuration)
  3. Configure your Git provider - Connect GitHub, GitLab, Bitbucket, Azure DevOps or Forgejo following the on-screen instructions
  4. 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.

Environment Variables Configuration

Use this section to fill your .env. Start with the public URLs, then set up the LLM provider, databases and RabbitMQ, and finally add provider-specific settings. ./scripts/generate-secrets.sh already filled the secrets.

Public URLs

These settings tell Kodus where it is reachable. Replace the example domains with yours.
With the default WEB_HOSTNAME_API=localhost, the web app resolves the API through GLOBAL_API_CONTAINER_NAME (kodus_api in the installer).The browser talks to the web app, and the web app’s server calls the API. When WEB_PORT_API is set, the web app calls http://<WEB_HOSTNAME_API>:<WEB_PORT_API>, so it must be a plain HTTP address that the web container can reach. Do not set it to a public HTTPS address with port 443. install.sh warns when WEB_HOSTNAME_API is localhost. You can ignore that warning: Git providers reach Kodus through the webhook URLs below, not through this variable.

LLM Provider Configuration

Kodus runs reviews with your own model. Choose one way to connect it:
  • In the app (recommended). Open AI providers in the sidebar, connect a provider with your key and route models to tasks. See BYOK. A model connected there overrides the one set in .env.
  • In .env. One model for the whole instance. Declare the provider, the model and the key:
If API_LLM_PROVIDER is empty, Kodus guesses the provider from the model name and the keys that are set. The AI providers page shows which model the environment configures and any problem with it. Provider guides with ready-made values: Chutes, Fireworks, Groq, Moonshot, Novita, Synthetic, Together and Z.AI.

Apply a model change

After editing the LLM variables on an existing Docker Compose deployment, run the installer again from kodus-installer to apply the values. Then check the model with the doctor script.

Database configuration

By default the installer starts PostgreSQL and MongoDB containers. The defaults in .env.example work as they are; generate-secrets.sh sets the passwords.
For bundled databases, leave API_PG_DB_PASSWORD and API_MG_DB_PASSWORD blank and run ./scripts/generate-secrets.sh once to generate them, or set your own. For external databases, use the existing database’s password.
To use your own PostgreSQL or MongoDB, set USE_LOCAL_DB=false and point the API_PG_DB_* and API_MG_DB_* variables at them. The local containers still start, because the Kodus services depend on them in the installer’s docker-compose.yml, but Kodus does not use them. Your PostgreSQL needs the vector (pgvector) extension, and the Kodus user must be able to create schemas. For a managed PostgreSQL that enforces TLS, set API_DATABASE_DISABLE_SSL=false. Kodus authenticates to MongoDB against the admin database, so create the user there. A single connection string also works: DATABASE_URL for PostgreSQL and MONGODB_URI for MongoDB replace the individual host, port and credential variables. The API accepts DATABASE_URL and MONGODB_URI. When using the installer, keep API_PG_DB_PASSWORD and API_MG_DB_PASSWORD set because the installer requires both and Compose still starts the bundled containers.

RabbitMQ configuration

RabbitMQ is required. Keep the URI in sync with the user, password and virtual host.
The virtual host must be kodus-ai. With your own broker, set USE_LOCAL_RABBITMQ=false, enable the rabbitmq_delayed_message_exchange plugin, create the kodus-ai and kodus-ast virtual hosts, and set consumer_timeout = 7200000 in rabbitmq.conf. The default 30 minutes closes the channel of reviews that run longer.

Worker configuration

The worker container needs a role to know which workload to handle. The main worker always runs the code review role.
Leaving WORKER_ROLE unset crashes the worker on boot. Because the worker is what creates the workflow.jobs.* queues on first connect, the api and webhooks then fail every webhook event with a QueueBind 404 error.
The analytics role runs in a separate container and is only for self-hosted Enterprise. See Analytics Worker.

Git Provider Configuration

Choose and configure your preferred Git provider. You can set one or more providers; at least one webhook URL is required, and it must start with https://.
Webhooks are handled by a separate service (port 3332). Your webhook URLs must reach that service. You can use a dedicated webhooks domain, or keep the API domain and route /.../webhook paths to the webhooks service in your reverse proxy. Using GitHub or GitLab OAuth? See GitHub OAuth App or GitLab OAuth App. For GitHub App setup, see GitHub App.
Use the dedicated webhooks host when you have one. Kodus uses these URLs when it registers repository webhooks. For a GitHub App, configure the webhook URL in the App settings.

MCP Manager Configuration

Only needed if you want to use MCP Manager.
MCP Manager is the service that connects Kody to external tools and exposes them in the Plugins screen. Check our MCP Manager documentation for more information.
API_MCP_MANAGER_JWT_SECRET and API_MCP_MANAGER_ENCRYPTION_SECRET are generated by generate-secrets.sh. The other API_MCP_MANAGER_* variables in .env.example have working defaults.

External Services Configuration (Optional)

These services are optional but improve Kodus’s code review quality. Each requires you to create an account and generate an API key.
By default Kodus parses repositories inside the worker container (SANDBOX_PROVIDER=local). E2B runs that work in a remote sandbox instead, which isolates it from your host and suits very large repositories.
  1. Create an account at e2b.dev
  2. Generate an API key in your dashboard
  3. Add it to your .env:
See Sandbox & AST Graph for the modes.
MorphLLM is a specialized model for fast, accurate code editing. Kodus uses it to apply review suggestions more precisely.
  1. Create an account at morphllm.com
  2. Generate an API key in your dashboard
  3. Add it to your .env:
With an Exa key, Kody looks up library documentation while it reviews. Without one, documentation search is off.
  1. Create an account at exa.ai
  2. Generate an API key in your dashboard
  3. Add it to your .env:

Beta

To opt in to features that require the self-hosted beta setting, add BETA_FEATURES=true to .env in the kodus-installer directory. On an existing deployment, apply it with docker compose up -d --no-deps kodus-web api worker webhooks so the containers pick up the new environment. Each feature keeps its own plan and configuration requirements.

Next steps

  • Put a reverse proxy in front of the web app, the API and the webhooks service.
  • Update the installation when a new version is released.
  • Run ./scripts/doctor.sh whenever something looks off, and see Troubleshooting.

Need help?

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

Get help with our community

Join our community to get help with your deployment.