Valheim ServerGuard
Anti-cheat, mod allowlist, staff dev commands and admin tools for Valheim. One mod for both server and client: locks players to your modpack, gives owners/moderators dev commands, personal boss progression, Discord logging, raid alerts, build forensics.Valheim ServerGuard
A single mod that handles the messy parts of running a dedicated Valheim server with a curated modpack: mod allowlist, anti-cheat, dev commands for staff, moderation tools, Discord integration, and forensic logging — all configurable from YAML.
Install this same mod on the dedicated server and on every player's game. It detects which side it is on. (Since 2.0 there is no separate client package — if you still have Valheim_ServerGuard_Client installed, remove it.)
What it does (in plain English)
- Locks your server to a specific modpack. Players running the wrong mods are kicked at the door.
- Blocks common cheats.
devcommands/god/fly/spawnand other console cheats are silently neutered for players. Emote attack-cancel exploit is blocked. Suspicious movement speed and skill levels are flagged. - Sees what the game marks as cheated. Valheim 1.0 flags spawned items, things crafted from them and
nocostbuilds. Players carrying flagged gear — including gear spawned in single-player — are reported to your admin channel, optionally stripped. - Gives your staff dev commands. Owners get every dev command on the dedicated server, exactly as in single-player (
devcommands,fly,god,spawn,goto,skiptime, world modifiers, ...) with noadminlist.txtneeded. Moderators get only the commands you list insettings.yaml. Everything run server-side is logged to your admin Discord channel. - Makes boss progress personal. Vanilla shares every boss kill with the whole world, so a new player walks into traders, spawns and raids tuned for the server's veterans. ServerGuard gives each character their own progress: only the players who fought a boss earn it, each player's game only sees what their own character has earned, and the start-temple altars show only the trophies that character offered. Existing characters keep the kills their character file already records. On by default;
sg progresslets staff inspect and adjust anyone. - Sends events to Discord. Public channel for player events (joined / kicked / died / shouts / raid alerts). Optional admin channel for moderation events (violations / config reloads / daily summary).
- Announces raids by their real name. Random-event raids are posted to Discord using the in-game event name (e.g. "The Horde Is Attacking") with coordinates, plus pause/resume/end updates.
- Strips cheat items on login. Configured items (
SwordCheat,SledgeCheatby default) are removed from non-admin players' inventories when they join. - Can force everyone onto the map. Optionally override each player's "public position" toggle so all players are permanently visible on each other's maps. Enforced server-side; admins can be exempted.
- Can mute the "I have arrived!" shout. Optional — useful when the server already posts login notifications.
- Provides admin commands in the game console. Open the F5 console, type
sg help. Kick, pardon, query the build log, hot-reload config — without leaving the game. - Records build / destroy events to CSV. Useful when investigating grief reports.
Quick setup
- Install this mod on your dedicated server.
- Install this same mod on every player's machine (add it to your modpack).
- Launch the server. It writes
BepInEx/config/ServerGuard/conf/settings.yamlwith a randomsharedSecret. - Copy that
sharedSecretvalue. Each player pastes it into theirBepInEx/config/ServerGuard/client.yaml. - Add your modpack to
BepInEx/config/ServerGuard/conf/allowed_mods.yaml. The mod generates a ready-to-paste snippet atmods_for_allowed_mods.yamlon each player's PC after they run Valheim once. - Put your own SteamID in
conf/owners.yaml— that gives you every dev command in-game. Staff go inconf/moderators.yamland get themoderatorDevcommandslist.
That's the minimum. Everything else is optional.
Documentation
For full configuration, admin commands, and feature details see the GitHub Wiki.
Try it out
This mod was built for the TaegukGaming community server running the Hearthbound modpack. If you want to see it in action, check out the modpack:
Disclaimer
This mod is created using AI. No other mods were copied during the process. All feature ideas come from the uploader and are mainly to cater the needs of the TaegukGaming community server. If any features or ideas look similar to other mods, these are not intentional.
This mod is free to use as is. Voluntary support is appreciated.
Version: 2.1.0
Source / issues / wiki: https://github.com/yesu0725/Valheim-ServerGuard
Required on every client: this same mod. The old Valheim_ServerGuard_Client package is retired.


