Host Valheim dedicated servers using Docker hosts or Kubernetes.
1.3K
This is NOT an official Valheim docker container.
Dedicated Valheim server using Docker.
| Tag | Description |
|---|---|
| stable | Latest stable release build |
| latest | Latest stable release build |
| experimental | Latest experimental release build |
| Parameter | Function | Default |
|---|---|---|
| SERVER_DIR | Location for server files. | /data/server |
| STEAM | Location of steamcmd client. | /steam |
| STEAM_APP_EXTRAS | Optional. Additional options and values for steam app update, e.g setting BETA versions. | `` |
| UPDATE_OS | Update core OS on startup. 1 enable, 0 disable. | 1 |
| UPDATE_STEAM | Update steamcmd on startup. 1 enable, 0 disable. | 1 |
| UPDATE_SERVER | Update dedicated server specified by STEAM_APP_ID on startup. 1 enable, 0 disable. | 1 |
| PUID | User ID to run steamcmd under as well as mount permissions. | 1000 |
| PGID | Group ID to run steamcmd under as well as mount permissions. | 1000 |
| LANG | Language environment to use in containers. | en_US.UTF-8 |
| LANGUAGE | Language environment to use in containers. | en_US:UTF-8 |
| LC_ALL | Language environment to use in containers. | en_US.UTF-8 |
| SERVER_NAME | Name of your Valheim server. | My Valheim Server |
| WORLD_NAME | Name of the world to load/create. | Dedicated |
| SERVER_PASSWORD | Password required to join the server (minimum 5 characters). | pleasechangeme |
| SERVER_PORT | Primary port for the server. | 2456 |
| SERVER_PUBLIC | Whether the server appears in the public server list. 1 for public, 0 for private. | 1 |
| Port | Protocol | Required? | Description |
|---|---|---|---|
| 2456 | UDP | Mandatory | Main game port (configurable via SERVER_PORT) |
| 2457 | UDP | Mandatory | Secondary port (automatically SERVER_PORT + 1) |
| 2458 | UDP | Mandatory | Tertiary port (automatically SERVER_PORT + 2) |
| Volume | Function |
|---|---|
| /data | User data location for the server. |
services:
valheim-server:
image: gamepackets/valheim:latest
container_name: valheim-server
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- UPDATE_SERVER=1
- SERVER_NAME=My Valheim Server
- WORLD_NAME=Dedicated
- SERVER_PASSWORD=ChangeMe123
- SERVER_PUBLIC=1
ports:
- "2456:2456/udp"
- "2457:2457/udp"
- "2458:2458/udp"
volumes:
- ./data:/data
docker run -d \
--name=valheim-server \
--restart=unless-stopped \
-e PUID=1000 \
-e PGID=1000 \
-e UPDATE_SERVER=1 \
-e SERVER_NAME="My Valheim Server" \
-e WORLD_NAME="Dedicated" \
-e SERVER_PASSWORD="ChangeMe123" \
-e SERVER_PUBLIC=1 \
-p 2456:2456/udp \
-p 2457:2457/udp \
-p 2458:2458/udp \
-v ./data:/data \
gamepackets/valheim:latest
# Build latest version
docker build -f Dockerfile.Latest -t valheim:latest .
# Build stable version
docker build -f Dockerfile.Stable -t valheim:stable .
# Build experimental version
docker build -f Dockerfile.Experimental -t valheim:experimental .
All server configuration is done through environment variables:
1 to list publicly, 0 for private (LAN only)To use Valheim's public test branch, add the following environment variable:
environment:
- STEAM_APP_EXTRAS=-beta public-test
World data is stored in /data/server/.config/unity3d/IronGate/Valheim/worlds_local/ inside the container.
It's recommended to regularly backup the ./data directory to preserve your world and character data.
SERVER_PUBLIC=1 is setSERVER_PASSWORD is at least 5 charactersdocker logs valheim-server/data volume is properly mountedMIT License - See LICENSE file for details
Content type
Image
Digest
sha256:88a409c52…
Size
1.6 GB
Last updated
6 months ago
docker pull gamepackets/valheim:sha-720b6b6