Valheim-broccoli

Valheim-broccoli

Docker app from Judd's Repository

Overview

A dedicated server for Valheim, with crossplay, world modifiers, and optional BepInEx and Thunderstore mods. Set SERVER_PASSWORD before you start the server. Forward UDP ports 2456 and 2457 on your router. Valheim uses PORT and PORT + 1. If you change the ports, also change PORT. The server files are installed on first start. After that, they are only updated if UPDATE_ON_START is true. Docker image by indifferentbroccoli.

marketing_assets_banner GitHub License GitHub Release GitHub Repo stars Docker Pulls

Game server hosting

Fast RAM, high-speed internet

Eat lag for breakfast

Try our valheim Server hosting free for 2 days!

Valheim Server Docker

Server Requirements

Resource Minimum Recommended
CPU Quad-Core Processor 2.8GHz (4 Cores) Hexa-Core Processor 3.4GHz+ (6 Cores)
RAM 2GB Recommend over 4GB for stable operation
Storage 2GB 4GB+

How to use

Copy the .env.example file to a new file called .env file. Then use either docker compose or docker run

[!IMPORTANT] Please make sure to change the following in the .env: SERVER_PASSWORD

Docker compose

Starting the server with Docker Compose:

services:
  valheim:
    image: indifferentbroccoli/valheim-server-docker
    restart: unless-stopped
    container_name: valheim
    stop_grace_period: 30s
    ports:
      - '2456:2456/udp'
      - '2457:2457/udp'
    environment:
      PUID: 1000
      PGID: 1000
    env_file:
      - .env
    volumes:
      - ./valheim/server-files:/valheim
      - ./valheim/server-data:/valheim-saves

Then run:

docker-compose up -d

Docker Run

docker run -d \
    --restart unless-stopped \
    --name valheim \
    --stop-timeout 30 \
    -p 2456:2456/udp \
    -p 2457:2457/udp \
    --env-file .env \
    -v ./valheim/server-files:/valheim \
    -v ./valheim/server-data:/valheim-saves
    indifferentbroccoli/valheim-server-docker

Environment Variables

Variable Description Default Value
PORT Choose the Port which you want the server to communicate with. Please note that this has to correspond with the Port Forwarding settings on your Router. Valheim uses the specified Port AND specified Port+1. Default Ports are 2456-2457. 2456
SERVER_NAME the name of your server that will be visible in the Server list. valheim
SERVER_PASSWORD The password for the server secret
CROSSPLAY_ENABLED Runs the Server on the Crossplay backend (PlayFab), which lets users from any platform join. true
WORLD_NAME A World with the name entered will be created. You may also choose an already existing World by entering its name. dedicated
PUBLIC Set the visibility of your server. true is default and will make the server visible in the browser. Set it to false to make the server invisible and only joinable via the ‘Join IP’-button. true
MAX_PLAYERS Maximum number of players allowed on the server. Vanilla Valheim caps this at 10; any other value automatically installs BepInEx and Azumatt's MaxPlayerCount mod, which is baked into the image. 10
SAVE_INTERVAL Change how often the world will save in seconds. 1800
KEEP_BACKUPS Sets how many automatic backups will be kept. The first is the ‘short’ backup length, and the rest are the ‘long’ backup length. By default that means one backup that is 2 hours old, and 3 backups that are 12 hours apart. 4
BACKUPS_SHORT Sets the interval between the first automatic backups in seconds. 7200
BACKUPS_LONG Sets the interval between the subsequent automatic backups in seconds. 43200
SERVER_PRESET Sets world modifier preset. Setting a preset will overwrite any other previous modifiers. Valid values are: Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer. Normal
MODIFIER_COMBAT Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: veryeasy, easy, hard, veryhard
MODIFIER_DEATH Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: casual, veryeasy, easy, hard, hardcore
MODIFIER_RESOURCES Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: muchless, less, more, muchmore, most
MODIFIER_RAIDS Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: none, muchless, less, more, muchmore
MODIFIER_PORTALS Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: casual, hard, veryhard
NO_MAP Disables the map. false
PLAYER_EVENTS When set, raid events are player-based rather than world-base false
PASSIVE_MOBS Enables passive mobs. false
NO_BUILD_COST Disables building cost. false
FIRE_HAZARDS Enables fire hazards, letting fire spread and ignite what it touches. false
BEPINEX_ENABLED Enables BepInEx modding. false
BEPINEXPACK_VERSION The BepInExPack_Valheim version installed when BepInEx is needed. 5.4.2333
MODS Comma separated list of Thunderstore dependency strings, as shown on each mod's page, for example Azumatt-AAA_Crafting-2.1.6. Setting it automatically enables BepInEx.
BETA Specifies a Steam beta branch to install (e.g., default_old). Set to public for stable branch. public
UPDATE_ON_START Runs the SteamCMD update when the container starts. The server is always installed on first start. false

Developer information

Building the image

You can build the image from the Dockerfile using the following command:

docker build -t indifferentbroccoli/valheim-server-docker .

Scripts

init.sh

Entrypoint of the container. This script will check if the server is installed and if not, it will install it. Also has a term_handler function to catch SIGTERM/SIGINT signals to gracefully stop the server. Features basic checks that will confirm if the server can be started.

start.sh

Starts the server with the settings from the .env file. Will also call the compile-settings.sh script to generate the server settings.

install.scmd

Installs the server. This script will download the server files using SteamCMD and extract them to the server directory.

funtions.sh

Contains functions that are used in the other scripts.

Media gallery

1 / 3

Install Valheim-broccoli on Unraid in a few clicks.

Find Valheim-broccoli in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Valheim-broccoli Review the template variables and paths Click Install

Requirements

4 CPU cores at 2.8 GHz, 2 GB RAM (more than 4 GB recommended), 2 GB storage.

Categories

Download Statistics

10,605
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
indifferentbroccoli/valheim-server-docker:latest
Last Updated2026-09-09
First Seen2026-09-19

Runtime arguments

Network
bridge
Shell
bash
Privileged
false
Extra Params
--restart=unless-stopped --stop-timeout=30

Template configuration

Game Port 1Portudp

UDP game port. Forward it on your router. Must be the same as PORT.

Target
2456
Default
2456
Value
2456
Game Port 2Portudp

UDP query port. Forward it on your router. Must be PORT + 1.

Target
2457
Default
2457
Value
2457
Server FilesPathrw

Valheim server files.

Target
/valheim
Default
/mnt/user/appdata/valheim
Value
/mnt/user/appdata/valheim
Server SavesPathrw

Worlds and backups.

Target
/valheim-saves
Default
/mnt/user/appdata/valheim/saves
Value
/mnt/user/appdata/valheim/saves
Server NameVariable

Name of the server in the server list.

Target
SERVER_NAME
Default
ValheimServer
Value
ValheimServer
Server PasswordVariable

Required. Password to join. Use at least 5 characters, and do not include the server name.

Target
SERVER_PASSWORD
World NameVariable

Name of the world. If no world has this name, a new world is made.

Target
WORLD_NAME
Default
Dedicated
Value
Dedicated
PublicVariable

Show the server in the server list. If false, players join with the Join IP button.

Target
PUBLIC
Default
true
Value
true
Crossplay EnabledVariable

Use the crossplay backend (PlayFab) so players on all platforms can join.

Target
CROSSPLAY_ENABLED
Default
true
Value
true
Max PlayersVariable

Maximum number of players. Vanilla Valheim allows 10. Other values install BepInEx and the MaxPlayerCount mod.

Target
MAX_PLAYERS
Default
10
Value
10
Server PresetVariable

World modifier preset: Normal, Casual, Easy, Hard, Hardcore, Immersive, or Hammer. It replaces earlier modifiers.

Target
SERVER_PRESET
Default
Normal
Value
Normal
Modifier: CombatVariable

veryeasy, easy, hard, or veryhard. Leave empty for the preset value.

Target
MODIFIER_COMBAT
Modifier: Death PenaltyVariable

casual, veryeasy, easy, hard, or hardcore. Leave empty for the preset value.

Target
MODIFIER_DEATH
Modifier: ResourcesVariable

muchless, less, more, muchmore, or most. Leave empty for the preset value.

Target
MODIFIER_RESOURCES
Modifier: RaidsVariable

none, muchless, less, more, or muchmore. Leave empty for the preset value.

Target
MODIFIER_RAIDS
Modifier: PortalsVariable

casual, hard, or veryhard. Leave empty for the preset value.

Target
MODIFIER_PORTALS
No MapVariable

Disable the map (true or false).

Target
NO_MAP
Default
false
Value
false
Player EventsVariable

Base raid events on players instead of the world (true or false).

Target
PLAYER_EVENTS
Default
false
Value
false
Passive MobsVariable

Make mobs passive (true or false).

Target
PASSIVE_MOBS
Default
false
Value
false
No Build CostVariable

Disable building costs (true or false).

Target
NO_BUILD_COST
Default
false
Value
false
Fire HazardsVariable

Let fire spread and set fire to what it touches (true or false).

Target
FIRE_HAZARDS
Default
false
Value
false
Save IntervalVariable

Seconds between world saves.

Target
SAVE_INTERVAL
Default
1800
Value
1800
Keep BackupsVariable

Number of automatic backups to keep.

Target
KEEP_BACKUPS
Default
4
Value
4
Backups ShortVariable

Seconds before the first automatic backup.

Target
BACKUPS_SHORT
Default
7200
Value
7200
Backups LongVariable

Seconds between the later automatic backups.

Target
BACKUPS_LONG
Default
43200
Value
43200
BepInEx EnabledVariable

Enable BepInEx modding (true or false).

Target
BEPINEX_ENABLED
Default
false
Value
false
BepInExPack VersionVariable

BepInExPack_Valheim version to install when BepInEx is needed.

Target
BEPINEXPACK_VERSION
Default
5.4.2333
Value
5.4.2333
ModsVariable

Comma-separated Thunderstore dependency strings, for example Azumatt-AAA_Crafting-2.1.6. If set, BepInEx is enabled.

Target
MODS
Beta BranchVariable

Steam branch to install, for example default_old. Use public for the stable branch.

Target
BETA
Default
public
Value
public
Update On StartVariable

Update the server with SteamCMD on each start (true or false). The server is always installed on first start.

Target
UPDATE_ON_START
Default
false
Value
false
PortVariable

Game port the server listens on. The server also uses PORT + 1. Must be the same as Game Port 1.

Target
PORT
Default
2456
Value
2456
PUIDVariable

User ID for file permissions.

Default
99
Value
99
PGIDVariable

Group ID for file permissions.

Default
100
Value
100