How to Play Hytale with Friends
This guide covers everything you need to know about inviting friends to your Hytale singleplayer world using share codes, troubleshooting connection issues, and alternative solutions when direct connections don't work.
Security Warning: Share codes contain your IP address. Never post them publicly, paste them in public chats, or show them on stream. Only share codes directly with people you trust.
How Hytale Friend Joins Work
Hytale allows you to open your singleplayer world to friends without running a dedicated server. When you enable friend joins, Hytale:
- Uses UPnP (Universal Plug and Play) to automatically configure your router
- Generates a share code containing encrypted connection information
- Friends paste the share code to connect directly to your game
The share code contains multiple connection candidates including your local network addresses, public IP (via UPnP), and any VPN addresses (like Tailscale). The joining client tries each candidate to find a working connection.
Note: This feature is still maturing. Not all network configurations work flawlessly yet. If you experience issues, see the Troubleshooting section or Alternative Solutions below.
How to Host Your World for Friends
- Load your singleplayer world
- Press ESC to open the pause menu
- Click Online Play
- Toggle "Allow Other Players to Join" to ON
- (Optional) Set a Password to restrict access
- (Optional) Toggle "Include Password in Share Code" to embed the password
- Click Save
After saving, Hytale performs UPnP negotiation with your router. Once complete:
- A share code appears in the text field
- Connection status shows below (e.g., "Connected via UPnP")
- NAT Type displays your network configuration
Click Copy to Clipboard and send the code to your friends.
How to Join a Friend's World
- From the main menu, go to Servers
- Click Join via Code
- Paste the share code
- Enter the password if required and not embedded
- Click Connect
The client attempts each connection candidate in priority order until one succeeds.
Troubleshooting Connection Issues
Share Code Not Generated
Symptom: After clicking Save, no share code appears or you see an error.
| Cause | Fix |
|---|---|
| UPnP disabled on router | Log into your router admin panel and enable UPnP |
| Router doesn't support UPnP | See Manual Port Forwarding or Alternative Solutions |
| Multiple routers (Double NAT) | Enable UPnP on all routers, or connect PC directly to main router |
| Firewall blocking UPnP | Allow Hytale through Windows Firewall |
Friend Cannot Connect
Symptom: Share code generated successfully, but friend gets connection timeout or failure.
| Cause | Fix |
|---|---|
| CGNAT (Carrier-Grade NAT) | ISP shares one public IP among multiple customers. Use Tailscale or dedicated server instead |
| Firewall blocking inbound | Allow Hytale through Windows Firewall for both private and public networks |
| UPnP mapping expired | Re-save Online Play settings to refresh the mapping |
| Antivirus interference | Temporarily disable or add Hytale as exception |
How to Check for CGNAT
Your ISP may use Carrier-Grade NAT, meaning you share a public IP with other customers. UPnP cannot work in this scenario.
- Open PowerShell
- Run:
tracert -d 8.8.8.8 - Check the first few hops
If the first hop is a public IP (not 192.168.x.x, 10.x.x.x, or 172.16-31.x.x), you likely have a direct connection. If you see multiple private IP ranges before reaching public addresses, you're behind CGNAT or Double NAT.
You can also compare your router's WAN IP (shown in router admin panel) with your public IP (search "what is my IP" in a browser). If these don't match, you're behind CGNAT.
Alternative Solutions
1. Try Having Your Friend Host
The simplest fix when you can't host: have your friend create the world and invite you instead. Different network configurations mean one player may be able to host while another cannot.
2. Use Tailscale VPN
Tailscale creates a peer-to-peer VPN tunnel between devices using WireGuard. It bypasses NAT and firewall issues entirely. See our Tailscale Setup Guide for detailed instructions.
3. Rent a Dedicated Server
For persistent worlds or more than a few friends, consider a dedicated server:
- Better performance (server isn't also rendering the game)
- Persistent uptime when you're offline
- More configuration options
- Reliable connectivity without NAT issues
Technical Details
Share Code Format
The share code is a Base64-encoded, compressed JSON structure containing:
{
"HostName": "PlayerName",
"HostUuid": "...",
"ServerName": "World Name",
"Password": "optional",
"ExpiresAt": "2026-01-09T01:50:03Z",
"Candidates": [
{"Type": "Host", "Address": "192.168.1.100", "Port": 52102, "Priority": 1000},
{"Type": "Host", "Address": "100.86.150.116", "Port": 52102, "Priority": 1000},
{"Type": "UPnP", "Address": "82.12.145.33", "Port": 52102, "Priority": 900}
]
}Connection Priority
When connecting, candidates are tried in this typical order:
- Local network addresses (fastest, same network)
- Tailscale/VPN addresses (reliable, punches through NAT)
- IPv6 addresses (direct if both have IPv6)
- UPnP public IP (requires successful port mapping)
Frequently Asked Questions
Q: Can I play with more than one friend at a time?
Yes, you can have multiple friends join your world using the same share code. However, performance depends on your hardware and network.
Q: Does my computer need to stay on for friends to play?
Yes, with share codes your computer acts as the host. If you close the game or shut down, friends will be disconnected. For 24/7 access, use a dedicated server instead.
Q: How long do share codes last?
Share codes expire after a certain period (shown in the ExpiresAt field). You'll need to generate a new code if the old one expires.
Q: Can I use share codes with mods installed?
Yes, but all players must have the exact same mods installed. Mismatched mods will cause connection failures or crashes.
Q: Why won't my share code work on mobile networks?
Mobile ISPs often use CGNAT, which prevents direct connections. Joining players should work fine on mobile, but hosting from mobile networks typically requires Tailscale or a dedicated server.