Skip to main content
Skip this page if a load balancer or another proxy already routes traffic to Kodus.
To make your Kodus instance accessible from external systems (required for Code Review webhooks and public access), you’ll need to configure a reverse proxy with Nginx. It routes three services: the web app (port 3000), the API (port 3001) and the webhooks service (port 3332). The installer publishes all three on the host. Here’s a sample Nginx configuration for two subdomains:
Webhooks are handled by a separate service (port 3332). The location ~ ^/(github|gitlab|bitbucket|azure-repos|forgejo)/webhook block is required if your webhook URLs use the API domain. The same API domain also serves /mcp when API_MCP_SERVER_ENABLED=true.

Optional: Dedicated Webhooks Subdomain

If you prefer a separate domain for webhooks (e.g., kodus-webhooks.yourdomain.com), add a server block that points to the webhooks service:
Save this configuration to /etc/nginx/sites-available/kodus (or a name of your choice, e.g., kodus-web and kodus-api as separate files if preferred) and create a symbolic link to enable it:
Match .env to the public URLs. After the proxy is up, set these in .env and run ./scripts/install.sh again to recreate the containers:
  • NEXTAUTH_URL, API_FRONTEND_URL and API_USER_INVITE_BASE_URL: the public https:// URL of the web app.
  • The webhook URLs (for example API_GITHUB_CODE_MANAGEMENT_WEBHOOK): an https:// URL that reaches the webhooks service. Use the API domain only if /.../webhook routes to port 3332, or use a dedicated webhooks domain such as https://kodus-webhooks.yourdomain.com/github/webhook.
  • API_URL, only if you use SSO: the public API URL, such as https://kodus-api.yourdomain.com.
WEB_HOSTNAME_API and WEB_PORT_API do not point at the proxy. The web app’s server calls the API over the Docker network, so keep the defaults (localhost and 3001). When WEB_PORT_API is set, the web app calls http://<WEB_HOSTNAME_API>:<WEB_PORT_API>, so a public HTTPS host with port 443 fails.A wrong webhook URL does not raise an error: the repository connects and reviews never start.
For production deployments, we strongly recommend setting up SSL with Let’s Encrypt:
This will automatically configure your Nginx setup to use HTTPS and redirect HTTP traffic for those domains.