Xgamingserver
Home Hytale How to Play Hytale with Friends Using Share Codes

How to Play Hytale with Friends Using Share Codes

Play with Friends 24/7

Get a dedicated Hytale server so your friends can play anytime, even when you’re offline.

Get Hytale Server Hosting →

Want to play Hytale with friends without setting up a dedicated server? Hytale allows you to open your singleplayer world to friends using share codes. This guide explains how the system works and how to get connected.

⚠️ Privacy 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 Share Codes Work

When you enable friend joins in Hytale, the game:

  1. Uses UPnP to automatically configure your router
  2. Generates a share code containing encrypted connection information
  3. Friends paste the share code to connect directly to your game

The share code includes multiple connection candidates (local network, public IP, VPN addresses) and the client tries each until one works.

How to Host a World for Friends

Step 1: Load Your World

Start Hytale and load into your singleplayer world.

Step 2: Enable Online Play

  1. Press ESC to open the pause menu
  2. Click Online Play
  3. Toggle Allow Other Players to Join to ON
  4. (Optional) Set a Password to restrict access
  5. (Optional) Toggle Include Password in Share Code to embed the password
  6. Click Save

Step 3: Wait for UPnP

After saving, Hytale negotiates with your router via UPnP. 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

Step 4: Share the Code

Click Copy to Clipboard and send the code privately to your friends.

How to Join a Friend’s World

  1. From the main menu, go to Servers
  2. Click Join via Code
  3. Paste the share code your friend sent you
  4. Enter the password if required (and not embedded in the code)
  5. Click Connect

The client automatically tries each connection candidate in priority order until one succeeds.

Connection Priority Order

When connecting, candidates are tried in this order:

  1. Local network addresses – Fastest, for same network
  2. Tailscale/VPN addresses – Reliable, punches through NAT
  3. IPv6 addresses – Direct if both players have IPv6
  4. UPnP public IP – Requires successful port mapping

Tips for Successful Connections

For the Host

  • Ensure UPnP is enabled on your router
  • Allow Hytale through your Windows/Mac firewall
  • Use a wired connection for better stability
  • Consider using Tailscale for more reliable connections

For Players Joining

  • Make sure you’re using the most recent share code
  • Disable VPNs that might interfere (unless using Tailscale)
  • Try disabling antivirus temporarily if connections fail

When Share Codes Don’t Work

If you’re having trouble with share codes, see our Hytale Connection Troubleshooting Guide or consider these alternatives:

Have Your Friend Host Instead

Different network configurations mean one player may be able to host while another cannot. Try swapping roles.

Use Tailscale

Tailscale creates a peer-to-peer VPN that bypasses most NAT issues. See our Tailscale with Hytale Guide.

Get a Dedicated Server

For the most reliable experience, especially with multiple friends, a dedicated server provides:

  • 24/7 availability (not dependent on host being online)
  • Better performance
  • No NAT or firewall issues
  • Support for more players

Play Together Anytime

Get a dedicated Hytale server for seamless multiplayer. No share codes, no connection issues.

Get Hytale Server Hosting →

Your Header Sidebar area is currently empty. Hurry up and add some widgets.