Skip to content

Instantly share code, notes, and snippets.

@laduke
Last active December 17, 2020 17:39
Show Gist options
  • Save laduke/6e58d8930d0ef2eb30c13b3f2989dd76 to your computer and use it in GitHub Desktop.
Save laduke/6e58d8930d0ef2eb30c13b3f2989dd76 to your computer and use it in GitHub Desktop.
zerotier network join via fs

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment