Netzilo client command-line interface (CLI)
Installing the Netzilo client adds a binary called netzilo. It runs as the service that
connects the device to your Netzilo network, and it is also the command-line tool that
controls that service. This page lists every command and flag of the current client.
The service is named Netzilo on Linux (systemd), macOS (launchd) and Windows. The CLI
reaches it through unix:///var/run/netzilo.sock on Linux and macOS and
tcp://127.0.0.1:40836 on Windows.
Stopping the client logs the device out. netzilo down, netzilo service stop,
netzilo service restart, netzilo service uninstall, netzilo debug for and
replacing the binary followed by a restart all log the device out and reset its keys.
A setup-key device then needs netzilo up --setup-key <KEY> again. An SSO device
needs the person at the device to sign in again. A remote session over Netzilo ends
with it. To re-sync without logging out, use netzilo refresh.
Syntax
netzilo [command] [subcommand] [flags]
- Commands:
up,login,down,status,refresh,routes,ssh,service,debug,hook,deploy-user,version. - Subcommands: for example
service install|uninstall|start|stop|restart|runandroutes list|select|deselect. - Flags: global flags work with every command; others belong to one command.
netzilo <command> --helpprints them.
Privileges. On Linux and macOS the daemon socket is open to every local user, so most
commands work without sudo. service, ssh and a foreground up -F with a network
interface need root. On Windows, run service and ssh from an elevated terminal.
Global flags
| Flag | Short | Default | Meaning |
|---|---|---|---|
--config | -c | /etc/netzilo/config.json (Windows %PROGRAMDATA%\Netzilo\config.json) | configuration file |
--daemon-addr | unix:///var/run/netzilo.sock (Windows tcp://127.0.0.1:40836) | how the CLI reaches the service | |
--management-url | -m | https://srv.netzilo.com:443 | management server. Self-hosted: https://<your-domain> |
--admin-url | derived from the management URL | dashboard address used for the sign-in. For srv.netzilo.com it is go.netzilo.com; for a self-hosted server it is the same host | |
--setup-key | -k | setup key for registration | |
--setup-key-file | file that contains the setup key (instead of --setup-key) | ||
--preshared-key | WireGuard pre-shared key. Only peers with the same key can talk to each other | ||
--hostname | -n | the OS hostname | peer name |
--log-level | -l | info | panic, fatal, error, warn, info, debug, trace |
--log-file | /var/log/netzilo/client.log (Windows %PROGRAMDATA%\Netzilo\client.log) | log path. console writes to standard output, syslog to syslog | |
--service | -s | Netzilo | OS service name |
--anonymize | -A | false | hide public IP addresses and domain names in logs and status output |
Environment variables
Every flag can also be set as an environment variable: the prefix NB_, the flag name in
upper case, and dashes replaced by underscores. The legacy prefix WT_ is still read;
NB_ wins.
export NB_CONFIG="/opt/netzilo/config.json"
export NB_MANAGEMENT_URL="https://netzilo.example.com"
netzilo up
More variables are listed in Other environment variables.
Commands
up
Registers the device if needed, signs it in and connects. Without a setup key or access
token, it starts an SSO sign-in: it prints Please do the SSO login in your browser. and
a URL, and on a machine without a desktop also a code. If the client is already
connected, it prints Already connected.
| Flag | Default | Meaning |
|---|---|---|
--foreground-mode, -F | false | run the client in this process instead of the service. Ctrl-C logs the device out |
--userspace-mode, -U | false | userspace network stack: no network interface; peers are reached only through the local SOCKS5 proxy |
--interface-name | wt0 (macOS utun100) | WireGuard interface name. On macOS it must be utun plus a number |
--wireguard-port | 51820 | local WireGuard UDP port |
--pat | sign in with an access token (also NETZILOPAT, or a token stored by deploy-user) | |
--allow-server-ssh | false | allow the built-in SSH server on this peer (the dashboard must allow it too) |
--disable-auto-connect | false | do not connect when the service starts |
--dns-resolver-address | custom address for the local DNS resolver, such as 127.0.0.1:5053. "" clears it | |
--dns-router-interval | 1m | how often domain routes are resolved again |
--external-ip-map | NAT mapping, such as 12.34.56.78/10.0.0.1 or 12.34.56.78/eth1; comma-separated. "" clears it | |
--extra-iface-blacklist | more interfaces to ignore, in addition to the built-in list | |
--network-monitor, -N | on for Windows and macOS, off for Linux | restart the connection when the default route changes |
--enable-rosenpass | false | post-quantum pre-shared key rotation (experimental). See Enable post-quantum cryptography |
--rosenpass-permissive | false | with Rosenpass, also connect to peers without it |
--proxy | upstream proxy for management, signal and relay traffic: http://…, socks5://… or auto (system settings) | |
--socks5-port | 41339 | local SOCKS5 and HTTP proxy port on 127.0.0.1 (NB_SOCKS5_LISTENER_PORT also sets it). netzilo status does not show it |
--web-server-port | 41336 | local control port, used by agent hooks and the browser extension. The TLS variant uses the next port, 41337 |
Flags you pass to up are saved in config.json. A logout rewrites that file with only
the management and dashboard addresses, so pass the flags again at the next up, or bake
global flags into the service with netzilo service install.
# Netzilo Cloud, SSO sign-in
netzilo up
# Self-hosted server
netzilo up --management-url https://netzilo.example.com
# Server or container with a setup key
netzilo up --setup-key AAAA-BBB-CCC-DDDDDD
A foreground run (up -F) as a normal user runs in userspace mode and needs a
writable --config. On Windows, up -F must run as SYSTEM; from an elevated
administrator shell it skips the Windows components that only the service may start
and falls back to userspace mode.
login
Signs the device in without connecting. It takes the same sign-in options as up:
--setup-key, --pat and --management-url.
netzilo login --setup-key AAAA-BBB-CCC-DDDDDD --management-url https://netzilo.example.com
down
Disconnects and logs the device out. It removes the tunnel, restores DNS, routes and
firewall settings, signs the device out of the management server, deletes the session
token and resets the WireGuard keys. The next up registers the device again. There is
no way to stop the client without logging out.
netzilo down
status
Shows the state of the client and its connections.
| Flag | Meaning |
|---|---|
--detail, -d | details for each peer |
--json, --yaml | machine-readable output |
--ipv4 | print only this peer's Netzilo IPv4 address |
--filter-by-ips 100.64.0.10,100.64.0.11 | only these peers; implies --detail |
--filter-by-names peer-a,peer-b | only peers whose name starts with these values |
--filter-by-status connected | only connected (or disconnected) peers |
-A | anonymize |
netzilo status
The output looks like this:
OS: linux/amd64
Daemon version: 4.4.375
CLI version: 4.4.375
Management: Connected
Signal: Connected
Relays: 2/2 Available
Nameservers: 1/1 Available
FQDN: build-server.netzilo.network
Netzilo IP: 100.64.12.7/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 2/3 Connected
| Field | Meaning |
|---|---|
Management, Signal | Connected, or Disconnected with a reason |
Relays, Nameservers | how many relays and DNS servers are reachable |
FQDN, Netzilo IP | this peer's name and address |
Interface type | Kernel when the Linux WireGuard module is in use. Always Userspace on macOS and Windows; it does not show userspace mode (-U) |
Peers count | connected peers out of the peers this device may reach |
netzilo status -d adds a block for each peer:
Peer:
Netzilo IP: 100.64.20.4
Status: Connected
-- detail --
Connection type: P2P
Direct: true
ICE candidate (Local/Remote): host/host
Last connection update: 26 seconds ago
Last WireGuard handshake: 25 seconds ago
Transfer status (received/sent) 2.0 KiB/355 B
Quantum resistance: false
Routes: 10.0.0.0/24
Latency: 20.14ms
Connection type: P2Pmeans a direct tunnel.Relayedmeans traffic goes through a relay because direct UDP is blocked; it works with higher latency.ICE candidatetypes arehost,srflx,prflxandrelay.- When the device is not signed in, the output is
Daemon status: NeedsLogin(orLoginFailed) with the command to run.
refresh
Fetches the network map now instead of waiting for the next sync (about 30 seconds). It sends the current device posture, applies the returned policies, routes and DNS, and never logs the device out. It does not rebuild tunnels that are already up.
netzilo refresh
It prints failed to refresh: client is not connected when the client is down.
routes
Chooses which routes this device uses when several routes cover the same network.
netzilo routes list # ID, network or domains, Selected / Not Selected
netzilo routes select <id> [<id>…] # use these routes only
netzilo routes select <id> -a # add to the current selection
netzilo routes select all
netzilo routes deselect <id>|all
The tray app has the same choice under Network Routes.
ssh
Opens an SSH shell on another peer over the tunnel.
sudo netzilo ssh [user@]host [-p 44338]
- Needs root (Administrator on Windows). The default user is
root; the user must exist on the target. - The target needs both
netzilo up --allow-server-sshand SSH Access turned on for the peer in the dashboard. - The SSH server listens on the peer's Netzilo IP, TCP 44338. Only interactive shells are supported; no file copy or port forwarding.
version
netzilo version
4.4.375
service
Manages the OS service. Run it as root or from an elevated terminal.
| Subcommand | What it does |
|---|---|
install | registers the service, adds the Windows firewall rule Netzilo Client and creates and trusts the Netzilo Edge CA used for TLS inspection. Global flags you pass here, such as --log-level debug or --management-url, are baked into the service |
uninstall | logs the device out, removes the service, the macOS system extension, stale DNS settings, force-installed browser extensions and the NODE_EXTRA_CA_CERTS entry. The CA stays trusted |
start | starts the service |
stop | stops the service and logs the device out, like down |
restart | stop and start; also logs the device out |
run | runs the service in the foreground (used by the OS service manager) |
sudo netzilo service install --log-level debug
sudo netzilo service start
debug
Collects diagnostics.
| Command | What it does |
|---|---|
netzilo debug log level <level> | changes the log level at runtime, without a restart. It returns to the configured level when the service restarts |
netzilo debug bundle | writes a zip with status.txt and every file in the log folder. Linux and macOS: /tmp/netzilo-debug-*/netzilo.debug.*.zip; Windows: %PROGRAMDATA%\Netzilo\netzilo.debug.*.zip. -A anonymizes it |
netzilo debug for <duration> | brings the client down, sets the level to trace, brings it up, waits, brings it down and writes a bundle. Each "down" is a real logout, so the device ends signed out |
For a problem on a device you cannot sign in again yourself, raise the level and bundle
instead of using debug for:
netzilo debug log level debug
# reproduce the problem
sudo netzilo debug bundle
netzilo debug log level info
On Windows the bundle contains secrets. The log folder is also the configuration
folder, so the bundle includes config.json (the WireGuard private key), token.dat,
pat.dat and netzilo-ca-key.pem. Remove them before you share the bundle. See
Report bugs and issues. The bundle fails with
log file is set to console, cannot create debug bundle when the service logs to
the console.
hook
Installs, removes or checks the hooks that send coding-agent actions to the local client for evaluation.
netzilo hook install --framework=claude-code
netzilo hook verify --framework=claude-code
netzilo hook uninstall --framework=claude-code
--framework is claude-code, codex, gemini or openclaw. --url overrides the
evaluation endpoint, http://localhost:41336/evaluate by default. See
Coding Agents.
deploy-user
Creates a user and an access token for it, and stores the token on the device so that
netzilo up signs in with it. Use it for headless devices that must act as a user.
| Flag | Meaning |
|---|---|
--servicetoken | access token of an admin or agent; needed to create the user |
--email, --fullname, --groups a,b, --password | the user to create or update |
--use-current-user | take the e-mail and name from the signed-in OS user |
--tokenname, --tokenexp | name and lifetime (1–365 days) of the token |
--usertoken | store an existing access token instead of creating one |
--apiurl | management URL (default: the configured one) |
--accountid | account id |
--config-file <json> | read the values from a JSON file, with ${VAR} expansion |
--debug | verbose output |
netzilo deploy-user --fullname "Build Agent 01" --email build01@example.com \
--groups "Agents" --tokenname build01 --tokenexp 180 \
--servicetoken nzl_<token> --apiurl https://netzilo.example.com
netzilo up
Other environment variables
| Variable | Effect |
|---|---|
NETZILOSRV | management URL (CLI and tray) |
NETZILOPAT | access token used for the sign-in when no setup key is given |
NB_FORCE_WS=1 | talk to management and signal over WebSocket, for proxies that block HTTP/2 |
NB_WG_KERNEL_DISABLED=true | use userspace WireGuard on Linux |
NB_USE_NETSTACK_MODE=true | userspace network stack; NB_SOCKS5_LISTENER_PORT sets the proxy port |
NB_USE_LEGACY_ROUTING=true | Linux legacy routing, for exit-node clients on hardened kernels |
NB_DISABLE_CUSTOM_ROUTING=true | install no routes; exit nodes stop working |
NZ_SKIP_NFTABLES_CHECK=true | use iptables instead of nftables |
NB_LOG_FORMAT=json | JSON logs |
NB_WG_DEBUG=true | WireGuard debug logging |
NETZILO_HOOK_URL, NETZILO_HOOK_TIMEOUT_MS, NETZILO_HOOK_POLICY, NETZILO_HOOK_SKIP, NETZILO_HOOK_STATE_DIR | coding-agent hook behaviour |
There is no environment variable for connection-setup (ICE) detail. Those lines appear
in the client log at level debug; use netzilo debug log level debug.
Where the service reads its variables. Variables in your shell reach only a foreground run. The service reads its own environment, and a change takes effect at the next service start, which logs the device out.
-
Linux: a systemd drop-in. Run
sudo systemctl edit Netziloand add[Service]andEnvironment=NB_FORCE_WS=1. -
macOS: an
EnvironmentVariablesdictionary in/Library/LaunchDaemons/Netzilo.plist. -
Windows: the
Environmentvalue (REG_MULTI_SZ, oneNAME=valueper line) atHKLM\SYSTEM\CurrentControlSet\Services\Netzilo:reg add HKLM\SYSTEM\CurrentControlSet\Services\Netzilo /v Environment /t REG_MULTI_SZ /d "NB_FORCE_WS=1" /f
Files
| Item | Linux | macOS | Windows |
|---|---|---|---|
| Configuration | /etc/netzilo/config.json | same | %PROGRAMDATA%\Netzilo\config.json |
| Log | /var/log/netzilo/client.log | same | %PROGRAMDATA%\Netzilo\client.log |
| Session token | /etc/netzilo/token.dat | same | %PROGRAMDATA%\Netzilo\token.dat |
| Access token store | ~/.config/netzilo/pat.dat | ~/Library/Application Support/Netzilo/pat.dat | %PROGRAMDATA%\Netzilo\pat.dat |
| TLS-inspection CA | /etc/netzilo/netzilo-ca.pem | same | %PROGRAMDATA%\Netzilo\netzilo-ca.pem |
| Binary | /usr/bin/netzilo | /Applications/Netzilo.app/Contents/MacOS/netzilo | %PROGRAMDATA%\Netzilo Client\netzilo.exe |
On Windows, %PROGRAMDATA%\Netzilo Client holds the program files and
%PROGRAMDATA%\Netzilo holds configuration, tokens and logs. A non-admin install has no
service: a per-user client runs in userspace mode with
%PROGRAMDATA%\netzilo\usservice<N>.json and .log, on per-user ports.
Logs rotate at 5 MB, keep 10 files for 30 days and are compressed.
Tray app
The tray app (netzilo-ui) menu: status line, Connect, Disconnect, Refresh,
Record Session (Windows), Admin Panel, Workspaces (Windows: Terminate All,
Reset Contents), Network Routes, Advanced (Allow SSH, Connect on
Startup, Enable Quantum-Resistance, Server Settings), Support (Collect
Data, Open Logs Folder), Version and Quit.
When the login expires, the app shows Netzilo Session Expired and netzilo status
shows NeedsLogin. Click Connect or run netzilo up to sign in again.
Related Documentation
- Install Netzilo - install and enrol the client on every platform
- Troubleshooting client issues - read
netzilo statusand the log by symptom - Report bugs and issues - collect and redact a debug bundle
- Enable post-quantum cryptography - Rosenpass flags
- Routes - the routes
netzilo routesselects from

