ZEROTIER-CLI(1)
π ZEROTIER-CLI(1) β like, the zerotier-cli manual, but make it make sense π
okay bestie, buckle up β this is the manual page for zerotier-cli, and by the end of it you're gonna be controlling virtual networks like it's nothing. fr fr. π¦
β¨ NAME β¨
zerotier-cli β the lil command line bestie that controls your local ZeroTier virtual network service π
πΈ SYNOPSIS πΈ
zerotier-cli [-switches] <command> [arguments]
that's it. that's the whole vibe. a switch, a command, some arguments, slay. β¨
π DESCRIPTION π
zerotier-cli gives you a simple command line interface to the local JSON API of the ZeroTier virtual network endpoint service, which is zerotier-one(8). so it's basically the group chat between you and the service. π«Ά
By default zerotier-cli must be run as root or with sudo. like, it's not being difficult, it's just a permissions thing. But if you want to let an unprivileged user use zerotier-cli to control the system ZeroTier service, you can create a local copy of the ZeroTier service authorization token in that user's home directory:
sudo cp /var/lib/zerotier-one/authtoken.secret /home/user/.zeroTierOneAuthToken
chown user /home/user/.zeroTierOneAuthToken
chmod 0600 /home/user/.zeroTierOneAuthToken
(The location of ZeroTier's service home may differ by platform. See zerotier-one(8).) π
β οΈ bestie, listen β note that this gives the user the power to connect or disconnect the system to or from any virtual network, which is a significant permission. that's not a small thing. that's main character energy with admin keys. π₯
zerotier-cli has several command line arguments that are visible in help output. The two most commonly used are -j for raw JSON output and -D<path> to specify an alternative ZeroTier service working directory. Raw JSON output is easier to parse in scripts and also contains verbose details not present in the tabular output. The -D<path> option specifies where the service's zerotier-one.port and authtoken.secret files are located if the service is not running at the default location for your system. so basically: -j when you want the receipts in full, -D<path> when your service lives somewhere non-default. iykyk. π
π COMMANDS π
helpβ Displayszerotier-clihelp. the classic "what do i do now" move. π₯Ίinfoβ Shows information about this device including its 10-digit ZeroTier address and apparent connection status. Use-jfor more verbose output. that 10-digit address is your whole identity here, so screenshot it. πΈlistpeersβ This command lists the ZeroTier VL1 (virtual layer 1, the peer to peer network) peers this service knows about and has recently (within the past 30 minutes or so) communicated with. These are not necessarily all the devices on your virtual network(s), and may also include a few devices not on any virtual network you've joined. These are typically either root servers or network controllers. so likeβ¦ it's the "who have i talked to lately" list, not the guest list for your party. πlistnetworksβ This lists the networks your system belongs to and some information about them, such as any ZeroTier-managed IP addresses you have been assigned. (IP addresses assigned manually to ZeroTier interfaces will not be listed here. Use the standard network interface commands to see these.) so if your hand-assigned IP isn't showing up β yeah, that's why, it's not a bug, it's just not invited to this list. πjoinβ To join a network just usejoinand its 16-digit hex network ID. That's it. Then uselistnetworksto see the status. You'll either get a reply from the network controller with a certificate and other info such as IP assignments, or you'll get"access denied."In this case you'll need the administrator of this network to authorize your device by its 10-digit device ID (visible withinfo) on the network's controller. so: 16-digit hex ID to join, 10-digit device ID to get authorized. keep those two numbers straight or you'll be stuck at the door like πleaveβ Leaving a network is as easy as joining it. This disconnects from the network and deletes its interface from the system. Note that peers on the network may hang around inlistpeersfor up to 30 minutes until they time out due to lack of traffic. But if they no longer share a network with you, they can't actually communicate with you in any meaningful way. so they can lurk but they can't talk. blocked, effectively. β
π§ EXAMPLES π§
Join "Earth," ZeroTier's big public party line network. literally the group chat of the internet. π
$ sudo zerotier-cli join 8056c2e21c000001
$ sudo zerotier-cli listnetworks
( wait until you get an Earth IP )
$ ping earth.zerotier.net
( you should now be able to ping our Earth test IP )
Leave "Earth":
$ sudo zerotier-cli leave 8056c2e21c000001
List VL1 peers:
$ sudo zerotier-cli listpeers
see? iconic. no cap. π₯
π COPYRIGHT π
(c)2011-2016 ZeroTier, Inc. β https://www.zerotier.com/ β https://github.com/zerotier
π¦ SEE ALSO π¦
zerotier-one(8), zerotier-idtool(1)
go read those too, bestie, they're the supporting cast and they ate. π
and that's the page!! this was ZEROTIER-CLI(1), dated December 2016, so yeah she's a vintage icon but she still serves. mwah π π β¨
π¦ where this page comes from
- arch rolling: zerotier-one 1.16.2-1 Β· MPL-2.0
- arch rolling: zerotier-one-full 1.16.2-1 Β· custom: ZeroTier SOURCE-AVAILABLE LICENSE
- nixpkgs unstable: zerotierone 1.16.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms