Sponsor:

Your company here, and a link to your site. Click to find out more.

zerotier-cli - Man Page

control local ZeroTier virtual network service

Synopsis

zerotier-cli [-switches] <command> [arguments]

Description

zerotier-cli provides a simple command line interface to the local JSON API of the ZeroTier virtual network endpoint service zerotier-one(8).

By default zerotier-cli must be run as root or with sudo. If you want to allow an unprivileged user to use zerotier-cli to control the system ZeroTier service, you can create a local copy of the ZeroTier service authorization token in the 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).)

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.

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.

Commands

Examples

Join "Earth," ZeroTier's big public party line network:

$ 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 Also

zerotier-one(8), zerotier-idtool(1)

Referenced By

zerotier-idtool(1), zerotier-one(8).

December 2016