Valheim wakes from sleep when steam query port is forwarded

System Information

Field Value
Operating System Linux - Debian GNU/Linux 12 on x86_64
Product AMP ‘Callisto’ v2.5.1.0 (Mainline)
Virtualization Docker
Application Valheim
Module GenericModule
Running in Container Yes
Current State Sleeping

Task

Use Sleep Mode With Valheim

Problem Description

Issue

Valheim wakes up to answer queries on the Steam query port when the query port is forwarded to the instance. Since there is almost constant traffic on the query port, this prevents Valheim from sleeping. It goes to sleep, immediately wakes up, then tries to sleep again after the configured sleep delay.

I think it would be best if traffic on the query port was ignored by the sleep logic. A direct connection to the game will wake up the server so that players can join. As a temporary work-around I have disabled port forwarding for the steam query port, but this is not ideal. It would be nice if the steam queries worked while the server was awake and active with players.

Reproduction Steps

  • Install Valheim instance.
  • Enable sleep mode for the Valheim instance.
  • Port forward the steam query port to the Valheim instance.
  • Put Valheim instance to sleep.
  • Valheim immediately wakes up.

Valheim uses the query port as part of the normal connection process.

You could try editing GenericModule.kvp for that instance and setting “WakeupMode” to “OnUDPPacket” but it may not wake from regular connections.

I did not expect this to work since the Steam query port is also UDP, but I gave it a try anyway and it worked perfectly. The instance can sleep as expected (with the Steam query port forwarded) and wakes as soon as someone tries to connect. Once awake, the server shows up in the in-game server browser. Thank you for the suggestion!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.