How to Host a Valheim 1.0 Dedicated Server with Docker on Ubuntu Server Steve, October 3, 2026October 3, 2026 This guide sets up a Valheim 1.0 dedicated server on Ubuntu Server with Docker, using your existing world and BepInEx mods. The Docker image updates the server automatically and backs up the world every hour. Valheim 1.0 (released September 9, 2026) changed how worlds are saved. Older guides that tell you to upload a .db and .fwl file pair are out of date. What you need ItemRecommendationVirtual machineHyper-V (or any hypervisor) running Ubuntu ServerCPU2 cores minimum, 4 fast cores recommendedRAM4 GB minimum, 8 GB recommended, fixed (turn off Hyper-V Dynamic Memory)Disk10 GB free or more for the server, world and backupsIP addressA static IP or DHCP reservation for the VMWindows PCValheim on Steam, plus PowerShell or WinSCP to copy filesSSH accessYou can log in to the VM as a normal user with sudo Throughout this guide, replace youruser with your Ubuntu username and 192.168.1.50 with your VM’s IP address. Valheim does most of its work on one thread, so a few fast cores beat many slow ones. Step 1: Install Docker and give your user access Install Docker from Docker’s official script rather than Ubuntu’s docker.io package, so you get Docker Compose v2 included: curl -fsSL https://get.docker.com | sudo sh Add your user to the docker group so you can run Docker without sudo: sudo usermod -aG docker youruser The group change only applies to new logins. Log out and SSH back in (or run newgrp docker for the current terminal), then check it: groups docker ps groups should list docker, and docker ps should print an empty table. If you skip this step you will see permission denied while trying to connect to the docker API at unix:///var/run/docker.sock. Step 2: Create the server folders Create the folders as your own user before the container ever runs. If Docker creates them first, they end up owned by root and your uploads fail with “permission denied.” mkdir -p ~/valheim/config/worlds_local ~/valheim/config/bepinex/plugins ~/valheim/data When you’re done, the folders look like this: ~/valheim/ ├── docker-compose.yml ├── config/ (mounted as /config) │ ├── worlds_local/ │ │ └── YourWorld/ (your world folder goes here) │ └── bepinex/ │ └── plugins/ (mod .dll files go here) └── data/ (server files, downloaded automatically) Step 3: Find your world on your Windows PC In Valheim 1.0, a world is a folder named after the world, not a .db and .fwl pair. Inside it you will find files like these: FileWhat it is_main.N.fwl2World metadata (name, seed), replaces the old .fwl_main.N.db2World data, replaces the old .db_main.N.chunksIndex of the terrain chunks_main.N.okMarker that the last save finished cleanly*.chunkTerrain chunks, more appear as the world is explored The N is a save counter (for example _main.7.db2). Never rename these files. There are two places the world can be, depending on whether it is a local or Steam Cloud save. Close Valheim before you look. Local saves. Press Win+R and paste: %userprofile%\AppData\LocalLow\IronGate\Valheim\worlds_local If the world folder there only contains cacheMinimap... files, that is just a minimap cache. Your real world is in Steam Cloud. Steam Cloud saves. Press Win+R and paste: C:\Program Files (x86)\Steam\userdata Open the numbered folder (your Steam account ID), then 892970\remote\worlds. Your world folder, with the _main.N.* and .chunk files, is there. If you have several numbered folders, check each one. Alternatively, in Valheim go to Start Game, pick your world, choose Manage Saves and move it to local storage. If you can’t find the world in either place, it may have been hosted on a friend’s PC. Valheim creates a minimap cache for worlds you join, but the world itself lives on the host’s machine. Step 4: Upload the world folder and mods Upload the whole world folder, never individual files out of it. Close Valheim and Steam first so cloud sync doesn’t change files mid-copy. You can upload before the server has ever run. The container picks up the world on its first start. Option A: PowerShell (built into Windows 11). Change into the folder that holds your world folder, then copy it with -r: cd "C:\Program Files (x86)\Steam\userdata\<SteamID>\892970\remote\worlds" scp -r YourWorld youruser@192.168.1.50:~/valheim/config/worlds_local/ For a local save, use cd "$env:USERPROFILE\AppData\LocalLow\IronGate\Valheim\worlds_local" instead. Quoting the path handles spaces in Windows usernames. Option B: WinSCP. Connect with the SFTP protocol to your VM’s IP using your Ubuntu login. Browse on the right to /home/youruser/valheim/config/worlds_local/ and drag the whole world folder over from the left. Mods. If you already play with BepInEx mods on Windows, they’re in your game folder: C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins Copy everything in that folder to ~/valheim/config/bepinex/plugins/ on the server, both the loose .dll files and the mod folders (EpicLoot, Jotunn and so on). Don’t upload BepInEx itself. The container installs it. Every mod needs a version updated for Valheim 1.0. This PowerShell script copies them all in one go. Save it as Copy-ValheimMods.ps1 in a folder like Downloads, not inside the plugins folder, or it will upload itself along with the mods. Change $Server and $User to match your VM. param( [string]$Server = "192.168.1.50", [string]$User = "youruser", [string]$ValheimPath = "C:\Program Files (x86)\Steam\steamapps\common\Valheim", [string]$RemotePath = "~/valheim/config/bepinex/plugins/", [switch]$Restart ) $plugins = Join-Path $ValheimPath "BepInEx\plugins" if (-not (Test-Path -LiteralPath $plugins)) { Write-Error "Plugins folder not found: $plugins"; exit 1 } $items = @(Get-ChildItem -LiteralPath $plugins | ForEach-Object { $_.FullName }) if ($items.Count -eq 0) { Write-Error "No mods found in $plugins"; exit 1 } Write-Host "Found $($items.Count) items to copy." ssh "$User@$Server" "mkdir -p $RemotePath" if ($LASTEXITCODE -ne 0) { Write-Error "Could not connect to $Server"; exit 1 } scp -r @items "${User}@${Server}:$RemotePath" if ($LASTEXITCODE -ne 0) { Write-Error "Copy failed (scp exit code $LASTEXITCODE)"; exit 1 } Write-Host "Copy complete." if ($Restart) { ssh "$User@$Server" "cd ~/valheim && docker compose restart" } Run it from the folder you saved it in. -ExecutionPolicy Bypass gets past Windows blocking downloaded scripts, and -Restart restarts the container afterward if the server is already running. powershell -ExecutionPolicy Bypass -File .\Copy-ValheimMods.ps1 The script copies the mods but not their settings in BepInEx\config. The server creates default config files on its first start. Check the upload on the VM: ls ~/valheim/config/worlds_local/YourWorld You should see the _main.N.* and .chunk files directly inside it. If you see another YourWorld folder instead, it got nested one level too deep. Move its contents up one level. Step 5: Create docker-compose.yml This guide uses ghcr.io/community-valheim-tools/valheim-server. It replaced the lloesche image (the old GitHub link redirects there) and supports the 1.0 world format, including backups. Create the file with nano ~/valheim/docker-compose.yml and paste: services: valheim: image: ghcr.io/community-valheim-tools/valheim-server container_name: valheim cap_add: - sys_nice ports: - "2456-2457:2456-2457/udp" volumes: - ./config:/config - ./data:/opt/valheim environment: SERVER_NAME: "My Valheim Server" WORLD_NAME: "YourWorld" SERVER_PASS: "changeme123" SERVER_PUBLIC: "false" TZ: "America/Chicago" BACKUPS: "true" BACKUPS_MAX_AGE: "7" BEPINEX: "true" restart: unless-stopped stop_grace_period: 2m SettingWhat to putWORLD_NAMEThe exact name of your world folder, case-sensitive. A mismatch makes the server generate a brand-new world.SERVER_PASSAt least 5 characters, and not contained in SERVER_NAME, or the server refuses to start.SERVER_PUBLICfalse keeps it out of the public server list; friends join by IP.TZYour time zone, used for backup and restart times.BEPINEXtrue installs BepInEx and loads mods from config/bepinex/plugins. Remove it for a vanilla server.stop_grace_periodGives the server time to finish saving when you stop it. Leave crossplay off when using mods. Crossplay clients (Xbox, Game Pass) can’t run BepInEx mods. If one of your mods uses RPC and needs an extra port, change the port line to "2456-2458:2456-2458/udp". The container checks for Valheim updates every 15 minutes and restarts only when nobody is online, so the server keeps up with Steam on its own. Backups land in config/backups every hour. Step 6: Start the server and watch the logs cd ~/valheim docker compose up -d docker compose logs -f The first start takes several minutes while the container downloads about 1 GB of server files from Steam, then BepInEx. Press Ctrl+C to stop following the logs. The server keeps running. What to look for: BepInEx loading each of your plugins by name. The server loading your world name, not generating a new one. Game server connected, which means it’s ready for players. Common commands: TaskCommandStop the server (saves first)docker compose downRestart itdocker compose restartUpdate the container imagedocker compose pull && docker compose up -dCheck it’s runningdocker ps Uploading files later Stop the server before you replace world files, so it can’t save over them mid-copy: cd ~/valheim docker compose down docker ps When valheim no longer shows in docker ps, upload your files, then start it again with docker compose up -d. Mods only load when the container starts, so new mods just need a restart. The container runs as root, so once the server has run, the folders it created under config belong to root and your uploads fail with “Permission denied.” Take ownership back before uploading: sudo chown -R youruser:youruser ~/valheim/config ls -ld ~/valheim/config/bepinex/plugins The second command should show your username instead of root. New files the container writes later, like backups and mod configs, are root-owned too, so run the chown again whenever an upload is refused. Step 7: Connect, firewall and port forwarding Join the server. In Valheim, go to Join Game, click Join IP and enter your VM’s IP (for example 192.168.1.50). You don’t need to enter the port if you kept 2456. Join IP works even with SERVER_PUBLIC set to false. The Steam server browser does not. Firewall on the VM. If ufw is enabled, open the game ports: sudo ufw allow 2456:2457/udp Friends outside your network. On your router, forward UDP ports 2456-2457 to the VM’s IP. Friends then use Join IP with your public IP address. Keep the VM’s IP static, or the forward breaks the next time it changes. Mods on clients. Everyone who joins needs the same mods at the same versions installed in their own game, or they’ll be kicked or desync. Players also need the same Valheim version as the server, which the container keeps current. Troubleshooting SymptomFixpermission denied ... /var/run/docker.sockYour user isn’t in the docker group yet. Run sudo usermod -aG docker youruser, then log out and back in (Step 1).scp says Permission denied or stat remote: No such file or directoryThe container created those folders as root. Run sudo chown -R youruser:youruser ~/valheim/config, then upload again.The mod copy script uploads itselfThe script is saved inside BepInEx\plugins. Move it to another folder like Downloads and run it from there.Server generates a new, empty worldWORLD_NAME doesn’t exactly match the world folder name, or the folder is nested (YourWorld/YourWorld/). Stop, fix, start again.Server won’t start at allCheck that SERVER_PASS is 5+ characters and not part of SERVER_NAME. Then move the files out of config/bepinex/plugins and start vanilla to see whether a mod is the cause.Players can’t join from outsideConfirm UDP 2456-2457 is forwarded to the VM and open in ufw, and that they’re using Join IP with your public IP.“Incompatible version” when joiningThe client and server are on different Valheim versions. Wait for the container’s update check, or run docker compose restart.Old world (pre-1.0) instead of a folderUpload the .db and .fwl pair into worlds_local and set WORLD_NAME to the file name without extension. The server converts it to the 1.0 folder format on first load and keeps a backup. Conversion is one-way. Keep a copy of your world on your PC until you’ve confirmed the server loads it correctly. Sources community-valheim-tools/valheim-server-docker README Valheim 1.0: What changed for servers (Winternode) Valheim save location and the 1.0 world folder format (GameServerKings) Valheim ContainerDockerLinuxMultiplayerSteamUbuntuVaheimValheim 1.0Valheim Dedicated ServerValheim Deep North