Optional Step: Only needed if you will not use any loadbalancer or proxy server.
Webhooks are handled by a separate service (port 3332). The
location ~ ^/(github|gitlab|bitbucket|azure-repos)/webhook block is required if your webhook URLs use the API domain.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:
/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:
Important Configuration Update for Reverse Proxy:After setting up the reverse proxy with
kodus-web.yourdomain.com and kodus-api.yourdomain.com (or your chosen subdomains), you must ensure your .env file correctly reflects these public URLs. Specifically, verify:WEB_HOSTNAME_API: Should be set to only the hostname of your public API (e.g.,kodus-api.yourdomain.com), without any protocol (http://orhttps://).WEB_PORT_API: Should correspond to the public port your API is accessible on (typically443for HTTPS or80for HTTP). The scheme (http/https) used by the frontend to call the API will often be inferred from this port or hardcoded in the frontend logic to use HTTPS.- Webhook URLs (e.g.,
API_GITHUB_CODE_MANAGEMENT_WEBHOOK): Ensure these resolve to the webhooks service. You can use the API domain only if/.../webhookroutes to port3332, or use a dedicated webhooks domain (e.g.,https://kodus-webhooks.yourdomain.com/github/webhook).