Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Manual Pages and Other Documentation

Use "./build.sh" to build the manual pages.

You'll need either Node.js/npm installed (script will then automatically install the npm *marked-man* package) or */usr/bin/ronn*. The latter is a Ruby program packaged on some distributions as *rubygem-ronn* or *ruby-ronn* or installable as *gem install ronn*. The Node *marked-man* package and *ronn* from RubyGems are two roughly equivalent alternatives for compiling Markdown into roff/man format.
You'll need either Node.js/npm installed (script will then automatically install the npm *marked-man* package) or *ronn*. The latter is a Ruby program packaged on some distributions as *rubygem-ronn* or *ruby-ronn* or installable as *gem install ronn*. The Node *marked-man* package and *ronn* from RubyGems are two roughly equivalent alternatives for compiling Markdown into roff/man format.
69 changes: 38 additions & 31 deletions doc/build.sh
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
#!/bin/bash

export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

if [ ! -f zerotier-cli.1.md ]; then
echo 'This script must be run from the doc/ subfolder of the ZeroTier tree.'
echo 'This script must be run from the doc/ subfolder of the ZeroTier tree.'
fi

rm -f *.1 *.2 *.8
ronn_build() {
echo "Using ronn"

if [ -e /usr/bin/ronn -o -e /usr/local/bin/ronn ]; then
# Use 'ronn' which is available as a package on many distros including Debian
ronn -r zerotier-cli.1.md
ronn -r zerotier-idtool.1.md
ronn -r zerotier-one.8.md
else
# Use 'marked-man' from npm
NODE=/usr/bin/node
if [ ! -e $NODE ]; then
if [ -e /usr/bin/nodejs ]; then
NODE=/usr/bin/nodejs
elif [ -e /usr/local/bin/node ]; then
NODE=/usr/local/bin/node
elif [ -e /usr/local/bin/nodejs ]; then
NODE=/usr/local/bin/nodejs
else
echo 'Unable to find ronn or node/npm -- cannot build man pages!'
exit 1
fi
fi
ronn -r zerotier-cli.1.md
ronn -r zerotier-idtool.1.md
ronn -r zerotier-one.8.md
}

marked_man_build() {
NODE="$1"
MARKED_MAN="node_modules/marked-man/bin/marked-man"

echo "Using marked-man"

if [ ! -f node_modules/marked-man/bin/marked-man ]; then
if [ ! -f "$MARKED_MAN.js" ]; then
echo 'Installing npm package "marked-man" -- MarkDown to ROFF converter...'
npm install marked-man
npm install marked-man
fi

$NODE node_modules/marked-man/bin/marked-man zerotier-cli.1.md >zerotier-cli.1
$NODE node_modules/marked-man/bin/marked-man zerotier-idtool.1.md >zerotier-idtool.1
$NODE node_modules/marked-man/bin/marked-man zerotier-one.8.md >zerotier-one.8
fi
$NODE "$MARKED_MAN" zerotier-cli.1.md > zerotier-cli.1
$NODE "$MARKED_MAN" zerotier-idtool.1.md > zerotier-idtool.1
$NODE "$MARKED_MAN" zerotier-one.8.md > zerotier-one.8
}

command_exists() {
type "$1" > /dev/null 2>&1
}

rm -f *.1 *.2 *.8
echo "Building man pages..."

exit 0
# Use 'ronn' which is available as a package on many distros including Debian
if command_exists "ronn"; then
ronn_build
# Use 'marked-man' from npm
elif command_exists "node"; then
marked_man_build "node"
elif command_exists "nodejs"; then
marked_man_build "nodejs"
else
echo 'Unable to find ronn or node/npm -- cannot build man pages!'
exit 1
fi
83 changes: 36 additions & 47 deletions doc/zerotier-cli.1
Original file line number Diff line number Diff line change
@@ -1,83 +1,72 @@
.TH "ZEROTIER\-CLI" "1" "December 2016" "" ""
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "ZEROTIER\-CLI" "1" "April 2026" ""
.SH "NAME"
\fBzerotier-cli\fR \- control local ZeroTier virtual network service
.SH SYNOPSIS
.P
\fBzerotier\-cli\fP [\-switches] <command> [arguments]
.SH DESCRIPTION
.P
\fBzerotier\-cli\fR \- control local ZeroTier virtual network service
.SH "SYNOPSIS"
\fBzerotier\-cli\fR [\-switches] \fIcommand\fR [arguments]
.SH "DESCRIPTION"
\fBzerotier\-cli\fR provides a simple command line interface to the local JSON API of the ZeroTier virtual network endpoint service zerotier\-one(8)\.
.P
By default \fBzerotier\-cli\fR must be run as root or with \fBsudo\fP\|\. If you want to allow an unprivileged user to use \fBzerotier\-cli\fR to control the system ZeroTier service, you can create a local copy of the ZeroTier service authorization token in the user's home directory:
.P
.RS 2
By default \fBzerotier\-cli\fR must be run as root or with \fBsudo\fR\. If you want to allow an unprivileged user to use \fBzerotier\-cli\fR to control the system ZeroTier service, you can create a local copy of the ZeroTier service authorization token in the user's home directory:
.IP "" 4
.nf
sudo cp /var/lib/zerotier\-one/authtoken\.secret /home/user/\.zeroTierOneAuthToken
chown user /home/user/\.zeroTierOneAuthToken
chmod 0600 /home/user/\.zeroTierOneAuthToken
.fi
.RE
.IP "" 0
.P
(The location of ZeroTier's service home may differ by platform\. See zerotier\-one(8)\.)
.P
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\.
.P
\fBzerotier\-cli\fR has several command line arguments that are visible in \fBhelp\fP output\. The two most commonly used are \fB\-j\fP for raw JSON output and \fB\-D<path>\fP 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 \fB\-D<path>\fP 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\.
.SH COMMANDS
.RS 0
.IP \(bu 2
\fBhelp\fP:
\fBzerotier\-cli\fR has several command line arguments that are visible in \fBhelp\fR output\. The two most commonly used are \fB\-j\fR for raw JSON output and \fB\-D<path>\fR 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 \fB\-D<path>\fR 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\.
.SH "COMMANDS"
.TP
\fBhelp\fR
Displays \fBzerotier\-cli\fR help\.
.IP \(bu 2
\fBinfo\fP:
Shows information about this device including its 10\-digit ZeroTier address and apparent connection status\. Use \fB\-j\fP for more verbose output\.
.IP \(bu 2
\fBlistpeers\fP:
.TP
\fBinfo\fR
Shows information about this device including its 10\-digit ZeroTier address and apparent connection status\. Use \fB\-j\fR for more verbose output\.
.TP
\fBlistpeers\fR
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\.
.IP \(bu 2
\fBlistnetworks\fP:
.TP
\fBlistnetworks\fR
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\.)
.IP \(bu 2
\fBjoin\fP:
To join a network just use \fBjoin\fP and its 16\-digit hex network ID\. That's it\. Then use \fBlistnetworks\fP to 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 with \fBinfo\fP) on the network's controller\.
.IP \(bu 2
\fBleave\fP:
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 in \fBlistpeers\fP for 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\.

.RE
.SH EXAMPLES
.P
.TP
\fBjoin\fR
To join a network just use \fBjoin\fR and its 16\-digit hex network ID\. That's it\. Then use \fBlistnetworks\fR to 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 with \fBinfo\fR) on the network's controller\.
.TP
\fBleave\fR
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 in \fBlistpeers\fR for 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\.
.SH "EXAMPLES"
Join "Earth," ZeroTier's big public party line network:
.P
.RS 2
.IP "" 4
.nf
$ 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 )
.fi
.RE
.IP "" 0
.P
Leave "Earth":
.P
.RS 2
.IP "" 4
.nf
$ sudo zerotier\-cli leave 8056c2e21c000001
.fi
.RE
.IP "" 0
.P
List VL1 peers:
.P
.RS 2
.IP "" 4
.nf
$ sudo zerotier\-cli listpeers
.fi
.RE
.SH COPYRIGHT
.P
.IP "" 0
.SH "COPYRIGHT"
(c)2011\-2016 ZeroTier, Inc\. \-\- https://www\.zerotier\.com/ \-\- https://github\.com/zerotier
.SH SEE ALSO
.P
.SH "SEE ALSO"
zerotier\-one(8), zerotier\-idtool(1)

85 changes: 36 additions & 49 deletions doc/zerotier-idtool.1
Original file line number Diff line number Diff line change
@@ -1,84 +1,71 @@
.TH "ZEROTIER\-IDTOOL" "1" "December 2016" "" ""
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "ZEROTIER\-IDTOOL" "1" "April 2026" ""
.SH "NAME"
\fBzerotier-idtool\fR \- tool for creating and manipulating ZeroTier identities
.SH SYNOPSIS
.P
\fBzerotier\-idtool\fP <command> [args]
.SH DESCRIPTION
.P
\fBzerotier\-idtool\fR \- tool for creating and manipulating ZeroTier identities
.SH "SYNOPSIS"
\fBzerotier\-idtool\fR \fIcommand\fR [args]
.SH "DESCRIPTION"
\fBzerotier\-idtool\fR is a command line utility for doing things with ZeroTier identities\. A ZeroTier identity consists of a public/private key pair (or just the public if it's only an identity\.public) and a 10\-digit hexadecimal ZeroTier address derived from the public key by way of a proof of work based hash function\.
.SH COMMANDS
.P
.SH "COMMANDS"
When command arguments call for a public or secret (full) identity, the identity can be specified as a path to a file or directly on the command line\.
.RS 0
.IP \(bu 2
\fBhelp\fP:
.TP
\fBhelp\fR
Display help\. (Also running with no command does this\.)
.IP \(bu 2
\fBgenerate\fP [secret file] [public file] [vanity]:
.TP
\fBgenerate\fR [secret file] [public file] [vanity]
Generate a new ZeroTier identity\. If a secret file is specified, the full identity including the private key will be written to this file\. If the public file is specified, the public portion will be written there\. If no file paths are specified the full secret identity is output to STDOUT\. The vanity prefix is a series of hexadecimal digits that the generated identity's address should start with\. Typically this isn't used, and if it's specified generation can take a very long time due to the intrinsic cost of generating identities with their proof of work function\. Generating an identity with a known 16\-bit (4 digit) prefix on a 2\.8ghz Core i5 (using one core) takes an average of two hours\.
.IP \(bu 2
\fBvalidate\fP <identity, only public part required>:
.TP
\fBvalidate\fR \fIidentity, only public part required\fR
Locally validate an identity's key and proof of work function correspondence\.
.IP \(bu 2
\fBgetpublic\fP <full identity with secret>:
.TP
\fBgetpublic\fR \fIfull identity with secret\fR
Extract the public portion of an identity\.secret and print to STDOUT\.
.IP \(bu 2
\fBsign\fP <full identity with secret> <file to sign>:
.TP
\fBsign\fR \fIfull identity with secret\fR \fIfile to sign\fR
Sign a file's contents with SHA512+ECC\-256 (ed25519)\. The signature is output in hex to STDOUT\.
.IP \(bu 2
\fBverify\fP <identity, only public part required> <file to check> <signature in hex>:
Verify a signature created with \fBsign\fP\|\.
.IP \(bu 2
\fBmkcom\fP <full identity with secret> [id,value,maxdelta] [\|\.\.\.]:
.TP
\fBverify\fR \fIidentity, only public part required\fR \fIfile to check\fR \fIsignature in hex\fR
Verify a signature created with \fBsign\fR\.
.TP
\fBmkcom\fR \fIfull identity with secret\fR [id,value,maxdelta] [\|\.\|\.\|\.]
Create and sign a network membership certificate\. This is not generally useful since network controllers do this automatically and is included mostly for testing purposes\.

.RE
.SH EXAMPLES
.P
.SH "EXAMPLES"
Generate and dump a new identity:
.P
.RS 2
.IP "" 4
.nf
$ zerotier\-idtool generate
.fi
.RE
.IP "" 0
.P
Generate and write a new identity, both secret and public parts:
.P
.RS 2
.IP "" 4
.nf
$ zerotier\-idtool generate identity\.secret identity\.public
.fi
.RE
.IP "" 0
.P
Generate a vanity address that begins with the hex digits "beef" (this will take a while!):
.P
.RS 2
.IP "" 4
.nf
$ zerotier\-idtool generate beef\.secret beef\.public beef
.fi
.RE
.IP "" 0
.P
Sign a file with an identity's secret key:
.P
.RS 2
.IP "" 4
.nf
$ zerotier\-idtool sign identity\.secret last_will_and_testament\.txt
.fi
.RE
.IP "" 0
.P
Verify a file's signature with a public key:
.P
.RS 2
.IP "" 4
.nf
$ zerotier\-idtool verify identity\.public last_will_and_testament\.txt
.fi
.RE
.SH COPYRIGHT
.P
.IP "" 0
.SH "COPYRIGHT"
(c)2011\-2016 ZeroTier, Inc\. \-\- https://www\.zerotier\.com/ \-\- https://github\.com/zerotier
.SH SEE ALSO
.P
.SH "SEE ALSO"
zerotier\-one(8), zerotier\-cli(1)

Loading