Skip to main content

Backing up your Valheim Server

Backing up your server is a necessary part of running any type of server, but you need to know where the essential data is stored and how the server handles it on it's own.

Data files

All of Valheim's save data for worlds is saved in the .config/unity3d/IronGate/Valheim/worlds_local directory on your server, which you can acsess using the GCP File Manager or SFTP. Within that directory you'll find the Automatic Backups taken by Valheim, as well as the live data files. The live data files will have the name of your world that you specified in the World Name startup parameter and will consist of two files, one with the extension .db and the other with the extension .fwl.

Restoring the data files

You can restore a data file to any backup by renaming the backup to just the name of the World Name startup parameter, by default it's Dedicated.
For example, an automatic backup may have the name Dedicated_backup_auto-20290729075914.fwl, with the same name applied to the associated .db file. Restoring to this backup is as simple as renaming the existing live data files, Dedicated.db and Dedicated.fwl, to something like Dedicated.liveBackup.<db/fwl> and then renaming the backup files to Dedicated.<db/fwl>, making sure to keep the file extensions the same.

Automatic backups

Valheim has it's own automatic backup system that will keep 4 automatic backups and 1 backup taken when the server updates. The backups are stored in the same location as the save files, .config/unity3d/IronGate/Valheim/worlds_local. The backups are taken at intervals based on when the server starts, with the first backup being taken 2 hours after the server starts, and every subsequent backup being taken 12 hours after the last one.

This behavior can be changed by using the following command line arguments.
-backupshort
The time in seconds before the first backup is taken after the server start. Defaults to 7200 seconds, or 2 hours.

-backuplong
The time in seconds between each subsequent backup after the "short" one. Defaults to 43200, or 12 hours.

-backups
The amount of non-update automatic backups to keep. Defaults to 4 total backups, excluding backups taken when the server performs an auto-update. -->

The file names of automatic backups contain the date and time the backup took place. For example, the following backup Dedicated_backup_auto-20290729075914.fwl would have taken place in:
2029 (20290729075914)
the 7th month (20290729075914)
the 29th day (20290729075914)
the 7th hour of a 24 hour clock (20290729075914)
the 59th minute (20290729075914)
and the fourteenth second. (20290729075914)

Taking a manual backup

You can take a manual backup of your Valheim server by copying the two live data files contained within the .config/unity3d/IronGate/Valheim/worlds_local folder. You should do this while your server is offline to ensure that the server is not accessing the files at the time of your backup.
You can create a backup by using the context menu in the GCP File Manager, or by downloading the files to your computer Using SFTP or the GCP File Manager. Downloading the file to your computer makes what is known as a "remote backup" and ensuring that if all of the files on your server are cleared you have a backup you can still restore to.
The restoration of your manual backup is the same as it is for the automatic backups, and can be done by backing up and replacing the existing live data files with your backed up ones. You can find more information on the process in this section of this article.

Reach Out!

Have Questions? Need Help? Feel free to reach out!

Join our Discord