ZeroTier — Programmable Layer-2 Overlay Network
Open-source SD-WAN that builds encrypted peer-to-peer Layer-2 overlays spanning NATs, clouds, and edge devices with a rule engine and controller API.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install ceb43612-38d6-11f1-9bc6-00163e2b0d79 --target codexDry-run first, confirm the writes, then run this command.
What it is
ZeroTier is an open-source software-defined networking tool that creates encrypted peer-to-peer Layer-2 overlay networks. It connects devices across NATs, firewalls, clouds, and on-premises infrastructure as if they were on the same local network. A controller API and flow rule engine let you define network policies programmatically.
ZeroTier is for teams that need to connect servers, containers, IoT devices, or developer machines across different networks without traditional VPNs or complex firewall rules.
How it saves time or tokens
ZeroTier eliminates VPN server setup and maintenance. Instead of configuring WireGuard or OpenVPN servers, punching firewall holes, and managing certificates, you install ZeroTier on each device and join a network ID. Peer-to-peer connectivity is automatic, even behind double-NAT.
The controller API means network changes are programmable. Add or remove members, change IP assignments, or update flow rules via REST API calls instead of manual configuration.
How to use
- Install ZeroTier:
# Linux / macOS
curl -s https://install.zerotier.com | sudo bash
# Or via package managers
brew install zerotier-one # macOS
apt install zerotier-one # Debian/Ubuntu
- Create a network at my.zerotier.com or run a self-hosted controller.
- Join the network on each device:
sudo zerotier-cli join <network-id>
Example
Using the ZeroTier API to manage a network programmatically:
# List network members
curl -s -H 'Authorization: token YOUR_API_TOKEN' \
'https://api.zerotier.com/api/v1/network/NETWORK_ID/member'
# Authorize a new member
curl -X POST \
-H 'Authorization: token YOUR_API_TOKEN' \
-d '{"config": {"authorized": true}}' \
'https://api.zerotier.com/api/v1/network/NETWORK_ID/member/MEMBER_ID'
Once authorized, the device gets a virtual IP and can communicate with all other members as if on the same LAN.
Related on TokRepo
- AI tools for DevOps -- Infrastructure and networking tools
- Self-hosted tools -- Self-hosted alternatives for networking and services
Common pitfalls
- Leaving networks in public mode (auto-authorize). Any device that knows the network ID can join. Always use private networks and manually authorize members.
- Ignoring flow rules. ZeroTier defaults to allow-all traffic between members. Define rules to restrict access between roles (e.g., only allow SSH from admin devices).
- Expecting ZeroTier to replace a firewall. ZeroTier handles connectivity, not host-level security. Still run iptables or nftables on each device.
Frequently Asked Questions
WireGuard is a point-to-point VPN protocol that requires manual peer configuration and a central server for routing. ZeroTier is a full mesh overlay network where peers discover and connect to each other automatically, even behind NATs. ZeroTier also provides a controller for centralized policy management.
Yes. The ZeroTier controller is included in the zerotier-one package. You can run your own controller for full control over network management without using the hosted service at my.zerotier.com.
Usually yes. ZeroTier uses UDP hole punching and falls back to relay servers (called roots) when direct connectivity is not possible. Most corporate firewalls allow outbound UDP traffic, which is sufficient for ZeroTier to establish connections.
Yes. The free tier supports up to 25 devices per network. Paid plans remove device limits and add features like business SSO, central management, and priority support.
ZeroTier operates at Layer 2 (Ethernet). This means it can carry any protocol that runs on Ethernet, including IPv4, IPv6, and multicast traffic. Devices on a ZeroTier network behave as if connected to the same physical switch.
Citations (3)
- ZeroTier GitHub— ZeroTier is an open-source SD-WAN for peer-to-peer overlay networks
- ZeroTier Documentation— Layer 2 overlay with flow rule engine and controller API
- Stanford SDN Course— Software-defined networking and overlay network fundamentals
Related on TokRepo
Discussion
Related Assets
Fluentd — Unified Logging Layer for Cloud-Native Infrastructure
Fluentd is a CNCF-graduated open-source data collector that unifies log collection and routing. With 1000+ plugins, it connects any source to any destination — the standard log layer for Kubernetes alongside Fluent Bit.
NeMo Guardrails — Programmable Safety for LLM Applications
NeMo Guardrails is an open-source toolkit by NVIDIA for adding programmable guardrails to LLM-based conversational systems. It provides input/output moderation, fact-checking, hallucination detection, jailbreak prevention, and dialog management via a declarative Colang configuration language.
Pingora — Fast Programmable HTTP Proxy Framework by Cloudflare
Pingora is a Rust framework for building fast, reliable, and programmable network services. Open-sourced by Cloudflare, it powers a significant portion of their HTTP traffic, handling over a trillion requests daily across the global network.
Dagger — Programmable CI/CD Engine
Run CI/CD pipelines as code — locally, in CI, or in the cloud. Replace YAML with real programming languages. Cacheable, portable, testable. 15.6K+ stars.