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 5520Always keep the internal container port as 5520. Only change the external mapping.
Firewall Configuration
Linux (UFW)
sudo ufw allow 5520/udp
sudo ufw reloadLinux (iptables)
sudo iptables -A INPUT -p udp --dport 5520 -j ACCEPT
sudo iptables-saveWindows Firewall
Open Windows Defender Firewall
Search for "Windows Defender Firewall with Advanced Security"
Create Inbound Rule
- Click "Inbound Rules" → "New Rule"
- Select "Port" → Next
- Select "UDP" and enter port "5520"
- Select "Allow the connection"
- Apply to all profiles (Domain, Private, Public)
- 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/dockerRouter 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 IPv4Access Router Admin Panel
Typically at:
192.168.1.1192.168.0.110.0.0.1
Configure Port Forwarding
Look for "Port Forwarding" or "Virtual Server" settings:
| Field | Value |
|---|---|
| Service Name | Hytale Server |
| Protocol | UDP |
| External Port | 5520 |
| Internal Port | 5520 |
| Internal IP | Your 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:5520LAN Testing
From another device on your network:
your-local-ip:5520Internet Testing
From outside your network:
your-public-ip:5520Find 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: hostHost 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
- Go to Security Groups
- Add inbound rule:
- Type: Custom UDP
- Port: 5520
- Source: 0.0.0.0/0 (or specific IPs)
Azure
- Go to Network Security Groups
- 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-serverDigitalOcean
- Go to Networking → Firewalls
- Create rule:
- Type: Custom
- Protocol: UDP
- Port Range: 5520
- Sources: All IPv4, All IPv6
Troubleshooting
Players Can't Connect
-
Verify the server is running:
docker compose ps -
Check if the port is listening:
# Linux/macOS sudo lsof -i UDP:5520 # Windows netstat -an | findstr 5520 -
Verify firewall rules are active
-
Check router port forwarding configuration
-
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