Experimental Docker file to run a Valheim server on ARM
The valheim.Dockerfile is based on the stardart repositories of box86 and box64.
You can find in the docker hub the image to run directly: https://hub.docker.com/repository/docker/tranko/pi4valheim
Raspberry Pi4: I only tested on a 8GB of RAM with the next requirements:
- RaspianOs 64 Bits updated.
- Upgrade the distribution to Debian BullsEye (change the repositories to):
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
Then run the typical upgrade of Debian:
sudo apt update & sudo apt upgrade & sudo apt dist-upgrade
- Install Podman v3.3.1 (The version that is in the Debian repository is old (3.0.1) and it does not work correctly in my case).
- Install Docker (Tested on version 20.10.9)
If you use podman:
podman build -f valheim.Dockerfile
podman image tag c44a18e4e67d valheim-base:v1
If you use docker:
docker build --no-cache --tag valheim-base -f Valheim.dockerfile .
If you use podman:
podman build -f valheim.dodroidn2.Dockerfile
podman image tag c44a18e4e67d valheim-base:v1
If you use docker:
docker build --no-cache --tag valheim-base -f valheim.dodroidn2.Dockerfile .
This values don't be changed. Only if they change in the future:
STEAMAPPID=892970
BOX64_LD_LIBRARY_PATH=./linux64:/root/steam/linux32:$BOX64_LD_LIBRARY_PATH
BOX64_LOG=1
BOX64_TRACE_FILE=/root/valheim_data/output.log
BOX64_TRACE=1
This values are the real ones for yoru server:
PUBLIC=0 # 0 private / 1 public
PORT=2456 # Don't change if don't know what are you doing.
NAME=YourServerName # Your amazing name of your server.
WORLD=YourWorldName # Your unique name of your world.
SAVEDIR=/root/valheim_data # Where to save your data.
PASSWORD=YourUniquePassw0rd # You can leave blank and it will not have password
# NOT recommended for public servers.
docker run --rm --name valheim -p 2456-2457:2456-2457/udp -v /valheim_data:/root/valheim_data:rw --env-file env.world valheim-base
- Open assembly_valheim in "..\valheim_server_Data\Managed"
- Find Class (inside {}) "SteamManager"
- Find Row 93 and insert "Enviroment.SetEnviromentVariable("SteamAppId", "480")"
Pi4 has a limited hardware, it this is emulating x86_64 over arm64, so don't expect so high performance. It works, I didn't have any problems playing some hours. When the game saves it freeze all connections during some seconds, take it into account!!!!! Several times it does not start correctly and fail (the emulator is not yet finished and it does not work all the times). In that cases, you need to stop the process killing the process.