系统要求
Recommended Hardware
Recommended Hardware
- CPU: 2+ cores - RAM: 8GB+ - Storage: 60GB+ free space
Required Software
Required Software
- 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
Required Ports
- 3000: Kodus Web App
- 3001: API
- 3332: Webhooks
- 5672, 15672, 15692: RabbitMQ (AMQP, management, metrics)
- 3101: MCP Manager (API, metrics)
- 5432: PostgreSQL - 27017: MongoDB
如果您计划连接云端 Git 服务(GitHub、GitLab、Bitbucket)或云端 LLM 提供商(OpenAI、Anthropic 等),则需要互联网访问。 对于内网自托管的 Git 工具和本地/自托管 LLM,外网访问是可选的。
域名设置(可选)
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.
- 使用独立的 webhook 子域名,例如
kodus-webhooks.yourdomain.com,或 - 继续使用 API 域名,并在反向代理中将
/github/webhook、/gitlab/webhook等路径转发到 webhook 服务。
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.
Setup
Edit the environment file
Success 🎉
When complete, Kodus Services should be running on your machine.
You can verify your installation using the following script:
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
- Configure your Git provider - Connect GitHub, GitLab, or Bitbucket following the on-screen instructions
- Select repositories for analysis - Choose which code repositories Kody will review
详细步骤请参见 快速开始指南。
环境变量配置
使用此部分填写您的.env。首先从公共 URL 开始,然后设置数据库和 RabbitMQ,最后添加特定于提供商的设置。
命名空间配置
这些设置定义了 Web 应用程序和 API 使用的公共 URL 和主机绑定。如果您不使用 MCP Manager,可以在此处跳过 MCP 条目和下面的完整块。LLM 提供商配置
数据库配置
默认情况下,使用本地容器运行 Postgres 和 MongoDB。更新凭据以符合您的安全要求。RabbitMQ 配置
2.0 需要 RabbitMQ。保持 URI 与以下值同步。Git 提供商配置
选择并配置您首选的 Git 提供商。您可以设置一个或多个提供商;对于基本的基于令牌的身份验证,您只需要 webhook URL。Webhook 由独立服务处理(端口 3332)。Webhook URL 必须指向该服务。您可以使用独立的 webhook 域名,或继续使用 API 域名并在反向代理中将
/.../webhook 路径转发到 webhook 服务。
如果您使用 GitHub 或 GitLab OAuth,请参见 GitHub OAuth App 或 GitLab OAuth App。如需 GitHub App 设置,请参见 GitHub App。- Github
- GitLab
- Bitbucket
- Azure DevOps
MCP Manager 配置
仅在您想使用 MCP Manager 时需要。