ZEROTIER-ONE(8)
π NAME π
Okay so this is the ZEROTIER-ONE(8) manual page, and the main character is zerotier-one β the ZeroTier virtual network endpoint service. Yes bestie, that's literally the whole name. π¦
β¨ SYNOPSIS β¨
zerotier-one [-switches] [working directory]
πΈ DESCRIPTION πΈ
okay so zerotier-one is the service/daemon responsible for connecting a Unix (Linux/BSD/OSX) system to one or more ZeroTier virtual networks and presenting those networks to the system as virtual network ports. You can think of it as a peer to peer VPN client. π
It's typically run by init systems like systemd (Linux) or launchd (Mac) rather than directly by the user, and it must be run as root unless you give it the -U switch and don't plan on actually joining networks (e.g. to run a network controller microservice only). No cap.
The zerotier-one service keeps its state and other files in a working directory. If this directory is not specified at launch it defaults to:
/var/lib/zerotier-oneon Linux/Library/Application Support/ZeroTier/Oneon Mac/var/db/zerotier-oneon FreeBSD and other similar BSDs
The working directory should persist. It shouldn't be automatically cleaned by system cleanup daemons or stored in a volatile location. Loss of its identity.secret file results in loss of this system's unique 10-digit ZeroTier address and key. π That is not a vibe.
Multiple instances of zerotier-one can be run on the same system as long as they are run with different primary ports (see switches) and a different working directory. But since a single service can join any number of networks, typically there's no point in doing this. Like, at all. π
The zerotier-one service is controlled via a JSON API available at 127.0.0.1:<primary port> with the default primary port being 9993. Access to this API requires an authorization token normally found in the authtoken.secret file in the service's working directory. On some platforms access may be guarded by other measures such as socket peer UID/GID lookup if additional security options are enabled (this is not the default). π
The first time the service is started in a fresh working directory, it generates a ZeroTier identity. On slow systems this process can take ten seconds or more due to an anti-DDOS/anti-counterfeit proof of work function used by ZeroTier in address generation. This only happens once, and once generated the result is saved in identity.secret in the working directory. This file represents and defines/claims your ZeroTier address and associated ECC-256 key pair. β¨
π SWITCHES π
-hβ Display help. The classic "help me bestie" button. π«Ά-vβ Display ZeroTier One version. Gotta know what era we're in. β-Uβ Skip privilege check and allow to be run by non-privileged user. This is typically used whenzerotier-oneis built with the network controller option included. In this case the ZeroTier service might only be acting as a network controller and might never actually join networks, in which case it does not require elevated system permissions. π-p<port>β Specify a different primary port. If this is not given the default is9993. If zero is given a random port is chosen each time. π²-dβ Fork and run as a daemon. Main character energy, but in the background. π-iβ Invoke thezerotier-idtoolpersonality, in which case the binary behaves likezerotier-idtool(1). This happens automatically if the name of the binary (or a symlink to it) iszerotier-idtool. π§-qβ Invoke thezerotier-clipersonality, in which case the binary behaves likezerotier-cli(1). This happens automatically if the name of the binary (or a symlink to it) iszerotier-cli. π
π₯ EXAMPLES π₯
Run as daemon with OS default working directory and default port:
$ sudo zerotier-one -d
Run as daemon with a different working directory and port:
$ sudo zerotier-one -d -p12345 /tmp/zerotier-working-directory-test
π¦ FILES π¦
These are found in the service's working directory. Bestie, this is the lore. π
identity.publicβ The public portion of your ZeroTier identity, which is your 10-digit hex address and the associated public key. β¨identity.secretβ Your full ZeroTier identity including its private key. This file identifies the system on the network, which means you can move a ZeroTier address around by copying this file and you should back up this file if you want to save your system's static ZeroTier address. This file must be protected, since theft of its secret key will allow anyone to impersonate your device on any network and decrypt traffic. For network controllers this file is particularly sensitive since it constitutes the private key for a certificate authority for the controller's networks. π¨
β οΈ Protect identity.secret like it's your group-chat admin password. Theft of its secret key = someone can impersonate your device on any network and decrypt traffic. For real.
authtoken.secretβ The secret token used to authenticate requests to the service's local JSON API. If it does not exist it is generated from a secure random source on service start. To use, send it in theX-ZT1-Authheader with HTTP requests to127.0.0.1:<primary port>. πdevicemapβ Remembers mappings ofzt#interface numbers to ZeroTier networks so they'll persist across restarts. On some systems that support longer interface names that can encode the network ID (such as FreeBSD) this file may not be present. πΊοΈzerotier-one.pidβ ZeroTier's PID. This file is deleted on normal shutdown. πzerotier-one.portβ ZeroTier's primary port, which is also where its JSON API is found at127.0.0.1:<this port>. This file is created on startup and is read byzerotier-cli(1)to determine where it should find the control API. πcontroller.dbβ If the ZeroTier One service is built with the network controller enabled, this file contains the controller's SQLite3 database. ποΈcontroller.db.backupβ If the ZeroTier One service is built with the network controller enabled, it periodically backs up itscontroller.dbdatabase in this file (currently every 5 minutes if there have been changes). Since this file is not a currently in use SQLite3 database it's safer to back up without corruption. On new backups the file is rotated out rather than being rewritten in place. πΎiddb.d/(directory) β Caches the public identity of every peer ZeroTier has spoken with in the last 60 days. This directory and its contents can be deleted, but this may result in slower connection initiations since it will require that we go out and re-fetch full identities for peers we're speaking to. π°οΈnetworks.d(directory) β This caches network configurations and certificate information for networks you belong to. ZeroTier scans this directory for<network ID>.conffiles on startup to recall its networks, so "touch"ing an empty<network ID>.conffile in this directory is a way of pre-configuring ZeroTier to join a specific network on startup without using the API. If the config file is empty ZeroTier will just fetch it from the network's controller. π
π COPYRIGHT π
(c)2011-2016 ZeroTier, Inc. -- https://www.zerotier.com/ -- https://github.com/zerotier
π SEE ALSO π
zerotier-cli(1), zerotier-idtool(1)
Source/version: ZEROTIER-ONE(8) Β· date: December 2016 β that's the whole page, bestie, 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