How to Build a Private Virtual LAN with ZeroTier in Minutes
ZeroTier lets you create a peer‑to‑peer virtual network that bridges devices across different physical locations without a public IP, and this guide walks you through its core concepts, registration, network creation, client installation, joining, IP assignment, connectivity testing, and optional Moon relay setup.
ZeroTier
Basic Concept
ZeroTier is a smart Ethernet switch for planet Earth.
In simple terms, ZeroTier is a peer‑to‑peer (P2P) network where the root server records request paths similar to DNS resolution. Its main function is to connect devices on different networks as if they were on the same LAN.
ZeroTier configures a virtual subnet, e.g., 172.17.2.0/24. Adding a device to this network lets it reach a company machine at 172.17.2.101.
Key Terminology
PLANET: Root server of ZeroTier.
MOON: User‑deployed private root server that acts as a proxy for acceleration.
LEAF: Network client, i.e., each device that connects to the network.
Getting Started
1. Register
Visit https://my.zerotier.com/ to create an account.
2. Create a Network
3. Install Client on Target Machine
Linux
curl -s https://install.zerotier.com | sudo bashOther operating systems
Download from https://www.zerotier.com/download/ .
4. Join the Created Network
zerotier-cli join a0cbf4b62af33545 # 16‑digit network ID 200 join OK5. Approve Client Access
In the ZeroTier web console, open the network details and approve the client. Assign it a LAN IP, e.g., 172.28.153.245, which can be adjusted in the Advanced settings.
You can add other devices to the same network similarly.
6. Verify Connectivity
Check that the devices can ping each other.
Network is operational.
Extension
Because ZeroTier’s official servers are overseas, domestic clients may experience high latency or connectivity issues during peak times. Deploying a Moon relay server locally can act as a jump‑box to accelerate traffic between internal machines.
Refer to the official site https://www.zerotier.com for simple Moon setup instructions.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
