Repository navigation
Installation
ServerGuard is one mod installed in two places: on the dedicated server and on every player's game. The same Valheim_ServerGuard package, the same DLL — it detects which side it is on when it loads.
Upgrading from 1.x? The separate
Valheim_ServerGuard_Clientpackage is retired. Remove it from every player's profile / modpack and installValheim_ServerGuardthere instead. Nothing else changes:client.yaml, the server'sconf/files and thesharedSecretall carry over. Anallowed_mods.yamlthat still lists the old client GUID keeps working (the server logs a reminder to update it).
- Make sure BepInEx is already installed on the dedicated server (
denikson-BepInExPack_Valheim). - Install TaegukGaming-Valheim_ServerGuard through your usual workflow:
- Manual: drop
Valheim-ServerGuard.dllintoBepInEx/plugins/, and install its two library packages, ValheimModding-YamlDotNet and ValheimModding-JsonDotNET, intoBepInEx/plugins/too. Without them ServerGuard does not start: no config files appear, and the log saysNOT STARTED: required library missing. - Manager: install the Thunderstore package onto the server profile.
- Manual: drop
- Start the server. First boot creates:
-
BepInEx/config/ServerGuard/conf/settings.yaml— main config, with a freshly-generatedsharedSecret. -
BepInEx/config/ServerGuard/conf/moderators.yamlandowners.yaml— both empty. Add your SteamID toowners.yaml(see Privilege Tiers). -
BepInEx/config/ServerGuard/conf/allowed_mods.yaml— empty allowlist. You'll populate this in step 5.
-
- Note the
sharedSecretvalue printed in the server log on the first start:You'll give this to every player. Treat it like a password — change it (and update all clients) if it leaks.[Info] [ServerGuard] sharedSecret in use (copy to every client.yaml): yFJC+nCWfJdTAfCqlfNRluR0CAlzhRXdGhcFJPEEd38= - Build your allowlist — see Allowed Mods and Modset Fingerprint.
- Install TaegukGaming-Valheim_ServerGuard — the same package as the server — via your mod manager (r2modman / Gale / Thunderstore Mod Manager), or add it to your modpack.
- Launch Valheim once to the main menu, then close. ServerGuard creates
BepInEx/config/ServerGuard/client.yaml. - Open
client.yaml. Paste in thesharedSecretyour server host gave you:sharedSecret: "<the value from the server's settings.yaml>"
- Save. Restart Valheim. Done — the next time you connect to the ServerGuard server, the handshake happens automatically.
After boot, the server runs a smoke test. If it passes silently, you're good. If it posts to your admin Discord, follow the listed fix. You can re-run on demand with sg selftest from the F5 console.
Update the server and the players' modpack to the same version in the same session. The version is checked at the handshake through the mod allowlist: if required_mods pins ServerGuard's hash, a player on a different build is refused until they update.