Change the Server Port
Configure your Valheim server's port and understand port allocation.
Valheim uses two consecutive UDP ports for server communication. You can change the port through the XGamingServer panel.
Default Ports
| Port | Usage |
|---|---|
| 2456 (primary) | Game traffic |
| 2457 (primary + 1) | Steam query |
Valheim automatically uses the port you set plus one additional port. If you set the port to 2456, both 2456 and 2457 are used.
Change the Port
Check available ports
Go to Network in the sidebar to see your allocated ports.
Go to Startup
In the sidebar, click Startup.
Set the port
Update the Server Port field to your desired port.
Restart your server
⚠️ Warning: Make sure both the port and port+1 are allocated to your server in the Network panel. If only one port is available, the server won't start properly.
When to Change Ports
You typically don't need to change the default port unless:
- You're running multiple Valheim servers on the same node
- Your ISP or firewall blocks the default port
- You have a specific port requirement for your network setup
Share Your Port with Players
When players connect directly, they need your IP and port:
IP:PortFor example: 192.168.1.1:2456
If you changed the port, make sure to share the updated port with your players. See Connect to Your Server.
Related Guides
See also: Connect to Your Server | Troubleshooting Network | Make Your Server Private
If you need help, join our Discord.
How is this guide?
