Having recently setup a dedicated Valheim game server, I wanted to share the systemd files I used to orchestrate and automate running and updating the server.
These notes assume that you've setup your Valheim game server using LinuxGSM according to https://linuxgsm.com/lgsm/vhserver/. I'm using Ubuntu 20.04 to host the game, but any LinuxGSM compatible distro with systemd should work.
You should also be able to modify these files to run other LinuxGSM game servers.
LinuxGSM has a page the references this: https://docs.linuxgsm.com/configuration/running-on-boot