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.96k stars 276 forks source link

Force world save before shutdown/restart #59

Closed Do-while-Bacon closed 3 years ago

Do-while-Bacon commented 3 years ago

We discovered the hard way that restarting the Docker container will cause a rollback of the server world (20 minutes?) because it appears to only save the state on a periodic cadence.

Is there a way to manually force a save before executing a restart? Or, can I otherwise bring down the container in a way that will trigger a save?

A game "cheat" exists to perform a save, but I read that it doesn't work, and cheats allegedly can't be executed on a multiplayer server anyway?

Thanks!

lloesche commented 3 years ago

That is because of an outdated container image. If you pull the latest version the world will be saved on shutdown. Iron Gate changed the way the server is being shut down from creating a file to signal a shutdown to sending a SIGINT which broke the shutdown script. See https://github.com/lloesche/valheim-server-docker/issues/13