ZeroTier connects your devices with each other.
Let's connect two devices over ZeroTier. We'll use
ping to test the connection. Any two devices that can run ZeroTier will do: laptop, phone, virtual machine, etc…
Both devices can be at the same location, on the same physical network. If you move one to a cafe or to your office, it should still just work.
The rough outline is:
- Create a ZeroTier network
- Join the network from two devices
pingone device from the other over the ZeroTier network
This should take about 5 minutes.
Results PreviewHere is a summary of the results of this tutorial, if you're a networking person.
If this doesn't mean anything to you, that's OK. We'll get there.
Each zerotier network you join creates a network interface on your device. It's like adding another ethernet port to your computer.
It's free, no credit card is required.
- Go to my.zerotier.com and create an account.
- Make sure you're on the "Networks" tab of my.zerotier.com
- Click the Create A Network button.
This creates a virtual network with a random ID and a random name. We got "fervent_smathers" and
- Click anywhere on the network to go to the details page for this network.
See the Network Settings panel:
We don't need to change any settings, but we can change the name of the network to personalize it.
Change "fervent_smathers" to "my cool network" or whatever you like.
Collapse the Settings panel. Click on the word "Settings" at the top of the panel.
You don't need to change any other settings.
- See the Network Members panel:
It should say "No devices have joined this network".
- Leave this browser tab open. We'll look at it again later.
For mobile devices, use the app store.
- Go to zerotier.com/download in a different tab of your browser.
- Run the installer
The ZeroTier client should now running on your device.
We need to tell the client to "join" the virtual network we just created.
Copy the Network ID of the network from my.zerotier.com This is the long number that looks like like:
Paste the Network ID into the "join" command on your device
On macOS and Windows, there is a menubar/tray app. Select "join" from the menu.
- Command Line
Every running instance of ZeroTier has a unique address. It's the 10 digit "Address" in the app, or
zerotier-cli info command.
ZeroTier addresses are a very secure method of unique identification.
At this point, your client should say "Access Denied." A device can't talk on your network unless you allow it, even if someone discovers the network's ID.
- Go to the Members panel that we left open on my.zerotier.com
- Your node that just "joined" should appear here.
- The "Address" should match the address in your client.
- Click the "Auth?" check box for it.
- Give it a name. Type something like "laptop" or "bob" into the
Back on your computer, your client should now say "OK" instead of "ACCESS DENIED" and it should show your custom "my cool network" name.
Now you have 1 member on your network. A network with 1 member can't do much.
We need to have 2 devices connected to the same ZeroTier network.
- Repeat the join and authorize steps with your second device.
Now you have two authorized nodes on your network. They should be able to talk over ZeroTier.
Your Network Members section should look something like this:
The "Managed IPs" will be different on your network.
We're going to test with
ping. It's the only program that we can think of that exists by default on every operating system.
This is a command line program, but don't worry: You can do it.
Windows by default doesn't respond to pings. If you try to ping a Windows computer from a different computer, it won't work. You can enable ping.
How to enable ping on Windows
- Search for Windows Firewall in the Start Menu, and click to open it.
- Click Advanced Settings on the left.
- From the left pane of the resulting window, click Inbound Rules.
- In the right pane, find the rules titled File and Printer Sharing (Echo Request - ICMPv4-In).
- Right-click each rule and choose Enable Rule.
Here is a tutorial by Microsoft
- Open the command line on your computer
- Use Spotlight (cmd-space) to search for Terminal
- Search for "powershell" and open it
- It's different on every flavor of linux. You'll have to search duckduckgo for "open terminal ubuntu" or similar.
ping your phone from your desktop computer.
Try switching your phone from wifi to cell and back. It may take about a minute, but ZeroTier should automatically keep the connection working.
Back in the Command Line / Terminal that you just opened:
ping -c 5 $ZEROTIER_IP_ADDRESS
<enter>into your command line.
Try it with both ZeroTier Managed addresses on your network.
One of them is the same device you're on, so you're pinging yourself. Pinging the other device might be a little more interesting.
If something goes wrong you might see something like:
There may just be a typo in the IP address. Double check that your device is authorized at my.zerotier.com
ping doesn't accomplish anything, but it does tell us ZeroTier is working. It's useful to know about for troubleshooting networks, not just ZeroTier networks.
Visit the discussion forum to talk about your use-cases or if you get stuck.
- Windows Remote Desktop
- ssh (try mosh)
- Private Gaming LAN
- Access the web interfaces of your home lab
- Build your own VPN
- Route to a remote subnet
- Route to a Docker network
- Add dns to your network
A node can join many networks at once. Make sure they don't use the same subnet!
You can have a
home network, a
friends network, and a
work network, for example.
They don't all need to be networks that you've created. You can join other people's networks.
For more info on the cryptography and protocol, see the: Manual