ZeroTier for Game Servers: Virtual LAN Setup Step by Step
Set up a ZeroTier network so friends can join your home game server without port forwarding: create the network, authorize members, fix LAN discovery and lag.
Updated Oct 7, 2026 · 5 min read
On this page
- What ZeroTier does
- Step 1: create the network
- Step 2: install and join on the server PC
- Step 3: add each friend
- Step 4: allow the game in the server's firewall
- Step 5: connect
- Making LAN discovery work
- Fixing lag: direct or relayed
- ZeroTier vs Tailscale for gaming
- Security
- When the app becomes the problem
- FAQ
To host a game server over ZeroTier, create a network in ZeroTier Central (my.zerotier.com), install ZeroTier on the server PC and every friend's PC, have everyone join with the 16 character network ID, then tick Auth next to each member in Central. Everyone gets a private address like 10.147.17.x, and friends connect to the server's ZeroTier IP plus the game port. No port forwarding is needed, it usually works behind CGNAT, and unlike Tailscale it carries broadcast traffic, so LAN server lists in older games can work.
What ZeroTier does
ZeroTier creates a virtual network switch on the internet. Every device that joins your network gets a virtual network adapter and a private IP, and behaves as if it were plugged into the same switch as your server. Devices try to connect to each other directly, punching through NAT, and fall back to ZeroTier's relays if they cannot.
Because ZeroTier works at Layer 2 (Ethernet level), it passes broadcast and multicast traffic. That is the main reason gamers pick it: games that only find servers through LAN discovery tend to work.
Step 1: create the network
- Sign in at my.zerotier.com (ZeroTier Central) and click Create A Network.
- Note the Network ID, a 16 character code like
8056c2e21c000001. - Open the network settings:
- Access Control: keep it Private, so nobody joins without your approval.
- IPv4 Auto-Assign: pick a range such as
10.147.17.*. Everyone will get an address from it. - Multicast / broadcast: leave Enable Broadcast on if your game uses LAN discovery.
Step 2: install and join on the server PC
- Download ZeroTier One for Windows, macOS or Linux from zerotier.com.
- On Windows, click the ZeroTier icon in the system tray, choose Join New Network, paste the Network ID.
- On Linux:
curl -s https://install.zerotier.com | sudo bash
sudo zerotier-cli join 8056c2e21c000001
- Back in Central, scroll to Members. The server appears with a node ID. Tick Auth and give it a name such as
server. - Note its Managed IP, for example
10.147.17.10. Friends will connect to this address.
Step 3: add each friend
- Each friend installs ZeroTier One and joins the same Network ID.
- You tick Auth next to each new member in Central.
- They should now be able to ping the server:
ping 10.147.17.10
The free plan has a limit on the number of devices per network; check ZeroTier's pricing page for the current figure if your group is large.
Step 4: allow the game in the server's firewall
When Windows first sees the ZeroTier adapter it asks whether to make the PC discoverable on that network. If you said no, the network is treated as Public. Either way, add an inbound firewall rule for the game's port covering all profiles, as shown in Windows Firewall rules for a game server. No router settings are needed.
Step 5: connect
Friends use the server's ZeroTier IP:
| Game | How to join |
|---|---|
| Minecraft: Java Edition | Add Server, 10.147.17.10, or Open to LAN may show it automatically |
| Terraria | Join via IP, 10.147.17.10, port 7777 |
| Valheim | Join IP, 10.147.17.10:2456 |
Making LAN discovery work
If a game's LAN browser still shows nothing:
- Check Enable Broadcast is on in the network settings.
- Windows may send broadcasts out of your real network adapter instead of ZeroTier's. Lower the ZeroTier adapter's interface metric so Windows prefers it: Control Panel, Network Connections, ZeroTier adapter, Properties, IPv4, Advanced, untick Automatic metric, set it to
1. - Some games bind to the first network adapter they find. Disabling unused adapters (VirtualBox, Hyper-V, old VPNs) helps.
- If discovery still fails, direct connect by IP almost always works.
Fixing lag: direct or relayed
On a PC, run:
zerotier-cli peers
(On Windows, run it from an admin Command Prompt in C:\ProgramData\ZeroTier\One, as zerotier-one_x64.exe -q peers.)
Look at the row for the other player. DIRECT is good. RELAY means traffic goes through ZeroTier's relay infrastructure, adding latency. Causes are strict NAT on one side (often mobile or CGNAT connections) or a firewall blocking UDP 9993, the port ZeroTier uses. Allowing UDP 9993 outbound and enabling UPnP on your router can help it find a direct path.
ZeroTier vs Tailscale for gaming
| ZeroTier | Tailscale | |
|---|---|---|
| LAN broadcast / discovery | Yes | No |
| Setup for friends | Join network ID, you approve | Install, sign in, accept share |
| Friends see only your server | Not by default, they share the network | Yes, with machine sharing |
| Encryption | Yes | Yes (WireGuard) |
| Free plan | Limited devices per network | Limited users and devices |
Tailscale's machine sharing keeps friends off the rest of your network more neatly; see Tailscale for game servers. For a wider list including Radmin VPN and Hamachi, see Hamachi alternatives for game servers.
Security
Everyone on your ZeroTier network can reach every other member's open ports, not just the server. Only add people you trust, and use Flow Rules in Central to restrict traffic to the game port if you want to be strict. Remove members (untick Auth, then delete) when someone leaves the group.

When the app becomes the problem
Virtual LANs work well for four or five friends. Once new people join every week, every one of them needs an install, a join and your approval. A hosted server has a public address that anyone joins with just the game, its ports already open and DDoS protection on. GamezServers servers are live about a minute after checkout for most games; see easy game server hosting.
FAQ
Is ZeroTier free for gaming?
Yes, there is a free plan with a limit on devices per network. That covers most small friend groups.
Do my friends need to port forward for ZeroTier?
No. Nobody needs to forward ports. ZeroTier makes outbound connections and punches through NAT.
Why can my friend ping the server but not join the game?
The game's port is blocked by the server's firewall, or the game is bound to a different network adapter. Add a firewall rule for all profiles and connect by the ZeroTier IP directly.
Is ZeroTier better than Hamachi?
For most groups, yes: it is actively developed, handles NAT traversal well, and runs on Windows, macOS, Linux and mobile. Compare free plan device limits on both sites for your group size.
Want a server without the setup?
From75¢
Pick a game, pay, play. Live the moment checkout finishes.