Region & Custom API Domain Configuration
This document covers Lovrabet Runtime CLI connection configuration: how to use interactive config init to select the Mainland China or Indonesia endpoint, and how to manually edit .lovrabet.json to support enterprise self-hosted deployments.
Initial Setup: Follow the Prompt
Run in any directory:
lovrabet config initCLI will show Select Lovrabet region. Use arrow keys to choose:
Mainland China (cn): Mainland China endpoint, also the default.Indonesia (id): Indonesia endpoint.
After confirmation, CLI writes the connection config to the global file ~/.lovrabet.json. It only updates region and Domain routing — it doesn't clear AccessKey, output format, or app selection.
| Selection | Config File Result | Notes |
|---|---|---|
Mainland China cn | Usually no region saved | cn is the default. Omitting the field maintains backward compatibility and reduces unnecessary config. |
Indonesia id | "region": "id" | CLI resolves the full set of *.lovrabet.id official addresses based on id. |
Connection config and identity login are two separate steps:
lovrabet config init
lovrabet auth loginconfig init decides where requests go, auth login obtains and saves the user identity — the responsibilities don't mix.
Automated or Script Usage
Pass arguments directly when no prompt is needed:
lovrabet config init --region cn
lovrabet config init --region idCurrently only cn and id are allowed for new initialization. Legacy value global is kept for backward compatibility and won't appear in the prompt.
Where is the Config File?
| Scope | File | Purpose |
|---|---|---|
| Global config | ~/.lovrabet.json | Machine-wide default region, Domain, auth, and output preferences. Written by config init. |
| Project config | ./.lovrabet.json | User intent for current directory; same-named fields override global config. |
Lovrabet Runtime CLI only reads .lovrabet.json, not Rabetbase CLI's .rabetbase.json. When editing manually, use valid JSON: field names and strings must use double quotes, no comments or trailing commas.
Direct JSON Edit for Official Endpoints
Mainland China is the default. The minimal config can just save other auth fields:
{
"accessKey": "<redacted>"
}Indonesia endpoint:
{
"region": "id",
"accessKey": "<redacted>"
}region resolves five official addresses at once: userDomain, apiDomain, runtimeDomain, skillDomain, and kbDomain. Users only need to select the country/region; no need to understand internal address mappings.
Enterprise Self-Hosted: Configure Domain
Enterprise deployments can either override only the services actually self-hosted, or configure all six Domain fields. Official fields:
| Field | Handles |
|---|---|
userDomain | Device login, AccessKey self-service, and other user authentication services |
apiDomain | Limited platform tools and node-toolbox interfaces, not the main runtime business request entry |
runtimeDomain | Main runtime entry: /client/*, data, SQL, BFF, files, tasks, etc. |
skillDomain | Skill / SkillHub query, install, publish, and management interfaces |
kbDomain | Personal and enterprise knowledge base interfaces; when not separately configured, follows explicit runtimeDomain |
Full Self-Hosted Example
{
"userDomain": "https://user.example.com",
"apiDomain": "https://api.example.com",
"runtimeDomain": "https://runtime.example.com",
"skillDomain": "https://skills.example.com",
"kbDomain": "https://kb.example.com"
}Self-Hosted Runtime Only
{
"runtimeDomain": "https://runtime.example.com"
}Runtime requests go to the enterprise Runtime, and kbDomain also follows this explicit runtimeDomain. userDomain, apiDomain, and skillDomain continue using the current region's official addresses.
TIP
If the enterprise Runtime doesn't deploy the knowledge base service, don't just omit kbDomain; explicitly set it to the official Runtime address you want to continue using, e.g., Mainland China node's https://runtime.lovrabet.com.
Keep Official Endpoints, Override One Service
When editing JSON manually, you can keep region and override a single Domain:
{
"region": "id",
"skillDomain": "https://skills.customer.example.com"
}This means only SkillHub uses the customer address; other services still use the Indonesia endpoint.
Import via Domain JSON
Deployment programs can also generate a standalone file and import it at once:
lovrabet config init --domain-config ./lovrabet-domains.jsonWhen using --domain-config, CLI switches to self-hosted mode: clears the original region and old Domain fields, then writes the official Domains from the file. Don't pass --region at the same time; the two modes are mutually exclusive.
WARNING
Custom Domain must be a trusted HTTPS origin, e.g., https://runtime.example.com. It cannot contain paths, query parameters, credentials, or business routes. CLI sends AccessKey and other credentials to the corresponding service.
Verification After Changes
- Save
.lovrabet.json. - Run
lovrabet doctor. - Verify the displayed region and five final Domains.
- Run
lovrabet auth statusto check identity status. - Execute a read-only command to verify the target service; don't test connections with write commands.
FAQ
Why can't I see region after running config init --region cn? Because cn is the default; CLI removes redundant fields as a forward-compatibility design.
Why can't I call APIs after running config init? It only configures service addresses; it doesn't handle login. Continue with lovrabet auth login.
Why doesn't the global config change when I modify Domain in the current directory? Project-level .lovrabet.json only affects the current directory. To modify the machine-wide default, edit ~/.lovrabet.json, or use config write commands with --global.
Can I still write old fields like agentDomain, platformDomain, skillHubDomain, or host? They are only kept for backward compatibility. New config should only use the five official fields listed in this document; don't mix old and new fields.
Applicable version: Verified against Lovrabet Runtime CLI main branch as of 2026-08-22.