Valheim

Valheim

Scott Dowell Mar 10, 2021 @ 12:23pm
Dedicated Server Troubleshooting
I've seen multiple discussion of Dedicated Server not working after the last update. As an long time server/firewall/IT person, here are my troubleshooting recommendations:

1) Always connect via IP address rather than Server List. I've seen the server list take 10 minutes to populate and not always show a server that was previously listed and confirmed active. I think it stopped between 9,000 and 10,000 public servers. Also try connecting to just the IP address and not adding the Port at the end.

1) Verify the External IP address of your router. If it has been rebooted at all, your external IP address will change unless you are paying for a Static External IP address. Test again.

2) Verify that you router have Port Forwarding for both TCP and UDP port 2456, 2457 and 2458 to the local IP address (typically 192.168.x.x or 10.x.x.x). Some routers allow you configure TCP and UDP ports at the same time while others make you set them up separately. So you will either have 3 Port forwarding rules (TCP/UDP for 2456, 2457 and 2458) or 6 Port Forwarding rules (TCP for 2456, 2457 and 2458 plus UDP for 2456, 2457 and 2458). Test again. To be doubly sure, reboot the router, get new External IP address and test again. Some routers need the reboot to evoke the new port forwarding rules. Test again.

2) Reboot/power cycle your router. Routers can be running and setup to forward certain ports but still be overloaded and not allow traffic through the ports. Unless you are paying for a Static External IP, you will also need to find out the new External IP address of your Router. Test again.

3) All Windows computers and some routers have built-in Firewalls. Confirm both your local computer and router have been configured to allow traffic through port 2456, 2457 and 2458. Test again.

4) If #3 still failed, try temporarily disabling the Firewall on the local computer and/or router, reboot either/both (get new External IP address if your reboot your router). Test again. If it fails, turn back on your Firewall on your computer and/or router for protection.

5) If both your client and server are at home, connect to the local IP address (typically 192.168.x.x or 10.x.x.x) of your server instead of the External IP address. If you can connect, the server is up and running but something is blocking WAN (Internet) traffic from getting to your Valheim server.

6) Reboot your client and/or server at home (do a CTRL + C on the server command screen to do a proper shutdown of the Valheim Server software to ensure you do not lose and data). Confirm your local IP address (typically 192.168.x.x or 10.x.x.x) of your server. Typically you will keep the same local IP address but some DHCP services on router will provide a different local IP address. Test again.

7) Depending on how your Windows Server OS or Client OS is setup/configured, you may need to verify that the Valheim Server is starting with Elevated Administrator rights. Search for the CMD command. Right-click the Command Prompt and choose Run As Administrator. Either manually type the path to your Valheim Server startup batch file or drag/drop the batch file to the Command window and press Enter. Test again.

If it is still not working, I'll be happy to help your troubleshoot further.
< >
Showing 1-13 of 13 comments
squirrelly Mar 11, 2021 @ 8:53am 
thank you for the post just found it. I'm having trouble with the server showing on public list on steam and valheim. set to public 1 and can connect through IP address, and running on separate pc as steam.cmd anonymous.
Gran Mar 11, 2021 @ 9:56am 
Originally posted by Scott Dowell:
2) Verify that you router have Port Forwarding for both TCP and UDP port 2456, 2457 and 2458

One question tho, why the advice to open up TCP ports? The game only uses UDP Ports.
squirrelly Mar 11, 2021 @ 11:03am 
yes both windows and router tcp and udp works, thank you for the response.
.bat is this-name "AApassPublic" -port 2457 -world "AApassPublic" -password "public" -public 1
logged in steam.cmd anonymous
can login manually just not showing on public list. 174.104.87.137:2457
Scott Dowell Mar 11, 2021 @ 11:09am 
Originally posted by squirrelly:
thank you for the post just found it. I'm having trouble with the server showing on public list on steam and valheim. set to public 1 and can connect through IP address, and running on separate pc as steam.cmd anonymous.
I think they have other issues that are causing your server not to appear. I've let my connection run at the Select Server until it stops, then refresh, allow it to finish, then refresh again. Each time severs appear and disappear. I don't think it is your configuration. I think Iron Gate or Steam it just not optimized for developing the dynamic server list.
Scott Dowell Mar 11, 2021 @ 11:10am 
Originally posted by Gran:

One question tho, why the advice to open up TCP ports? The game only uses UDP Ports.
Because although online games tend to use UDP port (short answer - it's faster than TCP), other communication regarding the game runs via TCP.
Gran Mar 11, 2021 @ 11:30am 
Originally posted by squirrelly:
yes both windows and router tcp and udp works, thank you for the response.
.bat is this-name "AApassPublic" -port 2457 -world "AApassPublic" -password "public" -public 1
logged in steam.cmd anonymous
can login manually just not showing on public list. 174.104.87.137:2457

did you forward UDP Ports 2457, 2458, 2459 to the computer hosting the server ?
since you changed the standard port you have to adjust the other ports too.
Naewyng Mar 11, 2021 @ 11:33am 
If your dedicated server runs on the pc you play the game from, I've found that you have better luck connecting via the loopback IP:
127.0.0.1
squirrelly Mar 11, 2021 @ 11:54am 
Originally posted by Scott Dowell:
Originally posted by squirrelly:
thank you for the post just found it. I'm having trouble with the server showing on public list on steam and valheim. set to public 1 and can connect through IP address, and running on separate pc as steam.cmd anonymous.
I think they have other issues that are causing your server not to appear. I've let my connection run at the Select Server until it stops, then refresh, allow it to finish, then refresh again. Each time severs appear and disappear. I don't think it is your configuration. I think Iron Gate or Steam it just not optimized for developing the dynamic server list.

Thank you im not smart with this stuff at all, its a good hear another confirmation
squirrelly Mar 11, 2021 @ 11:56am 
Originally posted by Gran:
Originally posted by squirrelly:
yes both windows and router tcp and udp works, thank you for the response.
.bat is this-name "AApassPublic" -port 2457 -world "AApassPublic" -password "public" -public 1
logged in steam.cmd anonymous
can login manually just not showing on public list. 174.104.87.137:2457

did you forward UDP Ports 2457, 2458, 2459 to the computer hosting the server ?
since you changed the standard port you have to adjust the other ports too.

thank you for the response and yes the ports 2456-2458 are forward to the host computer via internal IP. did not open 2459 is that needed?
squirrelly Mar 11, 2021 @ 12:07pm 
opening port 2459 didnt make a difference either
Llorion Dec 26, 2021 @ 4:19pm 
Thank you so much for this post. I was moving the server to a different PC and Step #2 reminded me that I needed to remove the previous port forwarding and create it for the other PC. I had forgotten that was specific to the local machine and not the public IP. Once I did this, I was able to get the other PC working and we now have a dedicated Valheim server, and it is working great!!
LordElites Dec 25, 2022 @ 3:48pm 
Hello, I know this is an old post but I am in desperate need of help with my dedicated server.

So I have my server up and running. I can connect to it and so can my friends. The problem I have is importing worlds that have already been made by me or others. So I have the .db and .fwl files stored in the worlds local folder and I changed the .bat -world name to my world's name. When I start the server and connect to it, it loads a completely different blank world, instead of the world in -world. And to make matters worse when I add in the -crossplay argument and try to connect to the server. The server won't even prompt me for the server password. It just says "Failed to Connect".

I am using the -crossplay argument because I have one friend who is using Xbox Gamepass to play Valhiem,

Also in the server CMD consul when I add in -crossplay i don't see the join code anywhere. What I see is "New session server "Name of Server" that has join code , now 0 player(s)"
After "join code" its just blank no numbers are given to me.

Things I have tried:
- Factory rested my server machine (an old Lenovo laptop) twice.
- I originally used steamCMD to download the dedicated server then I switched to use the
regular steam client
- Verified the game's integrity and the dedicated server's integrity using the steam tool.
- Uninstalled and reinstalled Valhiem in the client computer.
- I Release IP, Flush DNS, and Reset Winsock using cmd.
- Contemplated suicide while troubleshooting the dedicated server.
Chet Jan 11, 2023 @ 3:27pm 
"Also try connecting to just the IP address and not adding the Port at the end."

This worked. Just connect with the IP in-game and if your port forwarding is setup correctly, you will be able to connect.
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Mar 10, 2021 @ 12:23pm
Posts: 13