Thanks to visit codestin.com
Credit goes to docs.nocobase.com

nb config

Manage default CLI configuration values. The currently supported keys are mainly grouped like this:

  • CLI itself: locale, update.policy, license.pkg-url
  • Docker runtime: docker.network, docker.container-prefix
  • External executables: bin.docker, bin.caddy, bin.git, bin.nginx, bin.yarn
  • Proxy generation: proxy.nb-cli-root, proxy.upstream-host, proxy.nginx-driver, proxy.caddy-driver

Most projects only need a few of these keys. In practice, the most common ones are:

  • update.policy
  • docker.network
  • docker.container-prefix
  • bin.nginx or bin.caddy
  • proxy.nginx-driver or proxy.caddy-driver

Common configuration keys

KeyDefaultDescription
localeresolved by the current CLI rulesOverride the language used by the CLI
update.policypromptStartup update policy: prompt, auto, or off
license.pkg-urlhttps://pkg.nocobase.com/Override the download URL for commercial extension packages
docker.networknocobaseDefault network for CLI-managed Docker apps
docker.container-prefixnbDefault prefix for CLI-managed Docker containers
bin.dockerdockerOverride the Docker executable path
bin.caddycaddyOverride the Caddy executable path
bin.gitgitOverride the Git executable path
bin.nginxnginxOverride the Nginx executable path
bin.yarnyarnOverride the Yarn executable path
proxy.nb-cli-rootCLI root, usually the current user's home directoryOverride the root path visible to the generated proxy config when the proxy process and CLI do not see the same filesystem root
proxy.upstream-host127.0.0.1Override the host used when the proxy forwards traffic back to the NocoBase app
proxy.nginx-driverlocalDefault runtime driver used by nb proxy nginx
proxy.caddy-driverlocalDefault runtime driver used by nb proxy caddy

Usage

nb config <command>

Subcommands

CommandDescription
nb config getRead the effective value of a configuration key
nb config setSet a configuration key
nb config deleteDelete an explicitly set configuration key
nb config listList the configuration keys that are currently set explicitly

Examples

nb config list
nb config get update.policy
nb config set update.policy auto
nb config get proxy.nb-cli-root
nb config set proxy.nb-cli-root /workspace
nb config set proxy.upstream-host host.docker.internal
nb config set proxy.nginx-driver docker
nb config set proxy.caddy-driver local
nb config get docker.network
nb config set docker.network nocobase
nb config set bin.nginx /usr/sbin/nginx
nb config set bin.git /usr/bin/git
nb config delete docker.container-prefix

Notes

  • bin.nginx and bin.caddy only affect the local driver for nb proxy nginx and nb proxy caddy
  • proxy.nginx-driver and proxy.caddy-driver store the default driver used by each provider
  • proxy.nb-cli-root and proxy.upstream-host are advanced proxy overrides. Most CLI-managed local or docker envs can use the defaults directly
  • If you only want to switch the active proxy driver, using nb proxy nginx use or nb proxy caddy use is usually clearer than setting the config key manually