Typically, you use zerotier-cli to join and leave networks, but you can also write files to the filesystem to do this.
The networks.d subdirectory of the ZeroTier working directory keeps track of which networks are joined and their settings.
The ZeroTier working directory can be found...
- On Windows:
\ProgramData\ZeroTier\One
- On Mac:
/Library/Application Support/ZeroTier/One
- On Linux:
/var/lib/zerotier-one
For Example: /Library/Application Support/ZeroTier/One/networks.d
There are two types of files in networks.d
{network-id}.conf
and {network-id}.local.conf
If you create an empty {network-id}.conf file and restart zerotier, it will join {network-id}
For example:
touch /Library/Application Support/ZeroTier/One/networks.d/8056c2e21c000001.conf
The {network-id}.local.conf file is plain text that looks like this;
allowManaged=1
allowGlobal=0
allowDefault=0
allowDNS=0