zerotier-cli
Manage ZeroTier networks
TLDR
Join a network
List networks
List peers in a readable format
Leave a network
Display the status of ZeroTier One
SYNOPSIS
zerotier-cli <command> [<arguments>]
Many commands have their own specific options and arguments.
PARAMETERS
help [<command>]
Displays usage information for zerotier-cli or a specific subcommand.
info
Show information about the local ZeroTier node, including status, address, and online/offline state.
status
Provides the current operational status of the ZeroTier service.
listnetworks
List all ZeroTier networks the node is currently connected to or attempting to join.
join <network_id>
Join a ZeroTier network using its 16-digit hexadecimal ID. Authorization might be required on the network controller.
leave <network_id>
Leave a ZeroTier network, disconnecting from it.
listpeers
List all peer nodes currently connected or known to the local node, showing their address and status.
setprimaryport <port>
Set the primary UDP port for the ZeroTier service (usually requires service restart).
getid
Print the local ZeroTier node's 10-digit ID.
orbit <world_id> <secret>
Establish a direct orbit connection to a known 'planet' (ZeroTier root server) for improved peering.
deorbit <world_id>
Remove an established direct orbit connection.
dump
Dump the full internal state of the ZeroTier node in JSON format, useful for debugging.
DESCRIPTION
zerotier-cli is the command-line interface for the ZeroTier service, a peer-to-peer VPN solution that creates virtual Ethernet networks over the internet. It allows users to control and monitor their local ZeroTier node, join or leave virtual networks, view network status, list connected peers, and manage authorized devices. It acts as a client to the local zerotier-one service, enabling programmatic interaction with the ZeroTier network stack without needing a graphical user interface. This tool is essential for headless servers, automation scripts, and advanced users who require fine-grained control over their ZeroTier connections and configurations. It simplifies the management of secure, low-latency, and encrypted global area networks.
CAVEATS
The zerotier-one service daemon must be running for zerotier-cli to function.
Certain commands, such as modifying system-wide settings or network interfaces, may require root or administrator privileges.
ZeroTier network IDs are 16-digit hexadecimal identifiers.
On many systems, zerotier-cli does not have a traditional man page; the primary documentation is available via zerotier-cli help and the official ZeroTier documentation.
USAGE WITH <I>ZEROTIER-ONE</I> DAEMON
zerotier-cli communicates with the local zerotier-one service via its API socket. This daemon must be running in the background for any zerotier-cli command to execute successfully and interact with the ZeroTier network.
CONFIGURATION FILES
ZeroTier's primary configuration and persistent data (such as node identity, network configurations, and certificates) are typically stored in a platform-specific directory. On Linux, this is commonly /var/lib/zerotier-one.
HISTORY
ZeroTier was founded around 2012, aiming to create a global peer-to-peer virtual Ethernet network. zerotier-cli has been a fundamental component since the early days, providing a robust command-line interface to the zerotier-one daemon. Its development has focused on offering programmatic control over the ZeroTier network stack, making it indispensable for automation, scripting, and managing headless servers in various deployment scenarios. The command's structure and core functionality have remained consistent, reflecting ZeroTier's stable architecture.


