Environment Variables
Ze reads environment variables for daemon-wide settings and BGP protocol
tuning. Config-backed keys have matching paths under environment { }.
Bootstrap, safety, and test keys can be environment-only.
See environment.md for the authoritative list.
Priority for Config-Backed Keys
- OS environment variable (shell, systemd
EnvironmentFile, container runtime) - Config file
environment { ... }block - Built-in default
An OS env var is never overwritten by a config value.
Common Variables
| Variable | Purpose |
|---|---|
ze.user |
User to drop to after binding privileged ports |
ze.pid.file |
Path to PID file written at startup, removed at clean shutdown |
ze.pprof |
Bind pprof HTTP server (e.g. :6060). Empty disables |
ze.hide-version |
Keep the X-Ze-Version build banner off every HTTP response. Default false |
ze.bgp.openwait |
Seconds to wait for peer OPEN after TCP connect |
ze.bgp.announce.delay |
Duration to block between reactor Ready and first UPDATE |
exabgp.api.ack |
ExaBGP bridge: emit done/error ack lines on plugin stdin |
ze.web.certificate |
PKI store entry the web HTTPS listener serves. Empty means self-signed |
ze.looking-glass.certificate |
PKI store entry the looking glass serves. Empty means self-signed |
Config Block Syntax
The same knobs can be expressed in the config file:
environment {
daemon {
pid "/run/ze.pid"
user "zeuser"
}
bgp {
openwait 60
announce-delay 5s
}
pprof ":6060"
hide-version true
exabgp {
api {
ack false
}
}
chaos {
seed 0
rate "0.1"
}
reactor {
cache-ttl 60
}
log {
level INFO
bgp.routes debug
}
}
Discoverability
Shell completion offers env-key suggestions after ze env get and
ze env registered using canonical dot-form keys. Concrete
ze.log.<subsystem> keys (visible in ze env list) are completable
and inspectable via ze env get.
In the interactive CLI operational mode, show env get and
show env registered also offer env-key completion through the
shared command tree. wireEnvHints spells the show in those two paths
as command.VerbShow, the verb registry's own constant, so renaming the
read verb moves the completion paths with it.
Changes in 2026-04
The ExaBGP compatibility surface was trimmed. Every
ze.bgp.daemon.*, ze.bgp.log.*, ze.bgp.tcp.*, ze.bgp.api.*, and
ze.bgp.debug.* variable was either renamed, dropped, or plumbed from
a YANG leaf to a new env key:
| Old | New / Action |
|---|---|
ze.bgp.daemon.pid |
Plumbed to ze.pid.file (YANG leaf kept) |
ze.bgp.daemon.user |
Plumbed to ze.user (YANG leaf kept) |
ze.bgp.daemon.daemonize, drop, umask |
Dropped (use systemd unit file) |
ze.bgp.log.level, destination, short |
Dropped (slogutil owns ze.log.*) |
ze.bgp.tcp.attempts |
Dropped (test harness sends SIGTERM) |
ze.bgp.tcp.delay |
Dropped; new ze.bgp.announce.delay duration |
ze.bgp.tcp.port |
Renamed ze.test.bgp.port (test infrastructure only) |
ze.bgp.tcp.acl |
Dropped (experimental, unimplemented) |
ze.bgp.bgp.openwait |
Renamed ze.bgp.openwait |
ze.bgp.cache.attributes |
Dropped (caching is architectural) |
ze.bgp.debug.pprof |
Renamed ze.pprof (process-wide) |
ze.bgp.debug.* (pdb/memory/rotate/etc.) |
Dropped (use go tool pprof, ze.log) |
ze.bgp.api.ack |
Dropped; exabgp.api.ack handles bridge ack |
ze.bgp.api.chunk, encoder, respawn, ... |
Dropped (Ze manages plugins) |
The ze exabgp migrate --env tool converts surviving keys to Ze YANG
blocks and emits # <key> -- no longer supported comments for dropped
ones so an operator can audit an ExaBGP env file before commit.