Configuration
On this page
- At a glance
- The shape of the settings
- Ways to set a value
- Start from a recipe
- Defaults
- bar
- Bar layout
- console
- Precedence of the console passwords
- collect
- tabs
- access
- Core
- async
- request
- history
- server
- fleet
- ui
- thresholds
- notifications
- Seed the notification settings
- volumes
- checks
- store
- sync
- secrets
- ai
- MCP servers
- editor
- redact
- limits
- collectors
- dev
- System properties
- registration
- updates
- Live settings
- Per request overrides
Configuration
Lens reads its settings from boxlang.json under modules.bxLens.settings. You only set what you want to change. The schema and defaults come from the module's ModuleConfig.bx. Restart the runtime (or reload the module) after a change to boxlang.json. A group of settings can also be changed live from the console, see Live settings.
Lens is off by default. There are two surfaces and you switch them on independently:
- the bar, a strip injected into HTML pages for developers (
bar.enabled) - the console, a standalone page at
/~bxlens/index.bxmfor one server (console.enabled)
At a glance
Pick the goal, then jump to the section.
| I want to | Read |
|---|---|
| Turn the bar on, and decide who sees it | bar, access |
| Turn the console on and set its password | console, Precedence of the console passwords |
| Keep production cheap and safe | collect, collectors, async |
| Name this server and group it in the fleet | server, fleet |
| Keep errors and reports across restarts | store, secrets |
| Use the AI assistant | ai, MCP servers |
| Change what counts as slow | thresholds, checks |
| Change the bar look and the editor links | ui, editor |
| Hide secrets and cap what the page gets | redact, limits |
| Register a server for the console | registration |
| Change a value without a restart | Live settings |
| Switch Lens on or off for one request | Per request overrides |
Three pointers: Precedence of the console passwords says which password wins, Live settings says what the console may change, and Per request overrides covers lensEnable() and lensDisable().
The shape of the settings
Every key sits under modules.bxLens.settings. The top level groups are:
flowchart LR
S["modules.bxLens.settings"]
S --> UI["Surfaces: bar, console, ui, inject, contentTypes, excludePaths"]
S --> SEC["Access and safety: access, redact, limits, secrets, registration"]
S --> COL["Collecting: collect, collectors, tabs, checks, thresholds, async, request, history"]
S --> FLT["Server and fleet: server, fleet, volumes, store, notifications"]
S --> AI["Helpers: ai, editor, dev"]
Ways to set a value
Every setting. Restart the runtime or reload the module after a change.
{
"modules": {
"bxLens": {
"settings": {
"bar": { "enabled": true },
"thresholds": { "slowQueryMs": 50 }
}
}
}
}
The live settings only, with no restart. A saved change wins over boxlang.json, and a reset brings the boxlang.json value back. Changing and resetting is BoxLang+, reading is free. See Live settings.
lensEnable() and lensDisable() switch Lens for one request. See Per request overrides.
Start from a recipe
Each recipe uses only documented settings. Merge it into modules.bxLens.settings.
{
"bar": { "enabled": true },
"collect": { "level": "full" },
"ui": { "startOpen": true },
"thresholds": { "slowQueryMs": 50 }
}
full collects everything while you develop. bar.access stays "local".
{
"console": {
"enabled": true,
"password": "bxsecret:...",
"requireHttps": true,
"access": "private",
"publicUrl": "https://lens.acme.com/~bxlens/index.bxm"
},
"collect": { "level": "light" },
"access": {
"trustProxyHeader": true,
"proxyHeader": "X-Forwarded-For",
"proxyPeers": "private"
}
}
light is the production level. The proxy header is believed only from proxyPeers. See access.
{
"console": {
"enabled": true,
"password": "bxsecret:...",
"viewerPassword": "bxsecret:...",
"requireHttps": true,
"access": "local",
"readOnly": true,
"actions": false,
"allowHeapDump": false
}
}
readOnly refuses every change and can only be set in boxlang.json. The viewer login is BoxLang+.
{
"bar": { "enabled": false },
"console": { "enabled": true, "password": "bxsecret:..." },
"collect": { "level": "light" },
"collectors": {
"templates": { "enabled": false },
"timers": { "enabled": false }
}
}
Use "off" for collect.level to collect nothing at all.
Defaults
The full default settings, for reference.
bar
When you touch this: you want the bar, or you want to decide who sees it. The bar shows only to callers the rule allows. Everyone else is not tracked for the bar. See Security.
| Setting | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Show the bar to allowed callers. |
access | string or list | "local" | Who may see the bar. "local" (loopback only), "all", or a list of exact IPs, CIDR ranges and the words local and private. private means loopback plus 10/8, 172.16/12, 192.168/16, fc00::/7 and link-local. |
allowAllIPs | boolean | false | A second key for "all". Without it, "all" falls back to loopback and Lens logs an error. |
actions | boolean | true | The buttons of the bar that change something: clear the ColdBox event and view caches, and reinit a ColdBox application. They work for the callers access allows, with a token the page carries, and never when console.readOnly is on. Free. |
Bar layout
The order and visibility of the bar tabs (the designer, BoxLang+) can be seeded under bar.layout, with the same deploy rule: a list that differs from the one applied last replaces the saved layout, and no bar.layout means the saved layout is never touched. An empty list goes back to the default order.
"bar": { "layout": [ { "id": "timeline", "visible": true }, { "id": "queries", "visible": true }, { "id": "scopes", "visible": false } ] }
The layout is saved in the settings file (section layout), so servers that share the file share it. A layout saved by an older version in config/bxlens-layout.json is shown until the first save or seed.
console
When you touch this: you turn the console on, set its password, or lock it down. The console needs enabled: true and a password. See Console.
| Setting | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Turn the console on. It also starts collecting every request. |
password | string | "" | The admin password. Use a bxsecret: value. A password set in the console wins over it (see Precedence of the passwords). With neither, or an undecryptable value, the console is unavailable (the page answers 503 with setup help). |
viewerPassword | string | "" | An optional second password for the viewer role. A viewer can look at every page but cannot change anything, and cannot download thread dumps, heap dumps, log files or the diagnostic bundle, or read cache values. Use a bxsecret: value. It is ignored when no admin password is set, and a viewer password set in the console wins over it. The viewer login is BoxLang+. See Roles. |
requireHttps | boolean | false | Refuse the console over plain HTTP with a 403. Loopback callers are exempt. Turn it on in production. When it is off and a non-loopback caller uses HTTP, the console shows a warning banner. |
access | string or list | "local" | Same rule format as bar.access. "all" needs no second key but logs a warning. A caller that is not allowed gets a plain 404. |
actions | boolean | true | Allow the actions on the server: run, pause, resume and reload of scheduled tasks, cache evict, reap and clear, restart and remove on Applications, start, stop and restart on Watchers, the Mail queue actions, and the approved actions of Lensy. Most also need BoxLang+ or a trial. When false the buttons are disabled and the server refuses the calls (denied.actions in the audit log). |
readOnly | boolean | false | View only. The console refuses every change: settings, passwords and secrets, notification and channel settings, the Mail queue, the AI settings and MCP servers, application and watcher actions, task actions, the bar layout, cache clear, evict and reap, integration switches, resets of the Queries, Errors and Reports counters, and Run GC. The routes it lets through are named in the code: heap dumps (own switch), the connection test of a datasource, the AI calls and the chat with Lensy. It can only be set in boxlang.json. See View only. |
allowHeapDump | boolean | false | Offer a heap dump on the System page, to admins only. Heap dumps also need BoxLang+ or a trial. A heap dump holds everything in memory, including secrets, so read Security first. |
Precedence of the console passwords
The admin and the viewer password each come from one source, in this order:
- A password set in the console (Settings, Security): a salted slow hash in the Secret Store, namespace
auth. It wins. console.passwordandconsole.viewerPasswordinboxlang.json(bxsecret:,${env.NAME}or plain).- Nothing: the console shows the "Set a password first" page.
Reset to boxlang.json removes the console's entry and puts the second source back in charge. This is also the way back in when the console's password is lost, see lockout recovery. The passwords are not live settings: the Settings page never changes them, and the Security page keeps them out of config/bxlens-settings.json.
collect
When you touch this: you move between development (full) and production (light).
| Setting | Type | Default | What it does |
|---|---|---|---|
level | string | "light" | off, light or full. off collects nothing. light is the default and is for production: it skips request headers, bound query parameters, the caller (template and line) of queries, outgoing HTTP calls and transactions, BoxLang frames of exceptions, scope contents, Java stack traces, and the functions, logs, scopes and bifs collectors. SQL text, timings and counts are kept. Use full while you develop. |
tabs
When you touch this: you want to hide a bar tab or a console page.
| Setting | Type | Default | What it does |
|---|---|---|---|
hide | list | [] | Ids of bar tabs and console pages to hide. Bar ids: timeline, queries, exceptions, http, messages, timers, request, scopes, bifs, runtime, plus ids of custom panels. Console ids: overview, requests, inflight, errors, reports, queries, http, ask, executors, tasks, datasources, applications, coldbox, watchers, caches, logfiles, environment, configuration, system, jvm, webserver, threads, modules, orm, aiobs, mail, designer, upgrade. The id queries hides both the bar tab and the console page. Settings is always shown. A disabled collector hides its tab too. |
access
When you touch this: Lens sits behind a proxy, a container name or a load balancer. These extra checks apply to the bar and the console.
| Setting | Type | Default | What it does |
|---|---|---|---|
allowedHosts | list | [] | Restrict to these Host header names. Empty means: any host, except that a guard whose rule is exactly "local" accepts only the names localhost, 127.0.0.1 and [::1] (this stops DNS rebinding, where a web page points its own name at 127.0.0.1). To reach a local-only bar or console under another name, such as myapp.test or a container name, list that name here. |
requireHeader | string | "" | Require a request header: "Name" or "Name=value". Empty means none. |
trustProxyHeader | boolean | true | Behind a proxy or load balancer, take the client address from proxyHeader. The header is only believed when the direct connection comes from one of proxyPeers. The same rule decides whether X-Forwarded-Proto is believed for the HTTPS check. |
See Security.
Core
When you touch this: you place the bar yourself or change which responses and paths are tracked.
| Setting | Type | Default | What it does |
|---|---|---|---|
inject | boolean | true | Inject the bar before </body> on HTML responses. Set false and call lensRender() to place it yourself. |
contentTypes | list | ["text/html"] | Response content types that get the bar. |
excludePaths | list | ["/~bxlens/*", "/favicon.ico"] | Paths that are never tracked. A trailing * is a prefix match. Console paths are always excluded. |
async
When you touch this: almost never. Both keys are boxlang.json only.
request
When you touch this: requests legitimately run longer than the watchdog allows.
| Setting | Type | Default | What it does |
|---|---|---|---|
maxMinutes | number | 10 | A request still running after this many minutes is finished by the watchdog as unfinished: its open spans are closed with an estimate and marked interrupted, it is kept in the console history with the issue "Request never finished", and it leaves the In flight list. Nothing is written to its response. The check runs every five seconds. |
history
When you touch this: you change what the Requests page records, the id header, or the history size.
| Setting | Type | Default | What it does |
|---|---|---|---|
trackNonHtml | boolean | empty | Record JSON, SSE, file and redirect requests too. They show no bar. Empty means off at collect.level light and on at full. A request that is not kept costs no snapshot, no issue analysis and no history entry; the console totals still count it. |
header | string | "X-BxLens-Id" | Response header that carries the request id. |
maxRequests | number | 250 | Size of the in-memory ring buffer, up to 250 is what the Requests page is made for. The oldest request is recycled when full. On Free the buffer is capped at 25. See Licensing. |
server
Every environment variable BxLens reads is listed in Environment Variables. They all start with BXLENS_. That page also shows how to set any setting from the environment with the BoxLang convention.
When you touch this: the machine does not report the identity you want, for example in a container or behind NAT. Leave the keys empty to detect.
Which machine produced a record. Every tracked request, error group and sample, report, query statistic, in-flight entry, history entry, export, audit line and file of the disk store carries this identity, so the data of many servers can be sent to one place and told apart. See Server identity.
Lens detects the identity once at start and looks again at most every five minutes. It never does a lookup while a request runs.
| Setting | Type | Default | What it does |
|---|---|---|---|
name | string | "" | The host name. Empty reads the environment variable BXLENS_SERVER_NAME, then asks the operating system, then reads HOSTNAME or COMPUTERNAME. |
address | string | "" | The primary address. Empty reads BXLENS_SERVER_ADDRESS, then takes the first IPv4 address of an interface that is up, not loopback and not virtual, then IPv6, else 127.0.0.1. The other addresses are listed too. |
id | string | "" | The id of this instance. Empty reads BXLENS_SERVER_ID, then makes a short id from the host name and the start time of the JVM, so it is stable for one start and differs after a restart. Set it when a fixed id per server is wanted. |
group | string | "" | The group this server belongs to, for the fleet on the Overview, for example prod-web or batch. 1 to 32 characters of letters, digits, space, _, - and .. Empty reads BXLENS_SERVER_GROUP, and none means no group. A name that is not valid is ignored with a warning in the log. |
kind | string | "" | What kind of place this server runs in, which sets its icon and label on the fleet: host, docker, swarm, kubernetes, podman, lxc, lambda, ecs, cloud-run or azure. Empty reads BXLENS_SERVER_KIND, then detects it (see below). A value that is not in the list is ignored with a warning. |
All five are boxlang.json only.
fleet
When you touch this: the Overview marks servers degraded or critical too early or too late. It judges each server of the fleet as healthy, degraded, critical, silent or gone. See Overview. Every key can be changed in Settings (changing needs BoxLang+); each server judges the fleet with its own values.
| Setting | Type | Default | What it does |
|---|---|---|---|
heapWarn | number | 80 | Heap used, in percent, from which a server is degraded. |
heapCrit | number | 90 | Heap used, in percent, from which a server is critical. Must be above heapWarn. |
errorWarn | number | 1 | Share of requests that answered 5xx, in percent, from which a server is degraded. |
The limits for the fullest disk are the existing volumes.warnPct and volumes.critPct, so a full disk means the same on the Overview and on the System page. A deadlock and requests waiting for a connection always make a server critical, and failing scheduled tasks always make it degraded. A change that puts a warn value at or above its critical value is refused. The folder of a gone server stays until store.staleAfterHours or the retention removes it, or until an admin forgets it on the Gone tab.
ui
When you touch this: you change how the bar looks and opens.
| Setting | Type | Default | What it does |
|---|---|---|---|
theme | string | "auto" | auto follows the OS. Or dark, light. |
startOpen | boolean | false | Start with the panel open instead of the collapsed strip. |
autoOpenOnException | boolean | true | Open the panel on Issues when an exception was caught. |
defaultTab | string | "timeline" | Tab shown first. |
hotkey | string | "Ctrl+`" | Toggle shortcut. Modifiers: Ctrl, Alt, Shift, Meta. |
thresholds
When you touch this: you decide what counts as slow or suspicious.
| Setting | Type | Default | What it does |
|---|---|---|---|
slowRequestMs | number | 500 | Requests slower than this raise an issue. Also starts the slow request sample. |
slowQueryMs | number | 25 | Queries slower than this warn. At 4 times this value they are critical. |
slowTemplateMs | number | 100 | Templates and functions with a self time above this raise an issue. |
nPlusOneMin | number | 3 | Runs of the same SQL needed to flag an N+1. |
notifications
When you touch this: you give Slack or Teams channels a proxy host, set the SMTP password, or seed the whole of the notification settings from boxlang.json for every server (BoxLang+).
| Setting | Default | What it does |
|---|---|---|
channelHosts | [] | More hosts that a Slack or Teams channel may post to, for a proxy of yours: a name such as hooks.proxy.example.com, or *.example.com for the domain and everything below it. Slack is hooks.slack.com and Teams is *.logic.azure.com, *.webhook.office.com and *.powerplatform.com without it. Telegram is always api.telegram.org, and a webhook may post to any public https host. An address must still resolve to public addresses and be https. boxlang.json only, not a live setting. |
smtp.password | "" | The SMTP password as a bxsecret: value. boxlang.json only. A password set in the console (write only, Settings, Notifications or Security, kept in the Secret Store) wins over it, and the variable named in Settings, Notifications comes last. |
Seed the notification settings
Everything you can set in Settings, Notifications has a counterpart here. It is a seed: BxLens applies a section at startup when its value is different from the one applied last, and a change made in the console afterwards is kept until the next deploy that changes that section. A section you leave out is never touched. The same rule as for live settings applies.
"notifications": {
"general": { "enabled": true, "maxPerHour": 30 },
"smtp": {
"host": "smtp.postmarkapp.com", "port": 25, "security": "starttls",
"username": "cloudservices@ortussolutions.com", "from": "cloudservices@ortussolutions.com",
"fromName": "BxLens", "replyTo": "", "timeoutSeconds": 15,
"password": "bxsecret:..."
},
"recipients": [
{ "email": "ops@example.com", "name": "Ops", "minSeverity": "warn", "categories": [ "jvm", "errors", "database" ],
"alerts": true, "reports": { "daily": true, "weekly": false, "monthly": false } }
],
"channels": [
{ "id": "ops-slack", "type": "slack", "name": "Ops", "enabled": true, "rules": [ "*" ], "minSeverity": "crit",
"reports": [ "daily" ], "urlEnv": "BXLENS_CHANNEL_OPS_SLACK" },
{ "id": "oncall", "type": "telegram", "name": "On call", "chatId": "-1001234567890", "rules": [ "server-down", "deadlock" ],
"minSeverity": "crit", "token": "bxsecret:..." },
{ "id": "pager", "type": "webhook", "name": "Pager", "rules": [ "*" ], "url": "bxsecret:...", "signingKeyEnv": "BXLENS_CHANNEL_PAGER_KEY" }
],
"rules": {
"heap-pressure": { "enabled": true, "severity": "crit", "repeatMinutes": 60, "heapPct": 90, "minutes": 5 },
"datasource": { "enabled": true }
},
"reports": { "time": "07:00", "zone": "America/Chicago", "weekday": "MON", "monthDay": 1 }
}
| Section | Replaces | Notes |
|---|---|---|
general | the master switch and maxPerHour | pausedUntil is runtime only and is never seeded. |
smtp | the whole SMTP block | host must be present or the section is skipped. The password is never copied: it comes from smtp.password, the Secret Store or the variable named in passwordEnv (which must start with BXLENS_SMTP_). |
recipients | the whole list | At most 50, the address is the key. Fields as in the console: minSeverity, categories, alerts, reports. |
channels | the whole list | At most 20, id is the key and is required (a to z, 0 to 9, dash, underscore). Secrets: see below. |
rules | the whole map | The 21 alert ids and their limits. A rule you leave out keeps its default. |
reports | the report schedule | time, zone, weekday, monthDay. |
Secrets of a channel. The address of a Slack, Teams or webhook channel goes in url or urlEnv, the bot token of Telegram in token or tokenEnv, and a webhook signing key in signingKey or signingKeyEnv. A value is a bxsecret: value. An ...Env field is the NAME of an environment variable and must start with BXLENS_CHANNEL_, so no other variable of the server can be sent out. A plain address in the file is refused, so a webhook cannot be committed by accident. When a section is applied, the secrets are put in the Secret Store (channels/<id>), and from then on a seeded channel is the same as one added in the console. A channel without a secret field keeps the one already in the Secret Store. Every check of the console applies (https only, public addresses, the host of the type).
An entry or a section that is not valid is left out, a warning is logged, and Settings, Notifications lists what was not applied. The other sections are still taken.
Where the saved settings live: in the settings file (console.overridesFile, default config/bxlens-settings.json), as the section notifications, so servers that share the file share the notification settings (see sync). Earlier versions kept them in the disk store; the first start of this version copies them into the file once.
volumes
When you touch this: the System page colors a disk too early or too late.
| Setting | Default | What it does |
|---|---|---|
warnPct | 80 | A volume this full (percent used) is shown amber on the System page. |
critPct | 90 | A volume this full is shown red. |
Both are live settings. The disk space alert has its own limit (usedPct, 90 by default), set in Notifications.
checks
When you touch this: you turn off the security header notes or the slow request sample.
| Setting | Type | Default | What it does |
|---|---|---|---|
securityHeaders | boolean | true | Add Notes for missing security headers and cookie flags on HTML responses. See Issues. |
slowSample | boolean | true | Sample the request thread once when it passes thresholds.slowRequestMs. |
store
When you touch this: you keep errors and reports across restarts, or share one folder between servers. The disk store needs BoxLang+ or a trial. Without one, Errors and Reports stay in memory and store has no effect. See Licensing. Every store setting is boxlang.json only: the console cannot change them, because staleAfterHours and maxMB delete the folders of other servers.
| Setting | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | Use the disk store when the license allows it. |
dir | string | "" | The shared store folder. Empty reads BXLENS_STORE_DIR, then means lens-data in the BoxLang home. Each server writes only its own subfolder (see instanceFolder), so many servers can share one volume. In a container, point it at a mounted volume. |
retentionDays | number | 15 | How long saved data is kept, from 1 to 30. 30 is a hard maximum, higher values are cut to it. |
maxMB | number | 500 | Size cap for the whole store folder, all servers together. When it is reached the oldest day goes first, and the cap wins over the retention. |
Other ways to set them: store.dir falls back to BXLENS_STORE_DIR, and store.instanceFolder falls back to BXLENS_INSTANCE_FOLDER, then the host name.
sync
When you touch this: several servers share one settings file (console.overridesFile) and you want a change saved on one server to reach the others without a restart. See Several servers that stay in sync.
| Setting | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Each server looks at the settings file and applies what another server saved. Off by default. boxlang.json only, a change needs a restart. |
pollSeconds | int | 5 | Seconds between two looks, 1 to 3600. The server compares the modified time and the size of the file. It does not wait for events of the file system, because those are not reliable on a network volume. |
secrets
When you touch this: you share secrets between servers or keep the key off the volume. The Secret Store keeps small named secrets (passwords, tokens) sealed on disk for BxLens itself. It is free on Free and Plus. Setting it is boxlang.json only: it is not a live setting and the console cannot change it. See The Secret Store.
| Setting | Type | Default | What it does |
|---|---|---|---|
dir | string | "" | The folder that holds secrets.key and secrets.json. Empty means config/bxlens-secrets in the BoxLang home. Several servers may share one folder on a volume. The folder is never followed when it is a symbolic link. |
The environment variable BXLENS_SECRETS_KEY (base64 of 32 bytes) replaces secrets.key when it is set, which keeps the key off the volume. It is not a setting and is never shown.
ai
When you touch this: you turn on Lensy, Explain with AI and Ask Lens. Optional help from a language model, off by default. See Ask Lens and AI help, Run your own model and the data flow. Everything but apiKey and links can be changed live from the AI page. The assistant is Lensy.
| Setting | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Let the server send prompts and tool results to a model through the bx-ai module. The module ships inside Lens, and the server calls also need BoxLang+ or a trial. See Licensing. |
provider | string | "ollama" | ollama, openai, claude, gemini, mistral, groq, grok, deepseek, openrouter, openai-compatible, cohere or docker. |
model | string | "llama3.2" | The model name. Empty uses llama3.2 for Ollama and the provider default otherwise. |
baseUrl | string | "http://localhost:11434" | The address of the model server. http or https, no user name or password in it. Empty uses the local Ollama address for Ollama and the provider default otherwise. |
actions | boolean | true | Let the assistant propose actions. Each one still needs an Approve click. |
rag | boolean | true | Let the assistant search the bundled documentation. |
apiKey | string | "" | The API key as a bxsecret: value. A key set in the console (write only, Settings, Assistant or Security, kept in the Secret Store) wins over it. It is not a live setting and never enters the saved overrides file. Leave it empty for a local model. |
apiKeyEnv | string | "" | The name of an environment variable that holds the key. It is read last: the key set in the console wins, then apiKey, then this variable. The console refuses anything that is not a variable name. |
links | boolean | true | Show Copy prompt and the Ask ChatGPT and Ask Claude buttons. They send nothing from the server. |
Where the API key comes from, from strongest to weakest:
The key set in the console (write only, Settings, Assistant or Security, kept in the Secret Store). It wins.
ai.apiKey as a bxsecret: value.
ai.apiKeyEnv names the variable that holds the key. It is read last. The console refuses anything that is not a variable name.
MCP servers
The MCP servers Lensy may ask can be seeded in boxlang.json under mcp.servers, and the admin changes them on the AI page while the server runs. The same deploy rule as for the other settings applies: when the list in boxlang.json differs from the one applied last, it replaces the saved list at the next start (an empty list clears it); a restart with the same list keeps what the admin saved; no mcp block in boxlang.json means the saved list is never touched.
"mcp": {
"servers": [
{ "id": "boxlang", "enabled": true, "allowedTools": [ "*" ] },
{ "name": "Acme", "url": "https://mcp.example.com/mcp", "enabled": true, "trusted": false, "allowedTools": [ "lookup" ] }
]
}
A built-in server needs only its id (one of boxlang, coldbox, commandbox, testbox, wirebox, logbox, cachebox, contentbox, qb, quick, cbauth) and the switches enabled and allowedTools. A custom server needs name and url, and gets an id made from the name when you give none. The list is saved in config/bxlens-settings.json (or console.overridesFile) under mcp.servers:
{
"overrides": { },
"mcp": {
"servers": [
{ "id": "boxlang", "builtin": true, "enabled": true, "allowedTools": ["*"] },
{ "id": "acme", "name": "Acme", "url": "https://mcp.example.com/mcp", "builtin": false, "enabled": true, "trusted": false, "allowedTools": ["lookup"] }
]
}
}
The list is checked when it is read, like the console settings: an entry with a bad address, name or id is skipped, listed on the AI page and in the log, and the rest is used. A built-in entry can only change enabled and allowedTools; its address always comes from Lens. See Servers Lensy can ask for the rules. Servers that share the settings file share the list, and with sync.enabled a change reaches them without a restart.
editor
When you touch this: you click from the bar to your editor, or run in a container.
| Setting | Type | Default | What it does |
|---|---|---|---|
linkPattern | string | "vscode://file/{path}:{line}" | Click-to-editor link. {path} and {line} are replaced. The scheme must be one of vscode:, vscode-insiders:, idea:, phpstorm:, subl:, file:, http:, https:, cursor: or zed:. Any other scheme (such as javascript:) is replaced by the default on the server, and the Settings page refuses it. |
remoteBase | string | "" | Path prefix on the server, for example inside a container. |
localBase | string | "" | Path prefix on your machine that replaces remoteBase. |
{
"editor": { "remoteBase": "/app", "localBase": "/Users/me/projects/shop" }
}
redact
When you touch this: your keys or secrets use names that the list does not catch.
| Setting | Type | Default | What it does |
|---|---|---|---|
keys | list | ["password", "pwd", "passwd", "token", "secret", "apikey", "api_key", "authorization", "cookie", "credential"] | A key is masked when its name contains any of these, ignoring case. |
mask | string | "[redacted]" | Replacement text. |
limits
When you touch this: pages get too big or values are cut too short. Caps for any value sent to the page.
collectors
When you touch this: you switch a panel, a console page or an integration on or off. Each collector powers one or more panels and has an enabled flag. Most also have a max that caps stored items per request.
Bar panels, mostly on by default
| Collector | Setting | Default | What it does |
|---|---|---|---|
templates | enabled | true | Template and include tree. |
max | 300 | Max template entries. | |
queries | enabled | true | SQL queries. Also switches the console Queries page, which uses the same id. |
max | 200 | Max query entries. | |
includeParams | false | Show bound parameters. Off by default because bound values can be personal data. Off at light whatever this says. | |
captureCaller | true | Record the template and line that ran each query, ORM call, HTTP call and transaction. Off at light. | |
http | enabled, max, slowMs, errorPct, minCalls, repeat, largeMB | true, 100, 2000, 5, 20, 20, 5 | Outgoing HTTP calls. URLs are passed through the secret masker (user info and secret parameters are hidden), so Copy as cURL cannot expose a credential. max is the number of calls kept for one request. The rest are the limits of the HTTP page: a host is slow when its p95 is above slowMs, a host or endpoint needs attention at errorPct percent of errors once it has minCalls calls, a request that makes the same call repeat times is flagged, and a response above largeMB megabytes is large. |
propagateId | false | Add the request id as X-Request-Id to outgoing calls. Off by default. It only works when core hands Lens a request builder with the event; today it hands an immutable request, so this has no effect yet. boxlang.json only. | |
exceptions | enabled, max | true, 50 | Thrown and caught exceptions. |
messages | enabled, max | true, 200 | Messages and dumps. |
timers | enabled, max | true, 200 | Timers and measures. |
transactions | enabled, max | true, 50 | Transactions, shown as spans on the Timeline. |
jvm | enabled | true | Runtime tab of the bar: a snapshot of the runtime, cached for a few seconds. |
Integrations, opt in except ColdBox
| Collector | Setting | Default | What it does |
|---|---|---|---|
mail | enabled, capture, maxMessages, failurePct, minMessages, spoolMinutes | false, meta, 200, 5, 10, 10 | The Mail integration with bx-mail. Opt in, and it needs a bx-mail that announces the onMail events. capture is meta (addresses, subject, sizes, delivery) or full (BoxLang+: text parts and small inline images, in memory). maxMessages is the number of messages kept (BoxLang+, 10 on Free). The rest are the limits of the page: a failure rate in percent judged after minMessages messages, and the minutes a message may wait in the spool. |
aiobs | enabled, attach, content, maxRuns, failurePct, minCalls, rateLimits, mcpErrors, slowFactor, mcpRateLimited, prices | false, true, off, 500, 5, 20, 3, 4, 3, 30, {} | The AI integration with bx-ai. Opt in, and it needs bx-ai. attach attaches the passive Lens recorder middleware to each agent. content keeps prompts and answers (off, preview, full), redacted, for an admin only. maxRuns is how many runs stay in memory. prices is the price table as JSON (dollars per million tokens of each model), edited on the AI page. The rest are the limits of what needs attention. |
hotspots | enabled, slow, slowAfterMs, sampleEveryMs, maxSeconds, maxConcurrent, keep, never, pauseAboveCpuPct, offAfterMinutes, hide | false, true, 1000, 100, 60, 5, 50, ["/health*", "/~bxlens/*"], 85, 0, server and JDK packages | Hot spots, BoxLang+: looks at the stack of a slow request about ten times a second and shows where its time went. Opt in. Every one is live. slowAfterMs is the start limit, sampleEveryMs the time between looks, maxSeconds the longest one request is looked at, maxConcurrent the requests looked at together (at most 20), keep the requests whose picture stays in memory, never paths that are never looked at, pauseAboveCpuPct the CPU of the server above which looking pauses (0 is off), offAfterMinutes switches it off by itself (0 is never) and hide the class prefixes shown as server frames. |
hotspots | rules | [] | A list of { match, method, startAfterMs }: requests to look at besides the slow ones, for example { "match": "/api/reports/*", "method": "GET", "startAfterMs": 0 }. It follows the deploy rule of the other lists: it replaces the rules in the console when it is new or changed. Not a live setting, and the console adds expiring rules of its own (Watch this URL). |
profiler | enabled, defaultMinutes, maxMinutes, restMinutes, pauseAboveCpuPct, keepDays, maxFileKB | false, 10, 60, 30, 85, 7, 2048 | Bytecode profiler, BoxLang+: records every expression of your code for a session, for the whole server, and shows it as a heatmap on the source. Opt in, needs BoxLang 1.19 or newer (older versions do not have the code profiler), and needs "codeProfilerEnabled": true in the top level of boxlang.json before the deploy, because templates are compiled with the counters. Every one is live. defaultMinutes is the length of a session, maxMinutes the longest (up to 240), restMinutes the rest after a session before a rule may start another (0 is none), pauseAboveCpuPct the CPU of the server above which a session stops and saves (0 is never), keepDays how long sessions are kept and maxFileKB the largest saved session. |
profiler | rules | [] | A list of { match, method, minutes }: requests that start a session, for example { "match": "/checkout", "method": "GET", "minutes": 10 }. It follows the deploy rule of the other lists: it replaces the rules in the console when it is new or changed. Not a live setting. |
orm | enabled | false | The bx-orm integration: listens to onORMQuery, onORMFlush and onORMException and shows the SQL like a normal query. Opt in and needs the bx-orm module (1.7.2 or later) installed: until both are true Lens registers no listener. Live: an admin can switch it from the console Modules or ORM page. The console ORM page is always listed and shows the state. Parameter values need announceQueryParams in the ORM application's ormSettings and queries.includeParams here. |
orm | statisticsApps | [] | The ORM applications whose Hibernate statistics are switched on, as application names, or * for every one. Applications start while the server runs, so BxLens switches them on about every 30 seconds until they are. An application that is not in the list is never switched off by this. Live: the switch on the console ORM page updates the list, so it survives a restart and reaches the servers that share the settings file. Needs bx-orm 1.7.2 or later. |
coldbox | enabled | true | ColdBox support: finds a ColdBox application and registers an interceptor of its own in it. Nothing in the application changes. It does nothing until a ColdBox application is found. Live. |
maxEvents | 50 | Events recorded per request. | |
maxViews | 50 | Views recorded per request. |
Console pages
| Collector | Setting | Default | What it does |
|---|---|---|---|
modules | enabled | true | Console Modules page. |
configuration | enabled | true | Console Configuration page. |
executors | enabled | true | Console Executors page. |
tasks | enabled | true | Console Tasks page. |
datasources | enabled | true | Console Datasources page. |
applications | enabled | true | Console Applications page. |
watchers | enabled | true | Console Watchers page. |
caches | enabled | true | Console Caches page. |
logfiles | enabled | true | Console Logs page. |
environment | enabled | true | Console Environment page and the diagnostic bundle. |
inflight | enabled | true | Console In flight page. |
errors | enabled, prefix, tasks, threads, logs, maxIssues, samples, eventsPerSecond, newPerMinute, perRequest, keepResolvedDays, keepIgnoredDays, keepRegressedDays, keepOpenDays | true, BX, true, true, true, 500, 5, 1000, 20, 10, 0, 0, 0, 0 | Console Errors page, and its settings: what is filed, the limits and how many days an issue of each status is kept (0 is for ever). Every one is live. Ignore rules are made in the console and saved in the settings file. |
reports | enabled | true | Console Reports page. |
ask | enabled | true | Console Ask Lens page. |
system | enabled | true | Console System page. |
jvm | enabled | true | Console JVM page: memory, garbage collection, threads, classes and JIT, and flags. It also switches the GC listener and the sampler behind it. |
threads | enabled | true | The thread list and thread dump routes, now a tab of the JVM page. |
webserver | enabled | true | Console Web server page. |
ai | enabled | true | The console AI page of the assistant (the AI observability page is aiobs). It does not switch AI on: that is ai.enabled. |
The ids logs (the log messages of one request, shown in Messages) and logfiles (the console Logs page) are different collectors. The id queries is shared: collectors.queries.enabled switches the query collector and the console Queries page together.
dev
When you touch this: only while developing Lens itself or testing it.
System properties
Not settings: JVM system properties (-Dname=value) for development.
registration
When you touch this: you give a container its registration key. A server on Free or Trial registers once to use the console. The debug bar needs no registration, and BoxLang+ needs none. See Register. Only boxlang.json sets these, the console cannot.
| Setting | Type | Default | What it does |
|---|---|---|---|
key | string | "" | The registration key from the email. Use it to give a container its key. Keep it out of source control if the repository is public: it is tied to one server name, not secret, but it carries the name and email of the person who registered. |
keyEnv | string | "" | The NAME of an environment variable that holds the key, for example BXLENS_REGISTRATION_KEY. Read when key is empty. |
Set registration.key to the key from the email.
Set registration.keyEnv to the NAME of the variable, for example BXLENS_REGISTRATION_KEY. It is read when key is empty.
The key is tied to the server name: the server.name setting, then the BXLENS_SERVER_NAME environment variable, then the host name. In a container the host name changes on every deploy, so set BXLENS_SERVER_NAME to a fixed name.
Ways to name the server for the key, from first to last: the server.name setting, the BXLENS_SERVER_NAME environment variable, then the host name.
updates
When you touch this: you do not want the server to ask for new versions, or you want to follow the snapshot builds. See Updates.
| Setting | Type | Default | What it does |
|---|---|---|---|
check | boolean | true | Ask the downloads server for a newer version and show it in the sidebar. Notify only. Nothing is downloaded or installed. |
channel | string | auto | auto follows snapshots when the installed build is a snapshot and releases otherwise. latest and snapshot force one. |
Live settings
When you touch this: you want to change a setting from the console with no restart.
- A change applies at once.
- It is saved to
config/bxlens-settings.jsonin the BoxLang home (or the file inconsole.overridesFile) and loaded again at the next start. - A saved change wins over
boxlang.jsonwhile the server runs. The page marks itchangedand offers a reset, which removes the override and brings back the value fromboxlang.json. - A deploy wins over a saved change. BxLens keeps a hash of each
boxlang.jsonvalue as it was last applied. When a value ofboxlang.jsonis different at the next start, the saved change for that one setting is dropped and the new value applies. A restart with the sameboxlang.jsonkeeps every saved change. The first start with this rule only records the hashes and drops nothing. - With
sync.enabledevery server that shares the file picks up a change saved on another server.
Changing and resetting settings is a BoxLang+ feature; reading every value is free. See Console settings.
Which settings are live is fixed in the code (SettingsRegistry). Nothing else can be changed from the browser.
bar.enabled,bar.actions,inject,collect.level,tabs.hide,history.trackNonHtml,history.headerAlwayscollectors.<id>.enabledfor every collector,collectors.queries.includeParams,collectors.queries.captureCallercollectors.mail.*(all butenabled, which every collector has),collectors.aiobs.*,collectors.coldbox.maxEventsandmaxViews,collectors.errors.prefix,tasks,threadsandlogsthresholds.*,checks.*,volumes.*ui.*,limits.*,editor.*ai.*exceptai.apiKeyandai.links(includingai.apiKeyEnv, the NAME of a variable)
console.enabled,access,readOnly,allowHeapDump,overridesFile,sessionMinutes,requireHttps,publicUrlconsole.password,console.viewerPassword,ai.apiKey(shown assetornot set; set in Settings, Security)access.trustProxyHeader,proxyHeader,proxyPeers,bar.access,bar.allowAllIPsstore.*,secrets.dir,sync.*,notifications.channelHostshistory.maxRequests,async.*,ai.links,collectors.http.propagateId
console.maxLoginAttempts,lockoutMinutes,actions,runTimeoutSeconds,maxStreamsaccess.allowedHosts,access.requireHeaderserver.*,request.maxMinutes,history.header,history.serverHeaderredact.*,contentTypes,excludePaths,dev.*,registration.*- the
maxnumbers of the collectors
Settings in the last column are read from boxlang.json and are neither shown nor changed on the Settings page. A password or API key shows only set or not set. A key that is not on the live list is refused by the server with an error. If console.readOnly is true, or the caller is a viewer, nothing can be changed. A value that is not valid, for example a number out of range, is refused and nothing is saved. An entry that is not valid in the saved file is ignored at the next start and a warning is logged.
The saved file is { "overrides": { "thresholds.slowQueryMs": 50 }, "mcp": { "servers": [ ] } }: your changes as dotted keys, and the MCP servers of Lensy (see MCP servers). It never holds a password, a key or a channel address.
Per request overrides
lensEnable() and lensDisable() switch Lens for one request. The access rules still apply.