Skip to content

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:

bash
lovrabet config init

CLI 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.

SelectionConfig File ResultNotes
Mainland China cnUsually no region savedcn 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:

bash
lovrabet config init
lovrabet auth login

config 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:

bash
lovrabet config init --region cn
lovrabet config init --region id

Currently 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?

ScopeFilePurpose
Global config~/.lovrabet.jsonMachine-wide default region, Domain, auth, and output preferences. Written by config init.
Project config./.lovrabet.jsonUser 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:

json
{
  "accessKey": "<redacted>"
}

Indonesia endpoint:

json
{
  "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:

FieldHandles
userDomainDevice login, AccessKey self-service, and other user authentication services
apiDomainLimited platform tools and node-toolbox interfaces, not the main runtime business request entry
runtimeDomainMain runtime entry: /client/*, data, SQL, BFF, files, tasks, etc.
skillDomainSkill / SkillHub query, install, publish, and management interfaces
kbDomainPersonal and enterprise knowledge base interfaces; when not separately configured, follows explicit runtimeDomain

Full Self-Hosted Example

json
{
  "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

json
{
  "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:

json
{
  "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:

bash
lovrabet config init --domain-config ./lovrabet-domains.json

When 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

  1. Save .lovrabet.json.
  2. Run lovrabet doctor.
  3. Verify the displayed region and five final Domains.
  4. Run lovrabet auth status to check identity status.
  5. 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.

基于飞书知识库同步生成,内容以飞书源文档为准