01
How Valheim mods work
Valheim has no official mod system. Almost all mods go through BepInEx, a loader that injects extensions (.dll files) when the game starts. There is a version prepared for Valheim, the BepInExPack_Valheim package by denikson, published on Thunderstore, the site that hosts most of the game's mods. Use this package rather than the original BepInEx.
Before installing a mod, check which side it must run on:
- server side only: administration or backup tools, which players do not need to install;
- player side only: interface, display, shortcuts. The server does not need them;
- both sides: anything that adds items, buildings or creatures or changes the rules of the world. This is the most common case.
A mod installed on both sides must have the same version everywhere. Some mods check the version on connection and refuse a player who does not have the right one; others let them in, with invisible items or crashes as a result. Each mod's Thunderstore page says where to install it and which other mods it depends on.
Console players cannot install mods: a server that requires one excludes them. If your server is not installed yet, start with create a Valheim dedicated server: this guide uses its paths (/opt/valheim, the valheim user and service).
02
Back up the world, then install BepInEx
Back up first. A mismatched mod can damage a world. Stop the server and archive the data folder (the one set by -savedir), which holds the world's .db and .fwl files:
sudo systemctl stop valheim
sudo -u valheim tar czf /opt/valheim/avant-mods-$(date +%F).tar.gz -C /opt/valheim donnees
Then copy the archive off the server, with scp for example.
Install BepInEx. Download the BepInExPack_Valheim archive from its Thunderstore page (manual download button), upload it to /tmp on the server, then:
sudo apt install -y unzip
sudo -iu valheim
unzip /tmp/denikson-BepInExPack_Valheim-*.zip -d /opt/valheim/bepinex-pack
cp -r /opt/valheim/bepinex-pack/BepInExPack_Valheim/* /opt/valheim/serveur/
chmod u+x /opt/valheim/serveur/start_server_bepinex.sh
nano /opt/valheim/serveur/start_server_bepinex.sh
exit
In start_server_bepinex.sh, copy your parameters (name, world, password, -savedir) onto the line that launches valheim_server.x86_64. Then point the service to this script: in /etc/systemd/system/valheim.service, the line becomes ExecStart=/opt/valheim/serveur/start_server_bepinex.sh.
sudo systemctl daemon-reload
sudo systemctl start valheim
journalctl -u valheim -f
On startup, the log should show BepInEx lines, and the /opt/valheim/serveur/BepInEx folder fills up (config, plugins, and the LogOutput.log file that keeps the mods' log). Without these lines, the server was started by the old script.
03
Add mods to the server
Each mod is downloaded from its Thunderstore page as a .zip archive. It contains an icon, a README, a manifest.json file and the mod's .dll file or files, sometimes stored in a subfolder. Only the .dll files and their companion files go on the server, in one folder per mod:
sudo systemctl stop valheim
sudo -iu valheim
unzip /tmp/Auteur-NomDuMod-*.zip -d /tmp/NomDuMod
find /tmp/NomDuMod -name "*.dll"
mkdir -p /opt/valheim/serveur/BepInEx/plugins/NomDuMod
cp /tmp/NomDuMod/NomDuMod.dll /opt/valheim/serveur/BepInEx/plugins/NomDuMod/
exit
sudo systemctl start valheim
- Dependencies: the Thunderstore page lists the required mods, for example Jötunn, a library used by many mods. Install them on the server too, the same way.
- Configuration: on first start, most mods create a
.cfg file in BepInEx/config. Edit it with the server stopped. Some mods then enforce the server's settings on players who connect.
- One mod at a time: restart and read
BepInEx/LogOutput.log after each addition. A loading error there almost always names the mod at fault.
To remove a mod, stop the server and delete its folder in plugins. Careful: the items and buildings it added may disappear from the world. The server's ports do not change with mods (see game server ports).
04
Player side: r2modman or Thunderstore Mod Manager
Installing mods by hand on each player's computer invites mistakes. Mod managers take care of it:
- r2modman, a free and open-source program;
- Thunderstore Mod Manager, the version distributed by Thunderstore.
Both work the same way: you choose Valheim, create a profile (a list of mods), install BepInExPack_Valheim and the mods you want into it, and the manager adds the dependencies on its own. The game is then launched from the manager, with the modded launch button; launched normally from Steam, it starts without mods.
Give everyone the same list. Prepare the profile yourself, export it as a code from the manager, and share that code: each player imports it and gets the same mods, at the same versions. For a larger community, you can publish a modpack on Thunderstore, a package that only contains the list of mods and their versions.
The common trap: a player accepts an update to a mod that the server does not have yet. Ask your players to update their mods only after your announcement, once the server is up to date.
05
When a Valheim update breaks mods
Steam updates players' games automatically, and an outdated server refuses up-to-date players. Yet a Valheim update can make mods incompatible, and sometimes BepInExPack_Valheim itself, until their authors fix them. The steps to follow:
- Stop the server and back up the world, as above.
- Check on Thunderstore whether your mods have been updated since the patch came out (update date and comments).
- Update the server with SteamCMD:
sudo -iu valheim /usr/games/steamcmd +force_install_dir /opt/valheim/serveur +login anonymous +app_update 896660 validate +quit
- Replace the
.dll files of updated mods on the server, then update the players' profile and share the new code.
- Restart and read
BepInEx/LogOutput.log.
If an important mod has not caught up, you have two options: wait before reopening the server, or remove it and accept losing what it added. A mod abandoned for a long time should be replaced. Keep several dated backups: a world saved by a recent version of the game may no longer load with an older one.
06
On CloudFive
CloudFive has no ready-made Valheim plan: the server is installed on a VPS, as in this guide. The Ryzen VPS, from €5.99 per month, is well suited:
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage: a fast core matters for Valheim, and mods add load;
- root access, a dedicated IPv4 address and basic anti-DDoS protection included. The game-specific filter is part of Premium Protection, a paid option (see protecting a game server from DDoS);
- snapshots from the customer area, handy right before adding mods or updating the game.
Servers are in France, on our own network, monthly with no commitment, with French-speaking support 7 days a week. To choose the VPS size, see which VPS for a game server and the gaming VPS page; to secure it before opening the server, securing a Linux VPS.
07
Frequently asked questions
How do I install mods on a Valheim server?
Install Thunderstore's BepInExPack_Valheim in the server folder, start the server with start_server_bepinex.sh, then drop the mods' .dll files into BepInEx/plugins. Install their dependencies too, and restart after each addition.
Do players need to install the Valheim server's mods?
Yes for most of them: any mod that adds items or buildings or changes the rules must be installed on each player's computer, at the same version as on the server. Only a few administration mods run on the server side only. Each mod's Thunderstore page says so.
How do I give all Valheim players the same mods?
Prepare a profile in r2modman or Thunderstore Mod Manager, export it as a code and share that code: each player imports it and gets the same mods at the same versions. The game is then launched from the manager.
Why do my Valheim mods stop working after an update?
A game update can make mods incompatible until their authors fix them, and sometimes BepInEx itself. Back up the world, wait for the new versions on Thunderstore, then update the server and the players at the same time.
Can I host a modded Valheim server with CloudFive?
Yes, on a VPS: CloudFive has no ready-made Valheim plan, but the Ryzen 9 9950X VPS gives root access to install the server and BepInEx. It is hosted in France, with basic anti-DDoS protection included.