lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.94k stars 272 forks source link

valheim-status reports 0 players online with -crossplay, resulting in lack of backups #521

Closed recursiveGecko closed 1 year ago

recursiveGecko commented 1 year ago

It seems like the player count isn't reported correctly (it's always 0) when crossplay is enabled, resulting in backups not being created due to "the server being idle".

https://github.com/lloesche/valheim-server-docker/blob/f47432bfcc9de4308cfe78346bbfa579dbe4317b/common#L155-L169

A potential temporary fix to get the backups working again is to set SERVER_PUBLIC=false which forces UDP packet counting logic.

It might be worth falling back to UDP packet counting when -crossplay flag is present unless there's a better solution.

lloesche commented 1 year ago

Sounds like a sensible workaround. Would you like to submit a PR?