Run a Valheim dedicated server using Docker. There are plenty of other solutions out there that has way more features than this. I wanted a bare minimum setup.
The image can be found at:
docker pull ghcr.io/ekman/valheim:1
View the example docker-compose.yml
file for indications on how to install, configure and run this.
Open UDP ports 2456-2458
on your router and forward them to the hosting server/computer.
Mount all these volumes to your host.
Directory inside container | Description |
---|---|
/home/steam/config |
Contains all save data |
/home/steam/game |
Contains the game files |
Configure by setting environment variables. See below for an explanation of all available environment variables.
Name | Description |
---|---|
NAME |
Name appears in the server browser |
WORLD |
The save files will be named after this |
PORT |
Recommended leaving as default |
PASSWORD |
Users must enter this password to enter your server |
PUBLIC |
Should be 1 or 0 . If 1 then the server will appear in the server browser |
The game files will update when the container starts. I recommend adding the following cron job to continuously restart the server:
0 4 * * * /usr/local/bin/docker-compose --file /path/to/docker-compose.yml restart valheim >/dev/null 2>&1
This project complies with Semantic Versioning.
For a complete list of changes, and how to migrate between major versions, see releases page.