System Requirements
Recommended Hardware
Recommended Hardware
Sized for the default
local sandbox mode (kodus-graph + cross-file
context run inside the worker container).- CPU: 2+ cores (4+ recommended for repos above ~100k LOC)
- RAM: 8GB+ (16GB recommended when running the
localsandbox on large repos) - Storage: 60GB+ free space (Postgres holds the AST graph cache; grows with repo count and PR volume)
Required Software
Required Software
- 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.)
Required Ports
Required Ports
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 ifAPI_MCP_SERVER_ENABLED=true - 15692 — RabbitMQ Prometheus metrics
docker compose port <service> <port> to
find the host port.Services
Services
What
./scripts/install.sh brings up, based on your .env.Core (always on):api— main backendworker— code-review jobswebhooks— Git provider webhook receiverkodus-web— Next.js frontenddb_kodus_postgres,db_kodus_mongodb,rabbitmq— local infrastructure. SetUSE_LOCAL_DB=false/USE_LOCAL_RABBITMQ=falseto point at managed instances. The containers still start as dependencies, but Kodus does not use them.
kodus-mcp-manager— Model Context Protocol broker. Enable withAPI_MCP_SERVER_ENABLED=true. See MCP Manager.worker-analytics— Cockpit ingestion (DORA metrics, PR classifier). Self-hosted Enterprise only. Behind theanalyticsCompose 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.
- 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.
Setup
1
Clone the installer repository
2
Copy the example environment file
3
Generate secure keys for the required environment variables
4
Edit the environment file
Edit Add
.env with your values using your preferred text editor.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:
- Create your admin account - This will be the first user with full system access
- 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) - Configure your Git provider - Connect GitHub, GitLab, Bitbucket, Azure DevOps or Forgejo following the on-screen instructions
- 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 fromkodus-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.
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.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.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 withhttps://.
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.- Github
- GitLab
- Bitbucket
- Azure DevOps
- Forgejo
MCP Manager Configuration
Only needed if you want to use MCP Manager.
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.E2B — Code Execution Sandbox
E2B — Code Execution Sandbox
By default Kodus parses repositories inside the worker container (See Sandbox & AST Graph for the modes.
SANDBOX_PROVIDER=local). E2B runs that work in a remote sandbox instead, which isolates it from your host and suits very large repositories.- Create an account at e2b.dev
- Generate an API key in your dashboard
- Add it to your
.env:
MorphLLM — Code Editing Model
MorphLLM — Code Editing Model
MorphLLM is a specialized model for fast, accurate code editing. Kodus uses it to apply review suggestions more precisely.
- Create an account at morphllm.com
- Generate an API key in your dashboard
- Add it to your
.env:
Exa — Documentation Search
Exa — Documentation Search
With an Exa key, Kody looks up library documentation while it reviews. Without one, documentation search is off.
- Create an account at exa.ai
- Generate an API key in your dashboard
- Add it to your
.env:
Beta
To opt in to features that require the self-hosted beta setting, addBETA_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.shwhenever 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.