How to update your Valheim Server #22
Comments
|
ssh into your Ubuntu VM 1. Stop the Valheim Server Service (MUST DO FIRST) sudo systemctl stop valheimserver.servicewait 1-2 mins 2. Make a copy of your Valheim World Data Files *Example: WorldNameFile.db cp /home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldNameFile.db /home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldNameFile.dbGood*Example: WorldNameFile.fwl cp /home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldNameFile.fwl /home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldNameFile.fwlGood*This will now create a 1:1 copy of WorldNameFile.(db/fwl) into WorldNameFile.(db/fwl)Good 3. Start the Valheim Server Service sudo systemctl start valheimserver.servicewait 1 -2 mins 4. Connect like normally |
|
I'll leave the issue open, for others to find. |
|
Thanks great help, i was just looking for this bacause of the new version :) |
|
I'm thankful but I really don't understand, does it auto-update itself after I stop it? How exactly does it work? |
|
No it updates when you restart the valheimserver.service or the whole VM reboots BUT PLEASE!!! stop the valheimserver.service before rebooting or anything. All I did for mine just 15 mins ago was. Stop the valheimserver.service -> waited 1-2 mins -> Started the valheimserver.service ->waited 2-3 mins -> connected with my Game Client. ZERO ISSUES.... |
|
Thanks @Nimdy your guide has been so helpful and it allowed me and my friends many hours of fun. I can't thank you enough. Kudos! |
|
Thanks for these instructions @Nimdy ! Was wondering about exactly this this morning. |
|
Hey @Nimdy! Thanks a million for doing this. I encountered one small hiccup when trying to copy the files. When attempting to copy the world files, I got the following messages:
And
Is this supposed to happen? How do I proceed? Thanks! EDIT: Disregard this, I'm big dumb, I just realized I need to copy change If you'd like to include your Paypal or Venmo please let me buy you a root beer for your work. |
|
Thanks for this! not a total noob, but I was unsure how to safely shutdown the game server without any confirmations that it did so, your advice 'wait 1-2 mins' was exactly what I needed to make me feel better. I couldn't find specifics in the server documentation or google that wasn't about shutting down windows server. Valheim doesn't have a screen or tmux session to save in the way I am used to on linux game servers. Also I would recommend the scp command to download the world file copies to your local pc if using ssh from windows gaming machine like most would be. example I used in powershell. scp sshuser@serverip:/home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldFiles C:\VHbak\WorldFiles you can also use reverse to upload world files to server scp C:\WorldFiles sshuser@serverip:/home/steam/.config/unity3d/IronGate/Valheim/worlds/WorldFiles |
|
I bounced the service per your instructions. Server updated with no issues. AWS EC2 t2.medium running ubuntu 18. Thanks for the procedures. |
|
I just restarted the service the service has a build in "feature" which starts an automatic update (within steamcd) for Valheim Server I dont know if a backup before is neccessary |
|
Following the instructions above ( A friend and I just tested it again, and every time I restart the server we lose anything new we've done. Any idea why it wouldn't be saving? |
I don't think they are necessary, but the statement scares the hell out of me. Backups should a part of every procedure. I backed up mine to the a different account, just in case. Honestly, I think a daily cronjob wouldn't hurt either. Can we backup the DB when the service is running? |
It's definitely not required, but is a good a precaution incase someone loses their save and time on the server. |
|
I added in a step... |
|
@BigWincy Yep, looks like a permissions error. I checked the logs after and every autosave there's an UnauthorizedAccessException. Any idea what I should be granting permissions to/on to fix this? |
navigate to the main steam folder You'll get a list of the files/directories as well as the owner. You should see something similar to this:
The user and group both should be steam for everything. If not check that the steam user/group was created:
You should see If you have the user, you can change ownership with the following command:
If all looks good there, you can check items within the |
|
@devdavi Yeah, everything in that folder is owned by steam with those permissions but I was still getting the unauthorized access exception. The default save directory was owned by root however and didn't have write permissions for other users/groups. I granted all on it that so hopefully that was the issue |
Well that's progress! Build something in the game and then try restarting the service again. I would check the Let us know if that resolved it for ya! |
|
@devdavi tested and confirmed! autosave and manual save as admin are working now. Thanks for the help! |
|
Thanks! update went smooth on my end. |
|
Hello, I'm looking to write a shell script to launch on cron during the evenings to run the update automatically, but I'm not too familiar with shell scripting. I'm looking to stop the service, sleep until the service is stopped successfully, backup the world files to an existing archive location with overwrite (or append a date), then start the service. I was wondering if I could get assistance as this is what I have so far. Would this work or do you think I'm overlooking something?
Thank you!! |
You will need to build a crontab for this. https://www.golinuxcloud.com/create-schedule-cron-job-shell-script-linux/ Just be careful... not sure how smooth that will workout. |
|
seem most are over this point now. Closing :) |
Maybe a silly question but, how can the server (valheim server) be updated? Currently there is a new clent + server version released
The text was updated successfully, but these errors were encountered: