# Change the Port on Your Valheim Server (/docs/valheim/change-server-port)



import { Step, Steps } from 'fumadocs-ui/components/steps';

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 [#default-ports]

| Port                   | Purpose      |
| ---------------------- | ------------ |
| `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 [#change-the-port]

<Steps>
  <Step>
    Check available ports [#check-available-ports]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Network** in the sidebar to see your allocated port range.

    {/* Screenshot needed: Network page showing allocated ports */}
  </Step>

  <Step>
    Open Startup [#open-startup]

    Click **Startup** in the sidebar.
  </Step>

  <Step>
    Set the new port [#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.
  </Step>

  <Step>
    Restart the server [#restart-the-server]

    Go to **Console** and restart.
  </Step>
</Steps>

> **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 [#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 [#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](/docs/valheim/join-server).

Related Guides [#related-guides]

* [Connect to Your Server](/docs/valheim/join-server)
* [Network Troubleshooting](/docs/valheim/fix-network)
* [Server Launch Parameters](/docs/valheim/server-launch-parameters)
