Groqの仕組み
Groq CloudはOpenAI互換のAPIで高速なLLM推論を提供します。速度とシンプルさのために構築されたGroqは、Llama、Deepseekなどの人気モデルに対して超高速の推論を提供します。このプラットフォームはシンプルな統合と簡単なスケーリングを目指して設計されており、本番アプリケーションに最適です。推奨モデル
高いコンテキストウィンドウと高速推論を持つ優れたコーディングモデルを推奨します。最新情報については、Groqのモデルページ をご覧ください。
APIキーの作成
GroqのAPIキーページ に直接アクセスして新しいAPIキーを作成してください。 または、以下の手順に従ってください:- Groq Console に移動する
- サインインするかアカウントを作成する
- 上部ナビゲーションの「API Keys」に移動する
- 「Create API Key」ボタンをクリックする
- 「Kodus」または説明的な名前を付ける
- APIキーをコピーして安全な場所に保存する
Groqでは、チームのオーナーまたは開発者ロールを持つユーザーのみがAPIキーを作成または管理できます。
使用方法
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
Default host port mappings — adjust in
.env if any conflict.- 3000 — Kodus Web App
- 3001 — API
- 3332 — Webhooks
- 5432 — PostgreSQL
- 27017 — MongoDB
- 5672, 15672, 15692 — RabbitMQ (AMQP, management UI, metrics)
- 3101 — MCP Manager (only if
API_MCP_SERVER_ENABLED=true)
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. Skip withUSE_LOCAL_DB=false/USE_LOCAL_RABBITMQ=falseto point at managed instances.
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, not wired by default. 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.Internet access is required if you plan to connect to cloud-based Git
services (GitHub, GitLab, Bitbucket) or cloud LLM providers (OpenAI, Anthropic,
etc.). For self-hosted Git tools and on-prem LLMs within your network,
external internet access is optional.
Domain Name Setup (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.
- 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.
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
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 See Environment Variables Configuration for detailed instructions.
.env with your values using your preferred text editor.5
Run the installer
6
Success 🎉
When complete, Kodus Services should be running on your machine.
You can verify your installation using the following script:
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
- 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
For detailed steps on the initial configuration process, refer to our Getting
Started Guide.
環境ファイルでGroqを設定する
.env ファイルを編集してコア設定を行います。LLMインテグレーションには、固定モードでGroqを使用します:
ウェブフックURLはWebhooksサービス(ポート3332)に到達する必要があります。専用のウェブフックドメインを使用するか、リバースプロキシで
/.../webhook をポート3332にルーティングしてください。固定モードはGroqに最適です。 OpenAI互換のAPIと超高速推論を提供します。シンプルな設定で最高のパフォーマンスが得られます。
Run the Installation Script
Set the proper permissions for the installation script:What the Installer Does
Our installer automates several important steps:- Verifies Docker installation
- Creates networks for Kodus services
- Clones repositories and configures environment files
- Runs docker-compose to start all services
- Executes database migrations
- Seeds initial data
http://localhost:3000 - you should see the Kodus Web Application interface.
リバースプロキシのセットアップ(本番環境向け)
ウェブフックと外部アクセスのためにNginxを設定します:Groqインテグレーションの確認
基本インストールの確認に加えて、Groqが動作していることを確認します:トラブルシューティング
APIキーの問題
APIキーの問題
- Groq Console でAPIキーが正しく有効であることを確認する
- Groqアカウントに十分なクレジットまたはクォータがあるか確認する
.envファイルに余分なスペースがないことを確認する
モデルが見つからない
モデルが見つからない
- 設定でモデル名が正しくスペルされているか確認する
- Groqの現在のモデルリストでモデルが利用可能か確認する
- 推奨リストの別のモデルを試してみる
接続エラー
接続エラー
- サーバーが
api.groq.comにアクセスするインターネット接続があることを確認する - ファイアウォールの制限がないか確認する
- 詳細なエラーメッセージについてAPI/ワーカーログを確認する
レート制限
レート制限
- Groqにはプランに基づいたレート制限がある
- Groqのレート制限ドキュメント を確認する
- より高い制限のためにプランのアップグレードを検討する