Skip to content

Installation

JonathanLA edited this page Nov 11, 2026 · 1 revision

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_Client package is retired. Remove it from every player's profile / modpack and install Valheim_ServerGuard there instead. Nothing else changes: client.yaml, the server's conf/ files and the sharedSecret all carry over. An allowed_mods.yaml that still lists the old client GUID keeps working (the server logs a reminder to update it).

Server side (dedicated server only)

  1. Make sure BepInEx is already installed on the dedicated server (denikson-BepInExPack_Valheim).
  2. Install TaegukGaming-Valheim_ServerGuard through your usual workflow:
    • Manual: drop Valheim-ServerGuard.dll into BepInEx/plugins/, and install its two library packages, ValheimModding-YamlDotNet and ValheimModding-JsonDotNET, into BepInEx/plugins/ too. Without them ServerGuard does not start: no config files appear, and the log says NOT STARTED: required library missing.
    • Manager: install the Thunderstore package onto the server profile.
  3. Start the server. First boot creates:
    • BepInEx/config/ServerGuard/conf/settings.yaml — main config, with a freshly-generated sharedSecret.
    • BepInEx/config/ServerGuard/conf/moderators.yaml and owners.yaml — both empty. Add your SteamID to owners.yaml (see Privilege Tiers).
    • BepInEx/config/ServerGuard/conf/allowed_mods.yaml — empty allowlist. You'll populate this in step 5.
  4. Note the sharedSecret value printed in the server log on the first start:
    [Info] [ServerGuard] sharedSecret in use (copy to every client.yaml): yFJC+nCWfJdTAfCqlfNRluR0CAlzhRXdGhcFJPEEd38=
    
    You'll give this to every player. Treat it like a password — change it (and update all clients) if it leaks.
  5. Build your allowlist — see Allowed Mods and Modset Fingerprint.

Client side (every player)

  1. 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.
  2. Launch Valheim once to the main menu, then close. ServerGuard creates BepInEx/config/ServerGuard/client.yaml.
  3. Open client.yaml. Paste in the sharedSecret your server host gave you:
    sharedSecret: "<the value from the server's settings.yaml>"
  4. Save. Restart Valheim. Done — the next time you connect to the ServerGuard server, the handshake happens automatically.

Self-test

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.

Updating

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.

Clone this wiki locally