Network Setup

Configure networking for your Hytale server

Network Setup

Proper network configuration is essential for players to connect to your Hytale server.

Understanding QUIC

Hytale uses QUIC protocol over UDP, not traditional TCP. This is important for firewall and router configuration.

QUIC (Quick UDP Internet Connections) is a modern transport protocol that:

  • Runs over UDP instead of TCP
  • Provides better performance and lower latency
  • Requires UDP port 5520 to be open

Port Configuration

Default Port

By default, Hytale servers listen on:

  • Protocol: UDP
  • Port: 5520

Docker Port Mapping

In your docker-compose.yml:

ports:
  - "5520:5520/udp"

The format is HOST_PORT:CONTAINER_PORT/PROTOCOL.

Using a Custom Port

To expose on a different host port:

ports:
  - "25565:5520/udp"  # External port 25565, internal 5520

Always keep the internal container port as 5520. Only change the external mapping.

Firewall Configuration

Linux (UFW)

sudo ufw allow 5520/udp
sudo ufw reload

Linux (iptables)

sudo iptables -A INPUT -p udp --dport 5520 -j ACCEPT
sudo iptables-save

Windows Firewall

Open Windows Defender Firewall

Search for "Windows Defender Firewall with Advanced Security"

Create Inbound Rule

  1. Click "Inbound Rules" → "New Rule"
  2. Select "Port" → Next
  3. Select "UDP" and enter port "5520"
  4. Select "Allow the connection"
  5. Apply to all profiles (Domain, Private, Public)
  6. Name it "Hytale Server"

Verify

Run in PowerShell:

Get-NetFirewallRule -DisplayName "Hytale Server"

macOS

# Add firewall rule for UDP port 5520
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /path/to/docker
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /path/to/docker

Router Port Forwarding

If hosting from home, configure your router to forward traffic:

Find Your Local IP

Linux/macOS:

hostname -I | awk '{print $1}'

Windows:

ipconfig | findstr IPv4

Access Router Admin Panel

Typically at:

  • 192.168.1.1
  • 192.168.0.1
  • 10.0.0.1

Configure Port Forwarding

Look for "Port Forwarding" or "Virtual Server" settings:

FieldValue
Service NameHytale Server
ProtocolUDP
External Port5520
Internal Port5520
Internal IPYour server's local IP

Save and Reboot

Apply settings and restart your router if required.

Each router has a different interface. Search for your router model + "port forwarding" if you need specific instructions.

Testing Connectivity

Local Testing

Connect from the same machine:

localhost:5520

LAN Testing

From another device on your network:

your-local-ip:5520

Internet Testing

From outside your network:

your-public-ip:5520

Find your public IP at https://ifconfig.me or by searching "what is my ip" in Google.

Using Online Tools

Check if your port is open:

These tools check TCP by default. For UDP testing, you'll need to attempt a connection with the Hytale client.

Network Modes

Bridge Mode (Default)

The recommended configuration:

services:
  hytale-server:
    network_mode: bridge
    ports:
      - "5520:5520/udp"

Host Mode

For advanced users, host mode removes network isolation:

services:
  hytale-server:
    network_mode: host

Host mode:

  • Removes network isolation
  • May expose additional ports
  • Not recommended for security reasons
  • Doesn't work on Docker Desktop (Windows/macOS)

Cloud Provider Configuration

AWS EC2

  1. Go to Security Groups
  2. Add inbound rule:
    • Type: Custom UDP
    • Port: 5520
    • Source: 0.0.0.0/0 (or specific IPs)

Azure

  1. Go to Network Security Groups
  2. Add inbound security rule:
    • Protocol: UDP
    • Port: 5520
    • Action: Allow

Google Cloud Platform

gcloud compute firewall-rules create hytale-server \
  --allow=udp:5520 \
  --source-ranges=0.0.0.0/0 \
  --target-tags=hytale-server

DigitalOcean

  1. Go to Networking → Firewalls
  2. Create rule:
    • Type: Custom
    • Protocol: UDP
    • Port Range: 5520
    • Sources: All IPv4, All IPv6

Troubleshooting

Players Can't Connect

  1. Verify the server is running:

    docker compose ps
  2. Check if the port is listening:

    # Linux/macOS
    sudo lsof -i UDP:5520
    
    # Windows
    netstat -an | findstr 5520
  3. Verify firewall rules are active

  4. Check router port forwarding configuration

  5. Confirm you're using UDP, not TCP

Connection Timeout

  • Double-check it's UDP port 5520, not TCP
  • Verify your public IP hasn't changed (use a dynamic DNS service if needed)
  • Check if your ISP blocks incoming UDP traffic (some do)

High Latency

  • Choose a server location close to your players
  • Check your internet connection bandwidth
  • Verify server resources (CPU/RAM) aren't maxed out

Next Steps

On this page