Restoring a Valheim Server
February 20, 2026 ยท View on GitHub
Step 1: Stop the Valheim Server
Before making any changes to the server files, you need to stop the Valheim server. This ensures that no data gets corrupted during the process.
How to Stop the Valheim Server
-
Access the Server Console:
- If you're using a hosting service, log in to your control panel and find the console or command-line interface.
- If you're hosting the server locally, open the terminal or command prompt on the machine running the server.
-
Stop the Server Using Docker Compose:
- Enter one of the following commands to stop the Valheim server:
ordocker compose downdocker compose exec valheim odin stop - Wait until you see a confirmation message indicating the server has stopped.
- Enter one of the following commands to stop the Valheim server:
Step 2: Delete the Save Files
Now that the server is stopped, you can delete the existing save files.
How to Delete Save Files
-
Navigate to the Saves Directory:
- The saves directory is mapped to a local path using Docker volumes. Based on your
docker-compose.yml, the path is:/path/to/saves
- The saves directory is mapped to a local path using Docker volumes. Based on your
-
Delete the Files:
- Locate the files in the
/path/to/savesfolder and delete them. You can do this via the command line:rm -rf /path/to/saves/*
- Locate the files in the
Step 3: Untar the Desired Tar File into the Saves Folder
You need to extract the desired save file tar archive into the saves folder.
How to Untar the File
-
Navigate to the Directory Containing the Tar File:
- Use the terminal or command prompt to navigate to the directory where your tar file is located.
-
Untar the File:
- Enter the following command to untar the file into the saves folder:
tar -xvf <your-tar-file>.tar -C /path/to/saves - Replace
<your-tar-file>.tarwith the name of your tar file. For example:tar -xvf backup.tar -C /path/to/saves
- Enter the following command to untar the file into the saves folder:
Step 4: Start the Valheim Server
Now that the new save files are in place, you can start the Valheim server again.
How to Start the Valheim Server
- Start the Server Using Docker Compose:
- Enter the following command to start the Valheim server:
docker compose up -d - Wait until the server is up and running. You should see confirmation messages in the console.
- Enter the following command to start the Valheim server:
Docker Compose File for Reference
Here's the docker-compose.yml file for reference:
services:
valheim:
image: mbround18/valheim:3
user: "1000:1000"
environment:
PORT: 2456
NAME: "Created With Valheim Docker"
PASSWORD: "Change Me! Please."
TZ: "America/Los_Angeles"
AUTO_UPDATE: 1
UPDATE_ON_STARTUP: 0
AUTO_UPDATE_SCHEDULE: "0 1 * * *"
TYPE: Vanilla
build:
context: .
dockerfile: ./Dockerfile
ports:
- "2456:2456/udp"
- "2457:2457/udp"
- "2458:2458/udp"
volumes:
- /path/to/saves:/home/steam/.config/unity3d/IronGate/Valheim
- /path/to/backups:/home/steam/backups
- odin-output:/home/steam/.odin