Self-Hosting a Modded Valheim Server on UmbrelOS

This guide documents a fully working, modern setup for running a modded Valheim dedicated server on UmbrelOS using Portainer, with:

• Automatic Valheim updates
• Automatic Thunderstore mod installs
• Daily update schedule
• Persistent worlds + backups
• FIX for Therzie mods breaking after recent Valheim updates

This guide assumes basic familiarity with UmbrelOS and Docker.


Why this guide exists

Valheim recently changed its startup/bootstrap order. Large content mods (Therzie: Warfare / Armory / Monstrum) broke on dedicated servers.

Symptoms:

• Mods work in single-player or local host
• Dedicated server kicks players after handshake
• Logs show config sync / prefab sync failures
• Happens on Windows AND Linux servers

The fix is a community hotpatch:

MSchmoecker – StartupHotfix

This MUST be installed for Therzie mods to work on dedicated servers.


Final Architecture

UmbrelOS Mini PC → Portainer → Docker Stack → Valheim Server Container

Server responsibilities:

• Auto update Valheim daily
• Auto install/update mods from Thunderstore
• Persist world + configs via Docker volume
• Automatically create backups

Clients:

• Use r2modman or Thunderstore Mod Manager
• Must match server mods


STEP 1 — Create the Portainer Stack

Open:

Umbrel → Portainer → Stacks → Add Stack

Name:

valheim

Paste the FULL compose file below.


Working Docker Compose

version: "3.8"

services:
  valheim:
    image: mbround18/valheim
    container_name: valheim-server
    restart: unless-stopped

    ports:
      - "2456-2458:2456-2458/udp"

    environment:
      NAME: "MyServer"
      WORLD: "MyWorld"
      PASSWORD: "ChangeThisPassword"

      TZ: "America/New_York"

      TYPE: "BepInEx"

      UPDATE_CRON: "0 6 * * *"
      UPDATE_IF_IDLE: "true"

      AUTO_BACKUP: "true"
      AUTO_BACKUP_DAYS: "7"

      # Thunderstore Auto Installer
      MODS: |
        MSchmoecker-StartupHotfix-*,
        ValheimModding-Jotunn-*,
        ValheimModding-JsonDotNET-*,
        pipakin-SkillInjector-*,
        JereKuusela-Server_devcommands-*,
        JereKuusela-World_Edit_Commands-*,
        Therzie-Warfare-*,
        Therzie-Armory-*,
        Therzie-Monstrum-*,
        ZenDragon-Zen_ModLib-*,
        ZenDragon-ZenPlayer-*

    volumes:
      - valheim-data:/home/steam

    stop_grace_period: 2m

volumes:
  valheim-data:

This Compose YAML contains a few basic mods and dependencies. The “*” wildcard forces the server to use the most recently version of each mod, so make sure to add it when adding your own mods. The mod list should work with either newline or newline+comma spacing. Deploy the stack.

FIRST STARTUP WILL TAKE 5–10 MINUTES.
The server is installing Valheim + mods.


STEP 2 — Confirm Mods Installed Correctly

Open container logs.

You should see:

• Installing mods from Thunderstore
• Installing StartupHotfix + other mods on your list
• BepInEx Chainloader started
• Mods loading list

If you do NOT see mod install logs, wait longer.
First boot is slow.


STEP 3 — Copy Your Existing World (Optional)

Navigate in Umbrel Files:

Apps → Portainer → Volumes → valheim-data → _data

Copy world files into:

.valheim/saves/worlds_local

Files needed:

WorldName.db
WorldName.fwl

Restart container.


STEP 4 — Port Forwarding

Forward UDP ports on your router:

2456
2457
2458

Connect via Community Servers or Direct IP.


STEP 5 — Client Setup

All players must:

  1. Install r2modman
  2. Import the same mod list or install mods individually (modlist or profile export/import guides can be found with a quick Google search).
  3. Launch Valheim from the mod manager

Server auto-installs mods, but clients still need them locally.


Why the StartupHotfix is Required

Valheim changed server startup order.

Large content mods initialize too early and fail on dedicated servers.

StartupHotfix:

• Patches the new bootstrap process
• Restores old initialization timing
• Fixes prefab + RPC registration

Without it, Therzie mods disconnect players instantly, Client gets a black screen.


Automatic Updates (Hands‑Off Operation)

Every day at 6 AM:

Server will:

  1. Check for Valheim updates
  2. Update SteamCMD
  3. Update Thunderstore mods
  4. Restart if no players online

Your server is now fully self‑maintaining.


Backup Location

Backups stored in volume:

/home/steam/backups

Copy to NAS or storage medium of your choice periodically.


Final Result

You now have:

• Fully automated Valheim server
• Thunderstore mod auto‑updates
• Therzie mods working again
• Persistent worlds + backups
• Zero manual maintenance

Time to actually play Valheim instead of debugging it!


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *