The critical crash "Error loading world file: check backups" during Valheim server startup is one of the most stressful failure states a server administrator can encounter. The game engine abruptly refuses to load the world, resets the map to an empty state, or exits with an unhandled exception during world database deserialization. In most instances, this stems from an unexpected server reboot during an active autosave, out-of-disk conditions, or a hard SIGKILL signal.
This guide covers the troubleshooting procedure for diagnosing corrupted Valheim world files, isolating damaged data, and executing a verified rollback using native .old snapshots and backup archives on Linux.
Root Causes of .db and .fwl Corruption in Valheim#
A Valheim world relies on two interdependent files that share the same base name:
<WorldName>.db— binary database containing all player-built structures, terraforming changes, chests, inventories, and spawned entities.<WorldName>.fwl— world metadata: seed generation parameters, world generator version, and internal flags.
The Valheim dedicated server triggers an autosave routine every 20 minutes. During this process, the engine streams state data to disk. If the VM reboots unexpectedly, crashes due to the Linux OOM killer, or runs out of filesystem storage during the write operation, the .db or .fwl file gets truncated to 0 bytes or loses critical header magic bytes.
During initial boot, the engine validates the header and schema version. If either file is truncated or the versions between .db and .fwl diverge, the server logs:
Error loading world file: <WorldName>, check backups!
Locating World Save Directories and Logs on Linux#
Before executing any file manipulation, stop the server service to prevent conflicting write operations:
sudo systemctl stop valheim
sudo systemctl status valheim --no-pager
On current versions of the Valheim dedicated server, world files are stored in the home directory of the dedicated service user (typically valheim or steam):
WORLD_DIR="$HOME/.config/unity3d/IronGate/Valheim/worlds_local"
test -d "$WORLD_DIR" || WORLD_DIR="$HOME/.config/unity3d/IronGate/Valheim/worlds"
echo "Active world directory: $WORLD_DIR"
The native automatic backups directory is situated alongside the primary save path:
BACKUP_DIR="$HOME/.config/unity3d/IronGate/Valheim/backups/worlds"
ls -la "$BACKUP_DIR"
Check the system journal for specific serialization failure messages:
journalctl -u valheim -n 50 --no-pager | grep -i "world"
Inspecting Integrity and Quarantining Damaged Files#
Navigate to the world directory and inspect file sizes:
cd "$WORLD_DIR"
ls -lh
If either .db or .fwl shows a file size of 0 bytes or an unexpectedly small size compared to historical averages (e.g., 1 KB instead of 80 MB), corruption is confirmed.
Never delete damaged files immediately. Create a dedicated quarantine directory and move the current files inside:
QUARANTINE_DIR="$WORLD_DIR/corrupted_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$QUARANTINE_DIR"
mv Dedicated.db Dedicated.fwl "$QUARANTINE_DIR/"
Retaining the quarantine folder ensures you have raw data available for structural recovery tools if no recent backups exist.
When utilizing a dedicated server management panel, automatic snapshotting runs isolated point-in-time backups before service restarts and engine updates, eliminating manual recovery overhead.
Restoring Worlds from .old Snapshots and Backup Archives#
The Valheim engine stores the previous successful save state directly in the active world folder using the .old file extension:
ls -lh "$WORLD_DIR"/Dedicated.*.old
If Dedicated.db.old and Dedicated.fwl.old exist and show non-zero byte counts, restore them to replace the active files:
cp "$WORLD_DIR/Dedicated.db.old" "$WORLD_DIR/Dedicated.db"
cp "$WORLD_DIR/Dedicated.fwl.old" "$WORLD_DIR/Dedicated.fwl"
If the .old files are also corrupted or missing, navigate to the backups/worlds/ directory where timestamped snapshots are retained:
ls -lh "$BACKUP_DIR"/Dedicated_backup_*.db
Identify the most recent timestamped backup pair and restore them:
LATEST_BACKUP=$(ls -t "$BACKUP_DIR"/Dedicated_backup_*.db | head -n 1 | sed 's/\.db$//')
echo "Restoring from: $LATEST_BACKUP"
cp "${LATEST_BACKUP}.db" "$WORLD_DIR/Dedicated.db"
cp "${LATEST_BACKUP}.fwl" "$WORLD_DIR/Dedicated.fwl"
Verifying File Permissions and Starting the Service#
After restoring both files, ensure ownership belongs to the dedicated service account, otherwise the daemon cannot read or modify the database:
sudo chown -R valheim:valheim "$HOME/.config/unity3d/IronGate/Valheim"
sudo chmod 644 "$WORLD_DIR"/Dedicated.db "$WORLD_DIR"/Dedicated.fwl
Start the systemd unit and monitor initialization in real time:
sudo systemctl start valheim
sudo journalctl -u valheim -f --no-pager
Confirm that the engine reports successful world deserialization:
World Dedicated loadedAt this point, players can safely reconnect to the server without further data loss.




