Self-Hosted Deployment
XGopilot supports self-hosted deployment for teams with private GitLab instances, enterprise networks, or data security requirements.
Using GitHub? Install the XGopilot GitHub App — no server needed.
Qiniu Resource Stack (Recommended)
For teams using Qiniu Cloud, the Resource Stack deploys the full XGopilot service in one click.
Deploy at: portal.qiniu.com/las/rfs/stacks/create
Steps
1. Select Region
Choose China (Changshan 1) (recommended).
2. Name Your Stack
Enter a descriptive name for the resource stack.
3. Configure Repository Sync
| Field | Value |
|---|---|
| Repository URL | https://ghfast.top/https://github.com/qiniu/terraform-module |
| Subdirectory | codeagent/standard/ |
| Branch | main |
4. Configure Template Variables
Required variables:
| Parameter | Example | Description |
|---|---|---|
model_api_key | sk-xxxxxx | Qiniu AIGC API Key (min 10 chars). Get it at portal.qiniu.com/ai-inference/api-key |
gitlab_base_url | https://gitlab.example.com | Your GitLab instance URL (must start with http:// or https://) |
gitlab_token | glpat-xxxxxxxxxxxx | GitLab Personal Access Token |
gitlab_webhook_secret | 0123456789 | Webhook secret (must match the secret set in GitLab Webhook settings) |
{
"model_api_key": "sk-xxxxxxxxxxxxxx",
"gitlab_base_url": "https://gitlab.example.com",
"gitlab_token": "glpat-xxxxxxxxxxxx",
"gitlab_webhook_secret": "0123456789"
}
Optional resource variables:
Cost reference: Default config (
ecs.c1.c12m24+ 100GB disk + 200Mbps bandwidth) costs approximately ¥30/day. Actual charges are per Qiniu billing.
| Parameter | Default | Description | Range |
|---|---|---|---|
instance_type | ecs.c1.c12m24 | ECS instance type | T1/C1/G1 series (see below) |
instance_system_disk_size | 100 | System disk size (GiB) | 100–500 |
internet_max_bandwidth | 200 | Max internet bandwidth (Mbps) | 50–200 |
internet_charge_type | PeakBandwidth | Billing mode | Bandwidth, PeakBandwidth, Traffic |
image_id | image-694ba6d04003c59f46bd71c5 | Pre-configured image ID | image-xxxxx format |
Supported ECS instance types:
- T1: ecs.t1.c1m2, c2m4, c4m8, c8m16, c12m24, c16m32, c24m48, c32m64
- C1: ecs.c1.c1m2, c2m4, c4m8, c8m16, c12m24, c16m32, c24m48, c32m64
- G1: ecs.g1.c16m120, ecs.g1.c32m240
5. Configure Storage (Optional)
Leave blank to auto-generate. Auto-generated path: kodo://rfs-<random-8-chars>-<rfsRegionID>-artifacts
6. Confirm and Create
Check the confirmation box and click Create Stack.