Change the Port on Your Valheim Server

Configure your Valheim server's port and understand how Valheim uses two consecutive UDP ports.

Valheim uses three consecutive UDP ports for server communication. When you set a port, Valheim automatically uses that port plus the next two as well.

Default Ports

PortPurpose
2456 (game port)Game traffic
2457 (game port + 1)Steam query
2458 (game port + 2)A2S query

If you change the game port to 2466, Valheim will use 2466, 2467, and 2468.

Change the Port

Check available ports

In the XGamingServer Panel, click Network in the sidebar to see your allocated port range.

Open Startup

Click Startup in the sidebar.

Set the new port

Update the Server Port variable to your desired game port. Make sure the next two ports are also allocated to your server in the Network panel.

Restart the server

Go to Console and restart.

Warning: All three ports (your chosen port + 1 + 2) must be allocated. If any are missing, the server won't start properly. Check Network before changing.

When to Change the Port

You typically don't need to change the default port. Reasons to change:

  • Running multiple Valheim servers on the same node (each needs unique ports)
  • A specific port is blocked by your network or ISP
  • Port conflict with another game server on the same allocation

Tell Players the New Port

When players connect via direct IP, they need the updated port:

123.45.67.89:2466

Update any documentation, Discord pinned messages, or join codes you've shared. See Connect to Your Server.

How is this guide?

40% Off — Limited TimeGet your Valheim server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page