Docker (latest stable version) - Node.js (latest LTS version) - Yarn or
NPM (latest stable version) - Domain name or fixed IP (for external
deployments)
Required Ports
3000: Kodus Web App - 3001: Orchestrator API - 5672, 15672: RabbitMQ -
5432: PostgreSQL - 27017: MongoDB
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.
If you're planning to integrate Kodus with cloud-based Git providers (GitHub, GitLab, or Bitbucket), you'll need public-facing URLs for both the Kodus Web App and its API. This allows your server to receive webhooks for proper Code Review functionality and ensures correct application behavior.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.
Both subdomains should have DNS A records pointing to your server's IP address. Later in this guide, we will configure a reverse proxy (Nginx) to route requests to these subdomains to the correct internal services. This setup is essential for full functionality, including webhooks and authentication.
Note: If you're only connecting to self-hosted Git tools on your network and do not require public access or webhooks, you might be able to use a simpler setup, but this guide focuses on public-facing deployments.
编辑您的 .env 文件并配置核心设置。对于 LLM 集成,在固定模式下使用 Together AI:
复制
询问AI
# 核心系统设置(使用您的域名更新)WEB_HOSTNAME_API="kodus-api.yourdomain.com"WEB_PORT_API=443NEXTAUTH_URL="https://kodus-web.yourdomain.com"# 安全密钥(使用上面的 openssl 命令生成)WEB_NEXTAUTH_SECRET="your-generated-secret"WEB_JWT_SECRET_KEY="your-generated-secret"API_CRYPTO_KEY="your-generated-hex-key"API_JWT_SECRET="your-generated-secret"API_JWT_REFRESHSECRET="your-generated-secret"# 数据库配置API_PG_DB_PASSWORD="your-secure-db-password"API_MG_DB_PASSWORD="your-secure-db-password"# Together AI 配置(固定模式)API_LLM_PROVIDER_MODEL="meta-llama/Meta-Llama-4-Maverick-Instruct" # 选择您偏好的模型API_OPENAI_FORCE_BASE_URL="https://api.together.xyz/v1" # Together AI API URLAPI_OPEN_AI_API_KEY="your-together-api-key" # 您的 Together AI API 密钥# Git 提供商 Webhook(选择您的提供商)API_GITHUB_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/github/webhook"# 或 API_GITLAB_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/gitlab/webhook"# 或 GLOBAL_BITBUCKET_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/bitbucket/webhook"
固定模式非常适合 Together AI,因为它提供兼容 OpenAI 的 API,具有有竞争力的定价,并可访问尖端的开源模型。
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.