Valheim
Dedicated Server Nightmare
Hoping someone can help - I've spent hours on Reddit and reading here trying to figure out how to get a dedicated server working for this game. Let it be known that I have a long history of hosting dedicated servers for L4D, KF/KF2, etc and know my way around this stuff for the most part. My friend and I have both been trying to get a server up with no luck at all. Here's what I have so far:

Ports 2456 through 2458 TCP and UDP ports open and forwarded on my router and Incoming/Outgoing rules have been created for both TCP and UDP in Windows Firewall.

Current startup string: valheim_server.exe -nographics -batchmode -name "NAME" -port 2456 -world "WORLD" -password "PASSWORD" -public 1

Neither of our servers ever show up in the public list. We can both join our own servers by joining localhost:2456 but cannot join each other's server. We just get the spinning symbol followed by "Failed to Connect" every time we try. We're on the verge of giving up at this point.
< >
16-19 / 19 のコメントを表示
lexx000 2021年12月27日 17時20分 
lexx000 の投稿を引用:
PJthePlayer の投稿を引用:


Wow, thanks for this detailed response. I can confirm I am using an ARRIS modem provided by Spectrum but my friend is on AT&T (not sure if he is using an ISP-provided modem or not).

I ran the tool you sent and got the following results:

PORT STATE SERVICE

2456/tcp filtered altav-remmgt

2457/tcp filtered rapido-ip

2458/tcp closed griffin

2456/udp open|filtered altav-remmgt

2457/udp open|filtered rapido-ip

2458/udp closed griffin

I am confused by this result - my modem is attached to a Google Wifi network and the Google Wifi primary router handles all port forwarding, etc. It has a rule set to open and forward 2456 through 2458 to the PC that is running the server instance. Disabling Windows Firewall doesn't affect the results either - could this be ISP-based port blocking?

You're welcome - hmm, what I find odd is that both your Port 2458 on TCP and UDP are closed. Can you try something? try increasing the range to Port 2459 for both TCP and UDP.

I would expect the ports to be filtered for TCP and Open|Filtered for UDP.

Assuming you are not running any other services / servers? E.g. do you have a second Valheim server? One thing I learned in my setup, is that if I wanted people to connect to my second Valheim server - I had to run it from Port 2466 and had Port Forwarding range set to Port 2466-2468 for TCP/UDP.

Is this on Windows? (I forget if there is a Dedicated Server for Linux :o) )

I also saw your other reply about your friend who has similar results to mine.

I am starting to think that if you are on Windows, then this is a Windows Firewall setting.

On my Windows Dedicated Server - what I have done the following:
1. "search for Firewall"
2. Once you are at the page with "Help protect your PC with Windows Defender Firewall"
3. Click on Advanced Settings (may have a UAC shield on it)
4. Navigate to "Inbound Rules"
5. Create a new rule on the right pane.
6. Select the radio button for "Program", click Next
7. Under this Program Path - navigate to where your Valheim dedicated server file is - in my case it says: "D:\SERVERS\ValheimDS\valheim_server.exe"
8. click next
9. In the "what action should be taken when a connection matches the specified conditions?" window - select "Allow the Connection" radio button
10. When does this rule apply - select all your networks (in my case I have Domain, Private, Public
11. Give it a name and a description
12. Click Next / Apply.
13. Find your new Valheim Dedicated Server rule under Inbound Rules
14. Double left click it to open it up.
15. Under "Programs and Services" ensure the correct EXE is under the "This Program" radio button - don't change anything else
16. Under "Protocols and Ports" - leave it "Protocol type = Any", "Local Port: All Ports", "Remote Port: All Ports"
17. Under Scope: Any IP Address for local and remote IP
18. Under Advanced: for Profiles it should be Domain, Private, Public ; Interface types: Make sure "All Interface Types" radio is selected ; Edge Traversal - "Block Edge Traversal" is what you should have there.
19. Click OK and that window should close.
20. Restart your Valheim dedicated server.

I'm assuming you know this, but when you run Valheim Dedicated Server - you need to ensure you shut it down with CTRL-C until you see a message with a Y/N window prompt that you have to action with "Y". After making those changes above, reboot, just to ensure nothing is running and launch the dedicated server again.

I still think that based on the port scan you might want to try increasing the TCP/UDP port forward range from 2456-2459 just to ensure you can get the same port results as I have.

For your friend, I suspect it's the Windows Inbound rules - this is one dedicated server EXE that I never recall raising a Windows Firewall prompt on launch.

Hope all this works! Let me know how it goes. Cheers - Lexx

I thought about this -> I am confused by this result - my modem is attached to a Google Wifi network and the Google Wifi primary router handles all port forwarding, etc. It has a rule set to open and forward 2456 through 2458 to the PC that is running the server instance. Disabling Windows Firewall doesn't affect the results either - could this be ISP-based port blocking? -- some more.

If your modem has wired ports - any chance you can connect the dedicated server PC directly to that and try without Google WiFi in the mix? I don't know the ARRIS line at all - but if it has LAN ports and you can get an IP from the device, then I would start to think that there is still a double NAT situation going on here. The other post about people having to connect on a port +1 number suggests double NAT to me - thanks to uPNP most modems / routers will punch a hole open when something outbound tries to advertise to the master server browsers (like Valheim's IP list of servers).

I've pasted the output from my server log to help you diagnose. Key things you are looking for are the following: "Game Server Connected" AND "Registering Lobby"

12/27/2021 17:08:55: Get create world ABEZMZJZZZ
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Using environment steamid 892970
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Using steam APPID:892970
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Setting breakpad minidump AppID = 892970
12/27/2021 17:08:55: Server ID 90071992547409920
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Authentication:k_ESteamNetworkingAvailability_Waiting
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Steam game server initialized
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Missing audio clip in music respawn
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:55: Builder started
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:56: Loaded localization CSV:localization language:English
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:56: Loaded localization CSV:localization_extra language:English
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:56: Game server connected
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:56: UI Group status changed Menu = True
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Unloading 17 unused Assets to reduce memory usage. Loaded Objects now: 98237.
Total: 98.695100 ms (FindLiveObjects: 10.966900 ms CreateObjectMapping: 20.651200 ms MarkObjects: 66.395300 ms DeleteObjects: 0.681300 ms)

Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 10.790000 ms
HDR Render Texture not supported, disabling HDR on reflection probe.
(Filename: Line: 277)
HDR Render Texture not supported, disabling HDR on reflection probe.
(Filename: Line: 277)

12/27/2021 17:08:57: Zonesystem Awake 575
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:57: DungeonDB Awake 575
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

12/27/2021 17:08:57: Registering lobby

Hope this extra detail helps!

Cheers,
Lexx
Mharr 2021年12月28日 6時04分 
If you have a spare machine available you could try putting the server on that (It's a very lightweight application, any old metal will do.) and making it your DMZ address. Not an ideal solution for security purposes but it would let you know whether the problem's inside your network and maybe work backwards from there.
Munin 2021年12月28日 6時11分 
You might want to check out this thread too:
https://steamcommunity.com/app/892970/discussions/1/3192487812591199657/

Good luck!
My server didn't show up for my friend either. It shows up for me and my wife. But we are both in the same house. However he was able to join via the IP option. I'm assuming you already tried that as well?
< >
16-19 / 19 のコメントを表示
ページ毎: 1530 50

投稿日: 2021年12月27日 13時24分
投稿数: 19