Configuration files
The Box CLI reads and writes a small set of files in each box project. This page documents every one of them, plus the environment variables that influence the CLI’s behavior.
| File | Committable? | Purpose |
|---|---|---|
box.json | ✅ yes (no secrets) | Box manifest: name, control plane, license metadata. |
box.yml | ✅ yes | Deploy manifest: public URLs and domains. |
brand.json | ✅ yes | Console branding/theme declaration. |
.box/credentials.json | ❌ never | Secrets: license key and npm token (mode 0600). |
.npmrc | ❌ never | Registry auth written by box auth. |
dns.txt / nameserver.txt | optional | DNS instructions written by box deploy. |
box.json
The box manifest: committable and free of secrets. Written by
box create and extended by
box auth.
{
"name": "acme-bank",
"org": "acme-bank",
"controlPlaneUrl": "https://control.example.com",
"webControlUrl": "https://beta.withpotter.site",
"storefrontDomain": "shop.acme-bank.example",
"engineUrl": "https://api.acme-bank.example",
"consoleUrl": "https://app.acme-bank.example",
"backOfficeUrl": "https://admin.acme-bank.example",
"hostUrl": "https://acme-bank.example",
"deployPipe": ["dockerfile", "compose", "github"],
"license": {
"customerId": "cus_xxxxxxxx",
"tier": "growth",
"registryUrl": "https://registry.example.com",
"packages": ["@withpotter/engine-core", "@withpotter/pages-catalog"],
"activatedAt": "2026-06-22T00:00:00.000Z"
}
}| Field | Type | Description |
|---|---|---|
name | string | The box name. |
org | string? | Organization name. |
controlPlaneUrl | string? | Control plane API URL for this box. |
webControlUrl | string? | Web control URL (drives NEXT_PUBLIC_WEB_URL). |
storefrontDomain | string? | Per-bank storefront base host. |
engineUrl | string? | Public engine (backend/API) URL. Set by box config --engine-url; drives BOX_ENGINE_URL and the default backend for box deploy --register-domains. |
consoleUrl | string? | Public console (merchant dashboard) URL. Drives BOX_CONSOLE_URL. |
backOfficeUrl | string? | Public back office (/admin platform console) URL. Drives BOX_BACK_OFFICE_URL. |
hostUrl | string? | Public host URL of the box. Drives BOX_HOST_URL. |
deployPipe | string[]? | Default artifacts box deploy generates (subset of dockerfile, compose, github, terraform, railway). |
license | object? | License metadata written by box auth (no secrets). |
license.customerId | string | The box’s customer ID. |
license.tier | string | The entitlement tier. |
license.registryUrl | string | The entitled package registry URL. |
license.packages | string[] | The entitled package names. |
license.activatedAt | string | ISO timestamp of activation. |
The license block is metadata only: it contains no secrets and is safe
to commit. Secrets live in .box/credentials.json.
box.yml
The deploy manifest consumed by box deploy. It
declares the box’s public URLs and the domains to register with the control
plane resolver. It contains no secrets.
backendUrl: https://api.acme-bank.example
frontendUrl: https://shop.acme-bank.example
dashboardUrl: https://admin.acme-bank.example
contactEmail: ops@acme-bank.example
payment:
provider: olivepay
console:
defaultTheme: light
domains:
- host: acme-bank.example
primary: true
- host: '*.acme-bank.example'
wildcard: true| Field | Type | Description |
|---|---|---|
backendUrl | string? | Public backend (engine) URL. Used by box deploy --register-domains if not passed as a flag; falls back to box.json’s engineUrl. |
frontendUrl | string? | Public frontend URL. |
dashboardUrl | string? | Origin of the box dashboard, registered so the storefront’s Live Preview iframe can embed it (CSP frame-ancestors). Defaults to frontendUrl at deploy time; set explicitly only when the admin console is served from a different origin. |
contactEmail | string? | Email the control plane sends the DNS setup instructions to on registration (so you get dns.txt by email, not just stdout). Validated as an email address. |
payment.provider | string? | Pins the box’s payment gateway (e.g. olivepay). Read at build time so box.yml: not a hand-edited ENV PAYMENT_PROVIDER: is the single source that drives the engine composition. |
console.defaultTheme | string? | Default console/storefront theme baked into the console build: light or dark. |
domains | DeployDomain[] | Required. At least one domain. |
box.yml is the single build-time config source for the box: beyond
routing, its payment.provider, console.defaultTheme, and the storefront
base host derived from a wildcard domains entry all feed the generated
deploy artifacts (Dockerfile / compose / Railway): no separate ENV edits
or a box.json storefrontDomain are needed.
After a successful box deploy, any URL you pass
explicitly is persisted back here: --backend-url → backendUrl, and
--frontend-url → frontendUrl plus a matching entry in domains (and
storefrontDomain in box.json). Comments and formatting in box.yml are
preserved. Subsequent deploys can then omit those flags.
DeployDomain
| Field | Type | Description |
|---|---|---|
host | string | Required. The domain host. Normalized to lowercase; must be unique within domains. |
primary | boolean? | Marks the primary domain. At most one domain may be primary. |
wildcard | boolean? | Marks the domain as a wildcard (e.g. *.acme-bank.example). |
Hosts are normalized to lowercase and must be unique. The manifest may declare
at most one primary domain.
brand.json
The committable, secret-free branding declaration for the box’s console.
box brand reads it and generates the console theme: a
CSS-variable override file, the copied logo, and NEXT_PUBLIC_BOX_* env vars.
box create ships a default one.
{
"name": "Box Dashboard",
"logo": "assets/logo.svg",
"favicon": "assets/mark.svg",
"theme": {
"colors": {
"brand": "#2563eb",
"accent": "#111827",
"background": "#ffffff",
"surface": "#f5f5f5",
"text": "#111827",
"link": "#2563eb",
"success": "#16a34a"
},
"button": { "radius": "0.5rem" },
"css": {},
"dark": {
"colors": { "brand": "#3b82f6", "accent": "#f3f4f6" }
}
}
}| Field | Type | Description |
|---|---|---|
name | string? | Console display name → NEXT_PUBLIC_BOX_NAME. |
logo | string? | Logo path relative to the box root → NEXT_PUBLIC_BOX_LOGO. |
favicon | string? | Square mark for the browser-tab favicon, relative to the box root → regenerates console/public/favicon.svg. Falls back to logo when omitted. |
hideName | boolean? | Hide the name text next to the logo → NEXT_PUBLIC_BOX_HIDE_NAME. Use when the logo already includes the wordmark. |
theme.colors | object? | Friendly color aliases mapped to design-system CSS variables. |
theme.button.radius | string? | Button/card corner radius → --radius. |
theme.css | object? | Raw --token: value overrides (keys must start with --). |
theme.dark | object? | Dark-mode overrides (same shape), emitted under .dark. |
See the box brand reference for the full color
alias table and validation rules.
.box/credentials.json
The box’s secrets: written by box auth with file
mode 0600 and git-ignored. Never commit this file.
{
"licenseKey": "pk_live_xxxxxxxx",
"npmToken": "npm_xxxxxxxx"
}| Field | Type | Description |
|---|---|---|
licenseKey | string? | The box’s license key. |
npmToken | string? | The registry auth token. |
.npmrc
Written by box auth to authenticate package installs against the entitled
registry. Git-ignored. Never commit it.
dns.txt / nameserver.txt
box deploy writes dns.txt with the DNS records you
must create for your registered domains. A legacy nameserver.txt is also
written for backward compatibility. Both are git-ignored by the generated
.gitignore.
Environment variables
| Variable | Default | Description |
|---|---|---|
BOX_CONTROL_PLANE | (none) | Control plane API URL. Never baked into the CLI: supply it via this env var, the --control-plane flag, or box.json. |
BOX_CONTROL_WEB_URL | https://beta.withpotter.site | Web control URL; drives NEXT_PUBLIC_WEB_URL. |
BOX_STOREFRONT_DOMAIN | (none) | Per-bank storefront base host; drives NEXT_PUBLIC_STOREFRONT_DOMAIN. |
BOX_ENGINE_URL | (none) | Public engine URL; overrides box.json’s engineUrl. |
BOX_CONSOLE_URL | (none) | Public console URL; overrides box.json’s consoleUrl. |
BOX_BACK_OFFICE_URL | (none) | Public back office URL; overrides box.json’s backOfficeUrl. |
BOX_HOST_URL | (none) | Public host URL; overrides box.json’s hostUrl. |
The four service-URL variables are set with box config
and override the corresponding box.json fields at runtime.
Control plane URL resolution
When a command needs the control plane URL, it is resolved in this order:
- An explicit
--control-planeflag (where the command accepts one). - The
BOX_CONTROL_PLANEenvironment variable. - The
controlPlaneUrlfield inbox.json.
.gitignore generated by box create
box create writes a .gitignore that excludes:
node_modules/
dist/
.box/
.npmrc
.env
.env.local
nameserver.txt
dns.txt