# valheim-docker: a Valheim server with updates, backups and a rootless container

> valheim-docker packages the Valheim dedicated server with Odin, a Rust manager that starts, stops and updates the server, and Huginn, an HTTP server built on the same source. The Docker path gives you automatic updates on a schedule, world backups, and a migration to a rootless design that is the most substantial change in the project.

**mbround18/valheim-docker** — Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface. 

- Repository: https://github.com/mbround18/valheim-docker
- Website: https://hub.docker.com/r/mbround18/valheim
- Stars: 858 · Forks: 96
- Language: Rust
- License: BSD-3-Clause
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/mbround18-valheim-docker

## Two binaries, one purpose

The repository bundles its tools so you can run a Valheim server without installing Docker, and it contains two of them. Odin runs the show and does almost all the heavy lifting in the project, starting, stopping and managing the Valheim server instance. Huginn is an HTTP server built on the same source as Odin and uses those capabilities to expose a few HTTP endpoints. The Cargo workspace confirms the layout, with members src/odin, src/huginn and a third, src/shared, and the shared crate holding what both binaries need. The repository description calls this a dedicated game server manager designed with resiliency in mind by providing automatic updates, world backup support and a user friendly command line interface.

## The bare metal path in eight steps

Running directly on a Linux server starts from a release archive. You navigate to the latest release, download the archive for your platform, named with the version and the target triple, extract it, make the files executable with a chmod, and optionally add them to your PATH. Then you navigate to the directory where you want the server installed, run the configure command with a password, and finally run the start command.

```bash
odin configure --password "Your Super Strong Password"
odin start
```

The configure step also accepts a name and a port, along with other arguments. The README is clear about the tradeoff between the two paths: using the binaries on an Ubuntu server means being more involved and configuring a few things manually, whereas the Docker section is the managed, easy option. That framing is the whole reason the container image exists, and it is also why the image carries its own manager binary rather than expecting you to install one.

## The compose file and the variables that matter

The docker-compose file is short and shows the shape of a deployment.

```yaml
services:
  valheim:
    image: mbround18/valheim:3
    environment:
      PORT: 2456
      NAME: "Created With Valheim Docker"
      PASSWORD: "Change Me! Please."
      TZ: "America/Los_Angeles"
      AUTO_UPDATE: 1
      UPDATE_ON_START: 0
      AUTO_UPDATE_SCHEDULE: "0 1 * * *"
      TYPE: Vanilla
```

The ports are three UDP mappings, 2456 through 2458, and the volumes are the saves directory, the server directory and the backups directory, all mounted under the steam user home. The password placeholder is not cosmetic: the environment example says the server refuses to start with the placeholder password, so a failed container start with no other explanation is the placeholder still in place. The timezone variable matters more than it looks for a survival game, because the world's day and night cycle follows the server clock.

## Updates and backups on a schedule

Automatic updates are controlled by three variables. AUTO_UPDATE enables the feature and is on by default, UPDATE_ON_START controls whether the server updates when it starts rather than on a timer, and AUTO_UPDATE_SCHEDULE takes a cron expression, with the default of one minute past one in the morning. The backups work the same way, with AUTO_BACKUP off by default and an AUTO_BACKUP_SCHEDULE that the example sets to every fifteen minutes. The point of the scheduler rather than a fixed interval is that it lets the update land at a quiet hour and the backups land often, and the environment example documents every variable with the default that applies when it is unset. There is also a MODS_CONTINUE_ON_FAILURE switch that changes the failure policy: by default the whole install fails if any single mod fails, and setting it to true installs the mods that succeeded and only warns about the rest.

## Mods, BepInEx and the wildcard syntax

The shortest path to a modded server is two settings. Set TYPE=BepInEx, which installs the BepInEx framework automatically, and provide the mods through MODS as a newline-separated list of dependency strings or direct URLs.

```yaml
    environment:
      - TYPE=BepInEx
      - |
        MODS=ValheimModding-Jotunn-*
        OdinPlus-OdinHorse-1.4.12
        https://cdn.thunderstore.io/live/repository/packages/abearcodes-SimpleRecycling-0.0.10.zip
```

Wildcards are supported and resolve to the latest version at startup, with Author-Package-* meaning the latest, Author-Package-1.* the latest matching major, and Author-Package-1.2.* the latest matching major and minor. The guidance is to prefer pinning exact versions for stability in production, and to consider disabling automatic updates with many mods to avoid mismatch issues. Mods come from Thunderstore by default, with MODS_REPOSITORY=hexium switching to Hexium, and single entries can be prefixed with hex: or ts: to mix repositories. The README also says plainly that mod support is available through BepInEx, that you are responsible for debugging mod-related startup issues, and that modding is not officially supported by the Valheim developers, so incompatibilities can happen.

## The rootless migration is the substantive change

The table of contents lists a Security section titled Migration to Rootless Design, and there is a separate rootless design guide in the documentation. That is the change to understand before deploying. A rootless container runs the game process as an unprivileged user rather than as root, and the compose example reflects that with a user setting of 1000:1000 in the mods example. The consequence is that the bind-mounted directories for saves, server files and backups have to be owned by that user, and the environment example warns that the real .env file is gitignored while the example is not, so real passwords and tokens must never go into the example. The security argument for the change is straightforward for a container that downloads and executes third-party mod code from a public repository.

## Building the image from a Dockerfile with cargo-chef

The Dockerfile builds Odin in Rust on Debian and then ships it on a slim Debian base. The stages are the standard cargo-chef arrangement: a base stage with cmake installed, a stage that installs cargo-chef, a planner stage that produces a recipe.json from the sources, and a cacher stage that cooks the dependencies so the layer can be cached across source changes. The builder stage then copies the cached target directory and runs make release with the production profile. The odin runtime stage installs ca-certificates, with a comment explaining why: debian-slim ships no CA bundle, so every HTTPS request Odin makes, whether a mod download or the Gale profile API, fails at TLS before it reaches the network. The release profile in the Cargo manifest matches that discipline, with thin link-time optimisation, one codegen unit and an opt-level of 3, and the workspace forbids unsafe code outright.

## Conclusion

Use valheim-docker when you run a Valheim server for a group of people and want the update, backup and restart chores handled rather than written into a cron file, because Odin does all three from environment variables. Do not expect modded servers to be trouble free, because the README says modding is not officially supported by the Valheim developers so incompatibilities happen. Verify first that your Docker engine is version 20 or newer, that you pin to a major or minor tag rather than latest in production, and whether the rootless design suits your setup, since the container runs as an unprivileged user and the volumes have to be owned by that user.

## FAQ

### What is Odin in valheim-docker?

Odin is the Rust manager that does almost all the heavy lifting in the project, starting, stopping and managing the Valheim server instance, and it provides automatic updates, world backup support and the command line interface. Huginn is an HTTP server built on the same source that exposes a few HTTP endpoints.

### How do I run a Valheim server with Docker from valheim-docker?

Use the compose file with the mbround18/valheim:3 image, set the environment variables including a real password, a port, a name and a timezone, and map the three UDP ports and the saves, server and backups volumes. The README asks you to use Docker engine 20 or newer and to pin to a major or minor tag in production rather than latest.

### How do I install mods on a valheim-docker server?

Set TYPE=BepInEx, which installs the BepInEx framework automatically, and list the mods in MODS as newline-separated dependency strings or direct URLs. Thunderstore wildcards such as Author-Package-* are supported and resolve to the latest version at startup, and the README recommends pinning exact versions in production.

### How do automatic updates and backups work in valheim-docker?

Both are controlled by environment variables. AUTO_UPDATE enables updates, UPDATE_ON_START controls whether an update happens on start, and AUTO_UPDATE_SCHEDULE is a cron expression defaulting to one minute past one in the morning. AUTO_BACKUP and AUTO_BACKUP_SCHEDULE do the same for world backups, with the example schedule every fifteen minutes.

### What licence is valheim-docker released under?

BSD-3-Clause, with the LICENSE file at the repository root. The recent releases are v3.8.10 from 2026-10-15, v3.8.9 from 2026-09-28 and v3.8.8 from 2026-09-19, and the images are published on Docker Hub and the GitHub Container Registry.

## Sources

- [License: BSD-3-Clause](https://github.com/mbround18/valheim-docker/blob/main/LICENSE)
- [mbround18/valheim-docker on GitHub](https://github.com/mbround18/valheim-docker)
- [Project website](https://hub.docker.com/r/mbround18/valheim)
- [README](https://github.com/mbround18/valheim-docker/blob/main/README.md)
- [Releases](https://github.com/mbround18/valheim-docker/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/mbround18-valheim-docker
