ZeroTier: A Virtual Ethernet Switch Across the Internet
ZeroTier builds a virtual network that behaves like a switch rather than a tunnel, which is a meaningfully different model from most VPNs.
Layer 2, which is the unusual part
Most mesh VPNs operate at layer 3: they route IP packets between peers. ZeroTier presents a virtual Ethernet switch, so broadcast and multicast work and protocols that depend on being on the same segment function across the internet.
That matters for a specific set of things: device discovery, some legacy applications, game protocols using LAN broadcast, and anything expecting ARP to work. For ordinary IP traffic it is an unnecessary abstraction, and WireGuard or Tailscale are simpler.
Peer-to-peer with fallback
Devices attempt direct connections, using coordination servers only to find each other. When NAT defeats a direct path, traffic relays through ZeroTier infrastructure, which works and is slower.
Our WireGuard versus OpenVPN versus Tailscale comparison covers the trade-offs between this class of tool.
Self-hosting the controller
The client is open source. The network controller that authorises members is the piece people want to self-host, and ZeroTier’s own controller is available for that.
ztnet is the common self-hosted web interface for running your own controller, and it is already covered here. This entry is about ZeroTier itself: the protocol, the client, and the decision to use it over the alternatives.
Running your own controller means no dependency on ZeroTier’s hosted service for authorisation, which is the main reason to bother.
Operational notes
sudo zerotier-cli info
sudo zerotier-cli join <network-id>
sudo zerotier-cli listnetworks
A joined device waits for authorisation in the controller before it receives an address, which is the security model and the first thing that confuses people.
Operational caution
A layer 2 network spanning the internet means broadcast traffic spanning the internet. On a network with many members that is real overhead, and ZeroTier’s multicast limiting exists because of it.
Members are identified by a device address, so losing control of a device means revoking it in the controller rather than changing a shared secret.
License
ZeroTier is released under the Business Source License 1.1, which converts to Apache 2.0 after a set period.