All apps · 0 apps
Valheim-broccoli
Docker app from Judd's Repository
Overview
Readme
View on GitHubGame 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 / 3Install 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.
Requirements
Categories
Download Statistics
Related apps
Explore more like this
Explore allLinks
Details
indifferentbroccoli/valheim-server-docker:latestRuntime arguments
- Network
bridge- Shell
bash- Privileged
- false
- Extra Params
--restart=unless-stopped --stop-timeout=30
Template configuration
UDP game port. Forward it on your router. Must be the same as PORT.
- Target
- 2456
- Default
- 2456
- Value
- 2456
UDP query port. Forward it on your router. Must be PORT + 1.
- Target
- 2457
- Default
- 2457
- Value
- 2457
Valheim server files.
- Target
- /valheim
- Default
- /mnt/user/appdata/valheim
- Value
- /mnt/user/appdata/valheim
Worlds and backups.
- Target
- /valheim-saves
- Default
- /mnt/user/appdata/valheim/saves
- Value
- /mnt/user/appdata/valheim/saves
Name of the server in the server list.
- Target
- SERVER_NAME
- Default
- ValheimServer
- Value
- ValheimServer
Required. Password to join. Use at least 5 characters, and do not include the server name.
- Target
- SERVER_PASSWORD
Name of the world. If no world has this name, a new world is made.
- Target
- WORLD_NAME
- Default
- Dedicated
- Value
- Dedicated
Show the server in the server list. If false, players join with the Join IP button.
- Target
- PUBLIC
- Default
- true
- Value
- true
Use the crossplay backend (PlayFab) so players on all platforms can join.
- Target
- CROSSPLAY_ENABLED
- Default
- true
- Value
- true
Maximum number of players. Vanilla Valheim allows 10. Other values install BepInEx and the MaxPlayerCount mod.
- Target
- MAX_PLAYERS
- Default
- 10
- Value
- 10
World modifier preset: Normal, Casual, Easy, Hard, Hardcore, Immersive, or Hammer. It replaces earlier modifiers.
- Target
- SERVER_PRESET
- Default
- Normal
- Value
- Normal
veryeasy, easy, hard, or veryhard. Leave empty for the preset value.
- Target
- MODIFIER_COMBAT
casual, veryeasy, easy, hard, or hardcore. Leave empty for the preset value.
- Target
- MODIFIER_DEATH
muchless, less, more, muchmore, or most. Leave empty for the preset value.
- Target
- MODIFIER_RESOURCES
none, muchless, less, more, or muchmore. Leave empty for the preset value.
- Target
- MODIFIER_RAIDS
casual, hard, or veryhard. Leave empty for the preset value.
- Target
- MODIFIER_PORTALS
Disable the map (true or false).
- Target
- NO_MAP
- Default
- false
- Value
- false
Base raid events on players instead of the world (true or false).
- Target
- PLAYER_EVENTS
- Default
- false
- Value
- false
Make mobs passive (true or false).
- Target
- PASSIVE_MOBS
- Default
- false
- Value
- false
Disable building costs (true or false).
- Target
- NO_BUILD_COST
- Default
- false
- Value
- false
Let fire spread and set fire to what it touches (true or false).
- Target
- FIRE_HAZARDS
- Default
- false
- Value
- false
Seconds between world saves.
- Target
- SAVE_INTERVAL
- Default
- 1800
- Value
- 1800
Number of automatic backups to keep.
- Target
- KEEP_BACKUPS
- Default
- 4
- Value
- 4
Seconds before the first automatic backup.
- Target
- BACKUPS_SHORT
- Default
- 7200
- Value
- 7200
Seconds between the later automatic backups.
- Target
- BACKUPS_LONG
- Default
- 43200
- Value
- 43200
Enable BepInEx modding (true or false).
- Target
- BEPINEX_ENABLED
- Default
- false
- Value
- false
BepInExPack_Valheim version to install when BepInEx is needed.
- Target
- BEPINEXPACK_VERSION
- Default
- 5.4.2333
- Value
- 5.4.2333
Comma-separated Thunderstore dependency strings, for example Azumatt-AAA_Crafting-2.1.6. If set, BepInEx is enabled.
- Target
- MODS
Steam branch to install, for example default_old. Use public for the stable branch.
- Target
- BETA
- Default
- public
- Value
- public
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
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
User ID for file permissions.
- Default
- 99
- Value
- 99
Group ID for file permissions.
- Default
- 100
- Value
- 100