How to change the port of a Valheim server
Add -port 2466 to the server's launch options. The server uses that port and the next one, so open 2466 and 2467.
-port
Sets the port the server uses. Valheim uses this port and the next one, so 2456 means 2456 and 2457.
-port <port> Examples
-port 2456 Default, uses 2456 and 2457.
-port 2466 Second server on the same machine.
Arguments
portRequired- The first of two consecutive ports.
What it does
With the Steam backend you must forward this port and the one above it on your router or firewall. With -crossplay no port forwarding is needed, but the port still tells apart several servers on the same public IP.
Good to know
- Add it to the server start line in
start_server.sh(Linux) orstart_headless_server.bat(Windows); it applies on the next server start. - Running several servers on one host: leave a gap, since each one takes two ports.
Run it on your server
Launch options go on the server's start line. Admin commands are typed in the in-game console (F5) by a player on the admin list. New to this? Start a Valheim server first.
Your own
Valheim server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.