Confirm with your password

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.

Client & Server Valheim 1.0

Β· πŸ’— Donate

Stars
0
Downloads
77
Version
2.1.0
Updated
Author
TaegukGaming
Virus scan
βœ“ Scan successful
Runs on
Client & Server
Required by
4 mods

Compatibility

Required 2

Install these too β€” Gale pulls them in for you.

Description

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 / spawn and 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 nocost builds. 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 no adminlist.txt needed. Moderators get only the commands you list in settings.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 progress lets 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, SledgeCheat by 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

  1. Install this mod on your dedicated server.
  2. Install this same mod on every player's machine (add it to your modpack).
  3. Launch the server. It writes BepInEx/config/ServerGuard/conf/settings.yaml with a random sharedSecret.
  4. Copy that sharedSecret value. Each player pastes it into their BepInEx/config/ServerGuard/client.yaml.
  5. Add your modpack to BepInEx/config/ServerGuard/conf/allowed_mods.yaml. The mod generates a ready-to-paste snippet at mods_for_allowed_mods.yaml on each player's PC after they run Valheim once.
  6. Put your own SteamID in conf/owners.yaml β€” that gives you every dev command in-game. Staff go in conf/moderators.yaml and get the moderatorDevcommands list.

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:

🏰 Hearthbound Valheim 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.

Changelog

2.1.0 Latest

Personal boss progression. On by default β€” read the first bullet before updating a running server.

New

  • Boss progress is personal to each character. Vanilla keeps boss kills as world keys: one player beats Eikthyr and every player β€” including one who joined five minutes ago β€” gets Haldor's and Hildir's later stock, the harder spawns and the later raids. ServerGuard now keeps progress per character (SteamID + character name) in conf/progress.yaml, and each player's game only ever receives the progress their own character has earned. World modifiers (no map, damage rates, ...) stay shared.
    • Who earns a boss: every player who damaged it and was within 50 m when it died (progressionRequireDamage, progressionCreditRadius). The same goes for the troll, surtling and bat keys that unlock raids, except that a creature killed in one hit falls back to "within 50 m". Hildir's quest rewards go to the player who handed in the chest.
    • Raids follow each player's own progress: the Player based raids world modifier is switched on (progressionForcePlayerRaids) and ServerGuard makes sure every raid β€” not only the ones vanilla already handles per player β€” checks the targeted player's progress. Switching the feature off switches the modifier back off if ServerGuard was the one that turned it on.
    • Existing characters keep their progress. The first time each already-registered character logs in, ServerGuard imports the boss kills their character file records (vanilla gives those to everyone near a kill), limited to bosses this world has actually seen (progressionSeedFromCharacters). New characters, and characters brought over from single-player, start from scratch; progress the server never granted is removed from the character and reported to the admin channel.
    • Personal start temple. The boss altars show only the trophies the viewing character offered. Offering a trophy lights the altar for that character alone, a forsaken power can only be chosen from an altar you filled yourself, and a trophy only takes hold once you have defeated that boss yourself (enablePersonalTemple, personalAltarsRequireKill). A power chosen from someone else's trophy is cleared on login. Trophies already sitting on the shared altars are hidden, not destroyed β€” switching the feature off shows them again.
  • sg progress β€” sg progress <player> shows a character's progress and altars; grant / revoke <player> <boss|key|all>, altar <player> <boss> [on|off] and reset <player> change it, and the player's game updates immediately. <player> is a character name, a SteamID, or steamid:name. Changes are posted to the admin channel. sg status has a new Progress line.
  • Discord: a first-time boss kill is announced in the public channel ("Alice and Bob defeated The Elder for the first time!", staff left out as usual). The admin channel gets every credit with the players involved and anyone who was nearby without damaging the boss, one-time imports, and players arriving with progress the server never granted (progressionDiscordPosts).
  • A ledger belongs to one world. Start a new world and the old progress.yaml is archived as progress.<worldid>.yaml.bak and a fresh one begins.
  • If progress.yaml cannot be read, the feature switches itself off (shared vanilla progress) and nothing is written until the file is fixed β€” a bad hand edit can't wipe everyone's progress.
  • The new settings are appended to an existing settings.yaml on first boot. progressionKeys decides which keys count as progress (default: every defeated_* boss, killedtroll, killed_surtling, killedbat, and Hildir's hildir* quests).

Upgrade note

  • Players must update too β€” the altars, raid checks and character-file sync run on each player's game. As always, keep the server and your modpack on the same version.
  • The feature is on by default. Set enablePersonalProgression: false in settings.yaml before starting 2.1.0 if you want to keep shared vanilla progress.
2.0.2

New

  • sg unregister <steamid> [character]. Forgets one registered character name, or every name for that SteamID when no character is given, so the player can register fresh ones. Use it with sg pardon and sg unban to fully reset someone who tripped the character limit.

Fixed

  • registrations.yaml and violations.yaml are now hot-reloaded, like the rest of conf/. They used to be read once at boot, so edits made while the server was running were ignored and then overwritten by the next strike or registration. In practice this meant sg unban on a player over characterLimit did not stick: the server still held their old names and strikes in memory and re-banned them on the next login. sg reload now re-reads these two files too, and sg help describes it accurately.
2.0.1

New

  • Cheat-check bypass key. The console command yesiuseddevcommandsbutiwantmyachievementsanyway sets a key on the character after which Valheim marks nothing that character does as cheated β€” items spawned in single-player then arrive on your server unmarked, and cheat-taint detection cannot see them. ServerGuard already reported the key once per session; a new setting, cheatTaintBypassPolicy, decides what happens next: log (the default) keeps the admin-channel post, kick also disconnects the player with a message explaining why, until they log in with a character that has never run the command. No strike, nothing is written to their character, owners are exempt. The setting is appended to an existing settings.yaml on first boot, with comments; sg status shows it on the CheatTaint line.

9 older entries, full version history & downloads β†’

Files

5 files Β· 222 KB download

Loading files…

Manual download
Just this mod One .zip β€” Valheim ServerGuard 2.1.0
Files you'll get 3

Your browser may ask permission to download several files at once. How to install these manually

Manual installation instructions
1

Install BepInExPack Valheim

BepInExPack Valheim is required to run mods in Valheim.

Download BepInExPack Valheim 5.4.2360 Β· View mod page

Check out the mod page for detailed installation instructions.

2

Install Valheim ServerGuard

This mod must be installed on both the client and the server.

Download Valheim ServerGuard 2.1.0

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.