Guide
How to Change Your Hytale Server’s Port Number

Hytale servers use port 5520 by default and communicate via QUIC over User Datagram Protocol (UDP). Changing your server’s port involves modifying its launch command and configuring your network’s firewalls and routers to allow UDP traffic on the new port. This guide provides the direct steps to perform this essential server administration task.
How to Change Your Hytale Server’s Port Number
Changing your Hytale server’s port involves modifying its launch command and configuring your network environment to accommodate the new port.
Step-by-Step Guide
-
Stop Your Hytale Server
Always stop your Hytale server completely before making any changes. Modifying files or commands while the server is running can cause data corruption or instability. Use the appropriate command or control panel option to shut it down safely.
-
Locate Your Server’s Launch Command or Configuration
The method for changing the port depends on how your server is hosted:
- Direct Launch: If you run your Hytale server directly from a command line or a script (e.g., a
.bator.shfile), you will need to locate and modify this specific command or script. - Game Server Hosting Panel: If you use a third-party game server provider, they typically offer a web-based control panel. Within this panel, look for sections like “Startup Parameters,” “Configuration Files,” or “Command Line Arguments” to adjust these settings.
- Direct Launch: If you run your Hytale server directly from a command line or a script (e.g., a
-
Modify the Server Port
The primary method for specifying a new port for your Hytale server is through the
--bindargument in its startup command. This argument instructs the server on which IP address and port to listen for incoming connections.-
Using the
--bindArgument: You will add or modify this argument in your server’s launch command.Syntax:
java -jar HytaleServer.jar --assets Assets.zip --bind <IP_ADDRESS>:<NEW_PORT_NUMBER>Replace
<IP_ADDRESS>with0.0.0.0to bind to all available network interfaces (recommended for most users), and<NEW_PORT_NUMBER>with your desired port (e.g.,3500).Example: To set the port to
3500and bind to all interfaces:java -jar HytaleServer.jar --assets Assets.zip --bind 0.0.0.0:3500If you omit the IP address (e.g.,
--bind :3500or--bind 3500), the server will default to binding to0.0.0.0. -
Configuration File (
config.json) Uncertainty: While Hytale servers useconfig.jsonfiles for various settings, the official Hytale Server Manual explicitly recommends the--bindargument for port configuration. It is currently uncertain if a directportsetting withinconfig.jsonis supported or overrides--bind. For reliable port changes, always prioritize the--bindargument.
-
Using the
-
Configure Firewall Rules
Once the server is configured for a new port, ensure your operating system’s firewall allows incoming UDP traffic on that port. Hytale’s use of UDP is critical.
-
Windows Defender Firewall (PowerShell):
Open PowerShell as an administrator and execute the following command, replacing
<NEW_PORT_NUMBER>with your chosen port:New-NetFirewallRule -DisplayName "Hytale Server Custom Port" -Direction Inbound -Protocol UDP -LocalPort <NEW_PORT_NUMBER> -Action Allow -
Linux (iptables):
If you are using
iptables, open your terminal and run the following command, replacing<NEW_PORT_NUMBER>:sudo iptables -A INPUT -p udp --dport <NEW_PORT_NUMBER> -j ACCEPTRemember to save your
iptablesrules if they are not persistent by default (e.g.,sudo netfilter-persistent save). -
Linux (ufw – Uncomplicated Firewall):
For systems using
ufw, execute this command in your terminal, replacing<NEW_PORT_NUMBER>:sudo ufw allow <NEW_PORT_NUMBER>/udp
-
Windows Defender Firewall (PowerShell):
-
Configure Port Forwarding (if behind a router)
If your server is behind a router (common for home networks), you must configure port forwarding. This directs incoming internet traffic on your chosen UDP port to your server machine’s local IP address.
- Access your router’s administration interface.
- Find the “Port Forwarding,” “NAT,” or “Virtual Servers” section.
- Create a new rule with the following settings:
- External/Public Port: Your chosen
<NEW_PORT_NUMBER>. - Internal/Local Port: Your chosen
<NEW_PORT_NUMBER>. - Protocol: Select UDP (not TCP or Both).
- Internal/Local IP Address: The static local IP of your server machine (e.g.,
192.168.1.100).
- External/Public Port: Your chosen
- Save changes and restart your router if necessary.
Ensure your server machine has a static local IP address to maintain consistent port forwarding.
-
Restart Your Hytale Server
After modifying the launch command, updating firewall rules, and configuring port forwarding, restart your Hytale server. It should now listen on the new port.
Tips for Managing Your Hytale Server Port
- Choose an Unused Port: Select a port number not commonly used by other applications (ports above
1023are generally safe). - Document Your Changes: Keep a record of the new port, firewall rules, and router configurations for future reference.
- Inform Your Players: Communicate the new connection details to all players (e.g.,
yourserver.com:NEW_PORT_NUMBER). - Test Connectivity: After changes, attempt to connect to your server from a different machine (preferably outside your local network) to verify configuration.
- Emphasize UDP Specificity: Always double-check that you are configuring firewalls and port forwarding for UDP traffic, as this is a common pitfall.
Common Mistakes When Changing Server Ports
- Forgetting to Stop the Server: Modifying settings while the server is running can cause configuration issues or prevent changes from applying.
- Incorrect Protocol (TCP vs. UDP): Hytale uses UDP. Configuring firewalls or port forwarding for TCP instead of UDP will prevent connections.
- Not Opening Firewall Ports: A restrictive operating system firewall will block connections unless a specific rule is added for the new port.
- Incorrect Port Forwarding Configuration: Mistakes include forwarding to the wrong internal IP, wrong port, or incorrect protocol on your router.
- Syntax Errors in Launch Commands: Typos or incorrect formatting in the
--bindargument can prevent the server from starting or applying the new port. - Dynamic Local IP Addresses: If your server machine’s local IP address changes, port forwarding will break. Assigning a static local IP is highly recommended.
- Symmetric NAT Issues: While QUIC handles NAT traversal well, complex network setups with symmetric NAT can cause issues. In such cases, a Virtual Private Server (VPS) or dedicated server might be more reliable.
