Finally got my dedicated server working, not sure how but here are my notes
It took me a great number of hours to get external connections working to my dedicated server, but finally did. I'm writing this so hopefully it helps someone
​
Running via Steam dedicated server, from the library not SteamCMD.
launch command is as follows:
valheim\_server -nographics -batchmode -name "REDACTED" -port 2456 -world REDACTED -password redacted -crossplay -public 1
Note the name is in quotes, but password and world is not
\-crossplay uses the playfab service instead of steam. According to the manual, it says that doesnt need port forwarding but I didnt find that to be true
Port forwarding on 2457 and 2458. Specifically 2456 is NOT being forwarded. I found if 2456 was also being used, I would fail to connect externally. That's the part that confuses me as to why that happens. I've read on other posts that the exe is actually listening on +1 (ie 2457) from what's stated. Its possible it works without these 2 ports but didnt bother to test
In valheim, I'm connecting (tested by tethering laptop to phone) by using my public IP via 'add server', ie [XXX.XXX.XXX.XXX:2456](https://XXX.XXX.XXX.XXX:2456). If I try to connect on 2457, it doesnt work.
Technically I'm using a duckdns link [XXXXXX.duckdns.org:2456](https://XXXXXX.duckdns.org:2456), but points to the same place.
My guess is that the when the server starts, it registers its address with playfab. Then when you try to connect, it first tries going direct to the address and since 2456 is blocked, it then establishes a connection through playfab instead. Just my guess.
Hopefully someone can explain to me whats really happening. But in any case, I hope this helps someone.