Complete reference for all ServerBee server and agent configuration options.
ServerBee loads configuration with Figment, which layers values from multiple sources. This page is a complete reference for every configuration option.
Server values are merged in this order, with later sources overriding earlier ones:
Built-in defaults
/etc/serverbee/server.toml
/opt/serverbee/etc/server.toml (the path used by the install script)
server.toml in the working directory
Environment variables prefixed with SERVERBEE_
The Agent uses built-in defaults, then /etc/serverbee/agent.toml, agent.toml in its working directory, and finally SERVERBEE_ environment variables. The managed service uses /opt/serverbee/etc as its working directory, so its third source is /opt/serverbee/etc/agent.toml.
This lets you override effective settings at runtime without editing the TOML file. Compatibility-only fields, such as the Agent's collector.interval, are called out below.
Every TOML key maps directly to an environment variable: add the SERVERBEE_ prefix, uppercase the key, and replace each level of nesting with __ (double underscore). For example, auth.secure_cookie becomes SERVERBEE_AUTH__SECURE_COOKIE.
These variables drive local repo tooling and developer workflows. They are not Figment-backed runtime config for the server or agent binaries.
Environment Variable
Used By
Description
SERVERBEE_PROD_URL
make db-pull, make web-dev-prod
Production base URL used by the database pull script and the frontend prod-proxy workflow
SERVERBEE_PROD_API_KEY
make db-pull
Admin-scoped API key for the production backup API. Do not reuse this for make web-dev-prod
SERVERBEE_PROD_READONLY_API_KEY
make web-dev-prod
Member-scoped API key injected by the frontend dev proxy for live production browsing
ALLOW_WRITES
make web-dev-prod
Local opt-in override. Set to 1 to disable the proxy's read-method-only block. When set, the UI banner changes from the normal read-only warning to a stronger write-enabled warning
These variables are intentionally scoped to local tooling. ALLOW_WRITES is not a server feature flag; it is an explicit local override for the frontend prod-proxy workflow only.
There is no admin username/password environment variable. On first start (when no users exist) the server auto-creates an admin account with a randomly generated password and prints it once to the server/container logs as a highlighted credentials banner. Capture it from the logs, then on first login you are required to change this password and may optionally choose a different username.
Reset and seed the local synthetic demo dataset. Only allowed with SERVERBEE_DATABASE__PATH=dev-demo.db; creates admin / admin123 and in-memory demo agents for local development
Path to a MaxMind-compatible MMDB file. Non-empty path enables this custom GeoIP database; otherwise admins can download the DB-IP Lite database from Settings → GeoIP Database
SERVERBEE_ASN__MMDB_PATH
""
Path to a DB-IP Lite ASN / MaxMind GeoLite2-ASN MMDB file. Non-empty path enables traceroute ASN enrichment; otherwise admins can download DB-IP Lite ASN from Settings → ASN Database
Tier-2 guardrail for the Firewall Blocklist feature. CIDRs / IPs listed here are refused by POST /api/firewall/blocks even if an administrator tries to insert them. Tier 1 (hard-coded protected ranges: loopback, RFC 1918, link-local, multicast, unspecified) is always enforced.
Environment Variable
Default
Description
SERVERBEE_FIREWALL__ALLOW_LIST
[]
CIDRs / IPs the server refuses to insert into block_list. Tier-2 guardrail layered on top of the hard-coded Tier-1 protected ranges
By default, the Server calls ipapi.is anonymously (100 requests per client IP per UTC day). ServerBee uses the minimal response's proxy, VPN, datacenter, Tor, and abuse flags and derives an IP type, but no numeric risk score. A free account/API key provides 1,000 requests per day and the full response required for the 0–100 score. The Server falls back to ip-api.com only when the primary request fails, including HTTP 429, not when a successful response lacks a score. See IP Quality for details and the fallback's non-commercial/HTTP warning.
Environment Variable
Default
Description
SERVERBEE_IP_QUALITY__RISK_PROVIDER
"ipapi_is"
Primary risk provider. One of: none, ipapi_is, ip-api.
SERVERBEE_IP_QUALITY__RISK_PROVIDER_FALLBACK
"ip-api"
Fallback provider triggered on primary failure. Set to none to disable.
SERVERBEE_IP_QUALITY__IPAPI_IS__API_KEY
--
Optional. A free account key provides 1,000 requests per day and the full response required for the 0–100 score.
SERVERBEE_IP_QUALITY__IPAPI_IS__ENDPOINT
""
Override for self-hosted mirrors or testing. Empty falls back to the built-in default https://api.ipapi.is.
Migration from older versions: Earlier releases supported four paid providers (Scamalytics, IPQualityScore, ProxyCheck, AbuseIPDB) configured via SERVERBEE_IP_QUALITY__{SCAMALYTICS,IPQS,PROXYCHECK,ABUSEIPDB}__*. These env vars are silently ignored. To restore equivalent functionality, fork or vendor the provider implementation from a tag prior to 2026-05-25.
Average-latency cutoffs used to classify network-probe records returned by /api/servers/{id}/network-probes/anomalies and the anomaly_count field on the network-probe overview. Records strictly above very_high_latency_ms are tagged very_high_latency; records above high_latency_ms (and at or below the very-high cutoff) are tagged high_latency.
Environment Variable
Default
Description
SERVERBEE_NETWORK_PROBE__HIGH_LATENCY_MS
500
Avg-latency cutoff (ms) for high_latency classification
SERVERBEE_NETWORK_PROBE__VERY_HIGH_LATENCY_MS
800
Avg-latency cutoff (ms) for very_high_latency classification
Server HTTP base URL (e.g. http://your-server:9527). Agent appends API paths automatically
SERVERBEE_ENROLLMENT_CODE
""
One-time enrollment offer shown when a Server is added or re-enrollment begins. Single-use and short-lived (default 10 min). Only used when token is empty
These variables have sensible defaults and rarely need changing. Adjust them only when you have a specific requirement.
Environment Variable
Default
Description
SERVERBEE_TOKEN
generated when empty
Agent run token. During enrollment the Agent generates and persists one before claim; an explicit environment override is used as provided and is not written to disk
SERVERBEE_FILE__MAX_FILE_SIZE
1073741824
Max file size in bytes for read/download (default 1GB)
SERVERBEE_FILE__DENY_PATTERNS
*.key,*.pem,...
Glob patterns for files the agent refuses to access
Ordered list of public IP services tried at startup and on every IP-change tick. First success wins. Required for agents behind NAT or in containers where interface enumeration can't see the routable IP. Set to [] to skip external lookups for air-gapped deployments
Pinned release source base URL the Agent downloads upgrades from. Any HTTPS host mirroring the GitHub releases path layout {base}/download/v{version}/{asset} and {base}/download/v{version}/sha256sums.txt works. Compile-time default is overridable via the SERVERBEE_RELEASE_REPO build-time env
SERVERBEE_UPGRADE__RELEASE_CERT_SPKI_SHA256
""
Optional TLS certificate SPKI pin for the release host. 64 lowercase hex chars = SHA-256 of the leaf cert SubjectPublicKeyInfo DER. Empty = disabled. If set, the Agent additionally pins the leaf cert SPKI after standard chain validation. Invalid (non-64/non-hex) values are rejected at startup
Tunes the agent-side security event detectors (SSH login / brute force, port scan). Detection runs entirely on the agent; the server only stores events and evaluates alert rules. Configure per-host since traffic profiles differ.
Environment Variable
Default
Description
SERVERBEE_SECURITY__ENABLED
true
Master switch for all security detectors. When false the agent emits no security_event messages
SERVERBEE_SECURITY__SSH__WINDOW_SECONDS
60
Sliding window length (seconds) for SSH brute-force detection
SERVERBEE_SECURITY__SSH__FAILED_THRESHOLD
10
Failed SSH attempts within the window that trigger an ssh_brute_force event. Queue clears after firing
Reset and seed the synthetic local development dataset. Guarded to database.path = "dev-demo.db" so it cannot accidentally run against normal local or production-copy databases
Days to keep hourly aggregated network probe records
audit_logs_days
u32
180
Days to keep audit log entries
traffic_hourly_days
u32
7
Days to keep hourly traffic records
traffic_daily_days
u32
400
Days to keep daily traffic records
task_results_days
u32
7
Days to keep task execution results
docker_events_days
u32
7
Days to keep Docker event records
service_monitor_days
u32
30
Days to keep service monitor check records
security_event_days
u32
30
Days to keep security event records (SSH login/brute force, port scan)
ip_quality_event_days
u32
90
Days to keep IP quality status-change event records
Raw metric records are written every 60 seconds and retained for 7 days by default. The hourly aggregator computes averages so you can keep 90 days of long-term trends without excessive storage. Tune these values to match your disk space and monitoring needs.
Path to a MaxMind-compatible MMDB file. Non-empty path enables this custom GeoIP database; if empty, the UI can download DB-IP Lite into the server data directory
Path to a DB-IP Lite ASN / MaxMind GeoLite2-ASN MMDB file. Non-empty path enables this custom ASN database; if empty, the UI can download DB-IP Lite ASN into the server data directory. Used to label each traceroute hop with its autonomous system
Resend API key (resend.com/api-keys). Required to use the Email notification channel. The from address on each email channel must belong to a domain verified at resend.com/domains
Base URL for agent upgrade release assets. The server appends /download/v{version}/ to construct the asset download URL
latest_version_url
string
""
Optional custom URL for latest version API. If empty, the server queries GitHub API to determine the latest version. Use this to override with a custom version endpoint
channel
string
"stable"
Release channel used by the dashboard version check. Set to "beta" to select the newest published GitHub prerelease
Public Push Relay HTTPS URL. Empty disables notification registration. Apple signing keys stay exclusively in the Worker.
Set SERVERBEE_PUSH_RELAY__URL to the final HTTPS Worker URL. “Verified” here means authenticated Server account, installation and session ownership; there is no App Attest or Relay grant. The app registers its token, APNs environment and per-installation content key with the Server over HTTPS. The Server encrypts content and sends token, environment, event identity, expiry and envelope to the Worker's public POST /v1/send. Local Server fixtures may use http://127.0.0.1:<port>; the app requires HTTPS and rejects redirects.
Worker-only bindings are APNS_TEAM_ID, APNS_KEY_ID, APNS_TOPIC, APNS_ENVIRONMENTS and the APNS_PRIVATE_KEY secret containing PKCS#8 PEM text. They never belong in Server configuration or the app. APNS_TOPIC=app.serverbee matches the official main app; never use the extension identifier app.serverbee.notifications. APNS_ENVIRONMENTS=sandbox,production allows both device environments; topic and APNs hosts are fixed by the Worker. There is no database, challenge/grant lifecycle, version/distribution policy or Bun/OpenSSL runtime. See Cloudflare setup.
The public endpoint accepts abuse risk: known valid tokens can receive junk/generic notifications, while arbitrary traffic or an attacker's own token can consume quota. Strict payload limits, bounded streaming reads, deadlines, concurrency and bounded isolate-local source/target rate limits are best-effort safeguards, not global admission or cost guarantees. Content keys and business plaintext never cross Relay.
The Server retains authenticated subscriptions, recipient checks, durable encrypted outbox/retry, and a 30-minute deadline from original event creation. Alert triggers/recoveries, administrator security-rule matches and owner-only final scheduled-task outcomes remain supported; task success is opt-in. Role/session/subscription/revision changes stop later eligible sends. Terminal ciphertext is erased, and accepted or in-flight notifications cannot be recalled. APNs acceptance is a provider receipt, not proof of device presentation. Shared app/NSE Keychain signing and live device acceptance still require separate verification. See Mobile and Push Relay Operations.
CIDRs / IPs the server refuses to insert into block_list. Tier-2 guardrail on top of the hard-coded Tier-1 protected ranges (loopback + RFC 1918 + link-local + multicast + unspecified). See Firewall Blocklist
By default, the Server calls ipapi.is anonymously (100 requests per client IP per UTC day). ServerBee uses the minimal response's proxy, VPN, datacenter, Tor, and abuse flags and derives an IP type, but no numeric risk score. A free account/API key provides 1,000 requests per day and the full response required for the 0–100 score. The Server falls back to ip-api.com only when the primary request fails, including HTTP 429, not when a successful response lacks a score. Local baseline metadata is available only when a usable GeoIP MMDB is loaded. See IP Quality for details and the fallback's non-commercial/HTTP warning.
Key
Type
Default
Description
risk_provider
string
"ipapi_is"
Primary risk provider. One of: none, ipapi_is, ip-api.
risk_provider_fallback
string
"ip-api"
Fallback provider triggered on primary failure. Set to none to disable.
URL of the ServerBee server (e.g., http://10.0.0.1:9527)
token
string
""
Agent authentication token. When enrollment is needed, the Agent generates and persists this token before claiming the offer; the Server stores only its hash
enrollment_code
string
""
One-time enrollment offer from Add Server or the Server's Agent Authority actions (used only when token is empty; consumed on first successful claim)
Capabilities are owned by the agent host. The agent starts from the default set (CAP_DEFAULT = 1852), applies allow/deny from this block, then applies any --allow-cap/--deny-cap CLI flags, and reports the result to the server. The server cannot override this. See Capabilities for the full key list and enforcement model.
Key
Type
Default
Description
allow
string[]
[]
Capability keys to enable on top of the default set, e.g. ["terminal", "file"]. Valid keys: terminal, exec, upgrade, ping_icmp, ping_tcp, ping_http, file, docker, security_events, firewall_block, ip_quality
deny
string[]
[]
Capability keys to strip from the default set. deny wins over allow. Unknown keys are rejected at startup
temporary_max_duration
string
"24h"
Maximum duration a single temporary capability grant can last (e.g. 30m, 2h, 1d). Used by the host-local serverbee-agent grant CLI. See Capabilities → Temporary grants
state_dir
string
"/var/lib/serverbee"
Directory where the agent persists capability_grants.json (the temporary-grants store). Must be writable by the agent
[capabilities]allow = ["terminal", "file"]deny = ["ip_quality"]# Footgun guard for `serverbee-agent grant --for ...`; defaults to 24h.temporary_max_duration = "24h"state_dir = "/var/lib/serverbee"
Ordered list of services that return the agent's public IP. Tried in sequence at startup and on every check; first success wins. Required for agents behind NAT or in containers. Set to [] to disable external lookups (air-gapped deployments)
Base URL for agent upgrade release assets. Must replicate the GitHub releases directory layout: {base}/download/v{version}/{asset} for binaries and {base}/download/v{version}/sha256sums.txt for checksum verification. The compile-time default is overridable via the SERVERBEE_RELEASE_REPO build-time env var
release_cert_spki_sha256
string
""
Optional TLS SPKI pin for the release host. Set to 64 lowercase hex characters (SHA-256 of the leaf certificate's SubjectPublicKeyInfo DER encoding). Empty disables pinning. If set, the agent additionally validates the leaf cert SPKI after standard chain validation. Invalid format (non-64-char or non-hex) is rejected at startup
The dashboard "latest version" check uses the Server-configured release source (upgrade.release_base_url / upgrade.latest_version_url). Those are separate Server-side settings used only for the dashboard's "latest version" lookup, and are distinct from the Agent's [upgrade] release_repo_url, which governs what the Agent actually downloads. For consistent upgrade behavior, point both the Server and the Agent at the same release repository unless you intentionally want them to track different sources.
How to obtain the SPKI pin for a release host certificate:
Everything else uses sensible defaults. On first startup, ServerBee creates the admin user with a random password and prints it once to the server logs.
server_url = "https://monitor.example.com"token = "<agent-generated persisted token>"[collector]enable_gpu = true # Requires a GPU-enabled build and an NVIDIA driver that provides NVMLenable_temperature = true[file]enabled = trueroot_paths = ["/home", "/var/log", "/etc"]max_file_size = 1073741824deny_patterns = ["*.key", "*.pem", "id_rsa*", ".env*", "shadow", "passwd"][ip_change]enabled = true# external_ip_urls defaults to a curated list of public IP services.# Override only to point at internal mirrors or to disable (set to []).[log]level = "info"file = "/var/log/serverbee/agent.log"