Mod Support! It is supported to launch the server with BepInEx but!!!!! as a disclaimer! You take responsibility for debugging why your server won't start. Modding is not supported by the Valheim developers officially yet; Which means you WILL run into errors. This repo has been tested with running ValheimPlus as a test mod and does not have any issues. See Getting started with mods
See further on down for advanced environment variables.
||FALSE||Sets what timezone your container is running on. This is used for timestamps and cron jobs. Click Here for which timezones are valid.|
||FALSE||Sets the User Id of the steam user.|
||FALSE||Sets the Group Id of the steam user.|
||TRUE||Sets the port your server will listen on. Take note it will also listen on +2 (ex: 2456, 2457, 2458)|
||TRUE||The name of your server! Make it fun and unique!|
||TRUE||This is used to generate the name of your world.|
||FALSE||Sets whether or not your server is public on the server list.|
||TRUE||Set this to something unique!|
||FALSE||This works in conjunction with
||FALSE||Change to set how frequently you would like the server to backup. If you need help figuring out a cron schedule click here.|
||FALSE||This is the number of days you would like to keep backups for. While backups are compressed and generally small it is best to change this number as needed.|
||FALSE||Create a backup on right before updating and starting your server.|
||FALSE||Create a backup on shutdown.|
|WEBHOOK_URL||``||FALSE||Supply this to get information regarding your server's status in a webhook or Discord notification! Click here to learn how to get a webhook url for Discord|
||FALSE||Tries to update the server the container is started.|
This is a basic example of a docker compose, you can apply any of the variables above to the
environmentsection below but be sure to follow each variables description notes!
version: "3" services: valheim: image: mbround18/valheim:latest ports: - 2456:2456/udp - 2457:2457/udp - 2458:2458/udp environment: - PORT=2456 - NAME="Created With Valheim Docker" - WORLD="Dedicated" - PASSWORD="Banana Phone" - TZ=America/Chicago - PUBLIC=1 volumes: - ./valheim/saves:/home/steam/.config/unity3d/IronGate/Valheim - ./valheim/server:/home/steam/valheim
Everything but the kitchen sink
version: "3" services: valheim: image: mbround18/valheim:latest ports: - 2456:2456/udp - 2457:2457/udp - 2458:2458/udp environment: - PORT=2456 - NAME="Created With Valheim Docker" - WORLD="Dedicated" - PASSWORD="Strong! Password @ Here" - TZ=America/Chicago - PUBLIC=1 - AUTO_UPDATE=1 - AUTO_UPDATE_SCHEDULE="0 1 * * *" - AUTO_BACKUP=1 - AUTO_BACKUP_SCHEDULE="*/15 * * * *" - AUTO_BACKUP_REMOVE_OLD=1 - AUTO_BACKUP_DAYS_TO_LIVE=3 - AUTO_BACKUP_ON_UPDATE=1 - AUTO_BACKUP_ON_SHUTDOWN=1 - WEBHOOK_URL="https://discord.com/api/webhooks/IM_A_SNOWFLAKE/AND_I_AM_A_SECRET" - UPDATE_ON_STARTUP=0 volumes: - ./valheim/saves:/home/steam/.config/unity3d/IronGate/Valheim - ./valheim/server:/home/steam/valheim - ./valheim/backups:/home/steam/backups
This repo automatically launches with the proper environment variables for BepInEx. However, you have to install it manually in the container due to the fact that the modding community around Valheim is still in its infancy.
This repo can automatically send notifications to discord via the WEBHOOK_URL variable. Only use the documentation link below if you want advanced settings!
If you would like to have release notifications tied into your Discord server, click here:
Note: The discord is PURELY for release notifications and any + all permissions involving sending chat messages has been disabled. Any support for this repository must take place on the Discussions.
- latest (Stable):
- 1.2.0 (Stable):
- Readme update to include the versions section and environment variables section.
- #18 Changed to
rootas the default user to allow updated steams User+Group IDs.
- #18 Fixed issue with the timezone not persisting.
- To exec into the container you now have to include the
-u|--userargument to access steam directly. Example
docker-compose exec --user steam valheim bash
- There is now a
dry-runcommand argument on
odinto preview what the command would do.
- You can run with
-d|--debugto get verbose logging of what
- #11 Added check for length of password and fail on odin install or odin stop failures.
- #24 Added public variable to dockerfile and odin
- #35 Fix for the server to now utilizing SIGINT
YOU WILL HAVE TO MANUALLY STOP YOUR SERVER;use
pidof valheim_server.x86_64to get the pid and then
kill -2 $pidbut replace pid with the pid from
- #53 Formatted scripts to be more useful and added timezone scheduling.
- #77 Fix auto update not acknowledging variables and added odin to system bin.
- #89 Daemonized the server process by using rust specific bindings rather than dropping down to shell.
- 1.1.1 (Stable):
- Includes PR #10 to fix the double world argument.
- 1.1.0 (Stable):
- Includes a fix for #3 and #8.
- Improves the script interface and separation of concerns, files now have a respective code file that supports interactions for cleaner development experience.
- Docker image is cleaned up to provide a better usage experience. There is now an
- Has a bug where the script has two entries for the world argument.
- 1.0.0 (Stable):
- It works! It will start your server and stop when you shut down.
- This supports passing in environment variables or arguments to
- Has a bug in which it does not read passed in variables appropriately to Odin. Env variables are not impacted see #3.