Skip to main content
System parameters can be controlled through environment variables. For the community Docker deployment, use docker/.env.example as the reference; if you are already inside the docker/ directory, run cp .env.example .env and then adjust the values as needed. Some parameter explanations are as follows:
Environment VariableDescription
API_BASE_URLAPI service address (needs modification)
CLIENT_BASE_URLWeb client base URL (recommended to update together for server deployments)
WEB_PORTPort of website
DB_NAMEDatabase name
DB_USERDatabase username
DB_PASSDatabase password
DB_PORTDatabase port
DB_HOSTDatabase address
REDIS_PASSWORDCache service password
NODE_ENVOperating environment: development or production
LOG_LEVELLog level
DEFAULT_LATITUDEDefault latitude
DEFAULT_LONGITUDEDefault longitude
DEFAULT_CURRENCYDefault currency
DEMODemo system

Organization Bootstrap and Templates

The following variables are mainly used when a new organization is created. They control the default workspace bootstrap flow, analytics seed data, and external xpert templates:
Environment VariablePurposeHow to configure
ORG_DEFAULT_XPERT_TEMPLATE_KEYSAutomatically import specific templates into each new organization’s default workspaceProvide template IDs separated by commas; leave empty to disable automatic import
ORG_ANALYTICS_BOOTSTRAP_MODEControls analytics bootstrap mode for new organizationsSupported values are semantic-only and full-demo; unset or invalid values fall back to semantic-only
XPERT_TEMPLATE_DIRExternal xpert template directoryPoint this to a persistent directory; on first startup the API seeds any missing baseline template files into it
Example:
ORG_DEFAULT_XPERT_TEMPLATE_KEYS=af7133cb-32b3-47ff-90c1-b144c4d4887e,af7133cb-32b3-47ff-90c1-b144c4d48872
ORG_ANALYTICS_BOOTSTRAP_MODE=semantic-only
XPERT_TEMPLATE_DIR=/var/lib/xpert/data/xpert-template
Notes:
  • ORG_DEFAULT_XPERT_TEMPLATE_KEYS uses template IDs, not display names. The two example IDs above correspond to ChatBI with Sales Analysis Expert and Text2SQL-ChatDB.
  • ORG_ANALYTICS_BOOTSTRAP_MODE=semantic-only initializes only the semantic-model prerequisites; full-demo also imports demo indicators and demo stories.
  • If XPERT_TEMPLATE_DIR is not set, the service falls back to the default data directory. In Docker this is typically /var/lib/xpert/data/xpert-template.
  • These settings affect newly created organizations only. Existing organizations are not backfilled automatically.

Permissions and Handoff Routing

Environment VariablePurposeHow to configure
ALLOW_SUPER_ADMIN_ROLEControls whether SUPER_ADMIN can bypass tenant-level and organization-level permission guardsDefaults to true; only set it to false if you want to disable this bypass
HANDOFF_ROUTING_CONFIG_PATHPoints to the handoff routing YAML fileYou can use an absolute or relative path; relative paths are resolved from the API server root
Example:
ALLOW_SUPER_ADMIN_ROLE=true
HANDOFF_ROUTING_CONFIG_PATH=/var/lib/xpert/data/config/handoff-routing.yaml
The routing file structure can follow the sample in docker/handoff-routing.example.yaml from the Xpert source repository. A minimal example looks like this:
version: 1
defaultQueue: handoff
defaultLane: main
routes:
  - match:
      typePrefix: channel.lark.
    target:
      queue: integration
      lane: normal
Notes:
  • ALLOW_SUPER_ADMIN_ROLE does not create or remove roles. It only controls whether SUPER_ADMIN automatically passes certain tenant and organization permission checks.
  • If HANDOFF_ROUTING_CONFIG_PATH is not set, the service logs a warning and falls back to built-in defaults.
  • The handoff routing file is loaded during module initialization, so API restart is required after editing the YAML file.

Plugins and Default Skill Repositories

Environment VariablePurposeHow to configure
PLUGINSAdds extra global plugin packages at deployment timeSeparate plugin package names with commas or semicolons; the list is appended to the built-in global plugins rather than replacing them
AI_DEFAULT_SKILL_REPOSITORIESAutomatically registers default skill repositories when a new tenant is createdPass a JSON string; the recommended shape is { "repositories": [...] }; each entry must include at least name and provider, with optional options and credentials
Example:
PLUGINS=@xpert-ai/plugin-openrouter,@xpert-ai/plugin-gemini
AI_DEFAULT_SKILL_REPOSITORIES={"repositories":[{"name":"anthropics/skills","provider":"github","options":{"url":"https://github.com/anthropics/skills","branch":"main"}},{"name":"acme/internal-skills","provider":"github","options":{"url":"https://github.com/acme/internal-skills","path":"skills","branch":"main"},"credentials":{"token":"<github-token>"}}]}
Notes:
  • PLUGINS is read during service startup, so API restart is required after changes.
  • AI_DEFAULT_SKILL_REPOSITORIES also accepts a raw JSON array, but the wrapped repositories format from docker/.env.example is recommended for future extensibility.
  • The provider field in AI_DEFAULT_SKILL_REPOSITORIES must match a supported skill repository provider, such as github or clawhub.
  • Invalid JSON is ignored and a warning is logged.
  • These default repositories are only auto-registered for newly created tenants. Existing tenants need manual registration and sync through the skill repository APIs.
To customize the SMTP mail server configuration, you need to configure the following environment variables:
Environment variableDescription
MAIL_FROM_ADDRESSSender’s email address
MAIL_HOSTMail service host
MAIL_PORTMail service port number
MAIL_USERNAMEMail account
MAIL_PASSWORDMail password

File Storage

Custom File Storage Providers
Environment VariableDescription
FILE_PROVIDERFile storage provider (LOCAL | S3 | OSS)
ALIYUN_ACCESS_KEY_IDAlibaba Cloud Access Key ID
ALIYUN_ACCESS_KEY_SECRETAlibaba Cloud Access Key Secret
ALIYUN_REGIONAlibaba Cloud Region
ALIYUN_OSS_ENDPOINTAlibaba Cloud OSS Endpoint
ALIYUN_OSS_BUCKETAlibaba Cloud OSS Bucket
AWS_ACCESS_KEY_IDAmazon Cloud Access Key ID
AWS_SECRET_ACCESS_KEYAmazon Cloud Secret Access Key
AWS_REGIONAmazon Cloud Region
AWS_S3_BUCKETAmazon Cloud S3 Bucket