Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Valheim Server Backup & Restore Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Backing up your Valheim server protects your world from corruption, accidental deletions, or failed updates. This guide covers manual backups, automated options, and step-by-step restore procedures for both dedicated servers and local co-op worlds.

What You'll Need

  • Access to the server's file system (via SSH, FTP, or the hosting provider's file manager)
  • If restoring to a different machine: the same Valheim version installed
  • For automated backups: a cron scheduler (Linux) or Task Scheduler (Windows)
  • Enough storage space for at least one backup (worlds are typically 10–100 MB)

Step-by-Step

Step 1: Locate the World Files

Valheim stores world data in a folder named worlds (or worlds_local for local co-op). The default locations are:

  • Linux (dedicated server): /home/steam/.config/unity3d/IronGate/Valheim/worlds
  • Windows (dedicated server): C:\Users\\AppData\LocalLow\IronGate\Valheim\worlds
  • Windows (local co-op): C:\Users\\AppData\LocalLow\IronGate\Valheim\worlds_local

If you use a hosting provider, check their documentation for the exact path. The folder contains files with the world name as prefix, such as MyWorld.db, MyWorld.fwl, and optionally .db.old and .fwl.old (these are the game's automatic backups).

Step 2: Stop the Server

Before copying files, stop the server to prevent file corruption. On Linux, use systemctl stop valheim or kill the process. On Windows, close the server console or stop the service. For local co-op, exit the world to the main menu.

Step 3: Create a Backup

Copy the entire worlds folder to a safe location. You can compress it to save space:

  • Linux: tar -czvf valheim-backup-$(date +%F).tar.gz /path/to/worlds
  • Windows: Right-click the folder, select Send to → Compressed (zipped) folder.

Keep the backup on a different drive or cloud storage to protect against hardware failure.

Step 4: Automate Backups (Optional)

For regular backups, set up a cron job (Linux) or Task Scheduler (Windows). Example cron job that backs up daily at 3 AM:

0 3 * * * tar -czvf /backups/valheim-$(date +\%F).tar.gz /home/steam/.config/unity3d/IronGate/Valheim/worlds

On Windows, create a batch file with robocopy or tar and schedule it via Task Scheduler.

Step 5: Restore a Backup

To restore, stop the server, then replace the current worlds folder contents with the backup files. Ensure the world name matches exactly (case-sensitive). For example, if your backup has MyWorld.db, the folder must contain MyWorld.db and MyWorld.fwl. Delete any existing files with the same name first to avoid conflicts.

Step 6: Start the Server

After copying the files, start the server. Verify the world loads correctly by joining the game. If the server fails to start, check logs for file permission issues.

Common Mistakes

  • Backing up while the server is running: This can produce a corrupted backup. Always stop the server first.
  • Restoring only the .db file, not the .fwl: Both files are required. The .fwl contains world metadata; missing it causes world regeneration or crashes.
  • Mismatched world name: The server reads the world name from its configuration. If the file names differ, the server creates a new world instead of using your backup.
  • Ignoring file permissions: On Linux, if the restored files are owned by root or have wrong permissions, the server may not read them. Use chown -R steam:steam /path/to/worlds.

Tips

  • Keep at least three backups: one daily, one weekly, and one monthly, stored in different locations.
  • Use the game's built-in auto-backup: Valheim creates .db.old and .fwl.old files periodically. You can restore these by renaming them to the current names.
  • Before a major update, always make a fresh backup.
  • Test your backup by restoring it to a separate server instance before relying on it.
  • If you use a hosting provider, check if they offer one-click backups—many do.

Troubleshooting

Server won't start after restore

Check the server logs for errors. Common causes: missing .fwl file, incorrect file permissions, or a version mismatch. Ensure the server version matches the backup's version (Valheim updates can break old worlds). If the world is corrupted, try restoring an older backup.

World loads but players spawn in a new area

This usually means the .fwl file is missing or the world name doesn't match. Double-check that both files are present and correctly named.

Backup file is too large

Worlds grow over time. Compress backups with tar -czvf or use a tool like 7-Zip. Also consider deleting old backups to save space.

Can't find the worlds folder

If you're using a Docker container or a custom install, the path may differ. Search for *.db files on the server. On Linux, use find / -name "*.db" 2>/dev/null.

Frequently Asked Questions

How often should I back up my Valheim server?

For an active server, daily backups are recommended. If you play casually, at least before and after each session is a good habit.

Can I restore a backup to a different server provider?

Yes, as long as you copy the world files to the same relative path and the server runs the same Valheim version. The world format is compatible across platforms.

What do the .db and .fwl files do?

The .db file contains the world data (terrain, buildings, items), while the .fwl file stores world metadata like seed, time, and player positions. Both are essential.

Does Valheim have built-in backups?

Yes, the game automatically creates .db.old and .fwl.old files periodically. You can rename them to restore a recent state.

Will restoring a backup delete my character?

No, character data is stored separately in the characters folder. Restoring a world backup does not affect characters, but it will revert any changes made to the world since the backup.

Can I back up while the server is running?

It's not recommended. File copies during writes can be corrupted. Always stop the server for a clean backup.