You are viewing a potentially older version of this package. View all versions.
TaegukGaming-Valheim_ServerGuard-1.6.0 icon

Valheim ServerGuard

Anti-cheat + mod allowlist + admin tools for Valheim dedicated servers. Locks players to your modpack and provides Discord logging, raid alerts, build forensics, and console admin commands.

Date uploaded 4 days ago
Version 1.6.0
Download link TaegukGaming-Valheim_ServerGuard-1.6.0.zip
Downloads 24
Dependency string TaegukGaming-Valheim_ServerGuard-1.6.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333
ValheimModding-YamlDotNet-16.3.1 icon
ValheimModding-YamlDotNet

Shared version 16.3.0 of YamlDotNet from Antoine Aubry and contributors, net47 package for use in Valheim mods. Maintained by the ValheimModding team.

Preferred version: 16.3.1
ValheimModding-JsonDotNET-13.0.4 icon
ValheimModding-JsonDotNET

Shared version 13.0.3 of Json.NET from Newtonsoft, net45 package for use in Valheim mods. Maintained by the ValheimModding team.

Preferred version: 13.0.4

README

Valheim ServerGuard

A single mod that handles the messy parts of running a dedicated Valheim server with a curated modpack: mod allowlist, anti-cheat, moderation tools, Discord integration, and forensic logging — all configurable from YAML.

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. Emote attack-cancel exploit is blocked. Suspicious movement speed and skill levels are flagged.
  • 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.
  • 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 Valheim_ServerGuard_Client on every player's machine.
  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 companion plugin generates a ready-to-paste snippet at mods_for_allowed_mods.yaml after a player runs Valheim once.

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: 1.6.0 Source / issues / wiki: https://github.com/yesu0725/Valheim-ServerGuard Companion (required on every client): TaegukGaming-Valheim_ServerGuard_Client

CHANGELOG

Changelog

1.6.0

Social/QoL feature drop on top of the 1.4.0 anti-cheat + admin toolkit (everything from 1.4.0 is still here).

New

  • Raid event alerts. When a random event / raid begins, pauses (no players in the area), resumes, or ends, ServerGuard posts to the public Discord channel using the actual in-game event name (e.g. "The Horde Is Attacking", "You Are Being Hunted") instead of the internal code name, with world coordinates.
  • Player shout logging. Player shouts (/s) are forwarded by the companion and posted to the public Discord channel (chat can no longer be observed server-side, so the companion reports them).
  • Cheat-item removal. On login, non-admin players have configured cheat items stripped from their inventory (SwordCheat, SledgeCheat by default). Configure via enableCheatItemRemoval and cheatItems in settings.yaml; admins are exempt.

Companion

  • Requires companion plugin v1.6.0 (adds the optional title-screen Quick Login panel — see the client changelog).

1.4.0

Big feature drop — anti-cheat, admin tools, and Discord cleanup.

New: anti-cheat

  • Devcommands gate. Players can't type devcommands, god, fly, spawn, etc. on your server. Vanilla cheat commands are blocked client-side and reported to you.
  • Animation-cancel gate. Blocks the classic emote / sheathe attack-cancel exploit (used to spam secondary attacks faster than vanilla allows).
  • Movement-speed sanity check. Flags players moving impossibly fast across the ground.
  • Inventory validation. Flags unknown items and over-sized stacks server-side.
  • Skill-level cap. Catches players with skill levels above the cap (default 100 + tolerance).

New: forensic tools

  • Build/destroy heatmap. Every piece place / destroy is logged to a daily CSV with attribution, including creature destroys (Troll smashes your base = logged as "Troll").
  • Death log. When a player dies, an entry is posted to your public Discord with the cause (creature name, PvP killer with SteamID, or environmental cause like "drowned"/"fell").
  • Modset fingerprint. Each server publishes a short hash (e.g. 8ce8906e) that uniquely identifies its modpack — players can verify they're connecting with the matching pack.

New: admin console commands

Press F5 to open the console, then type sg help. You'll get a moderation toolkit without leaving the game:

  • sg status, sg reload, sg modset, sg selftest
  • sg whois <name>, sg violations, sg pardon, sg kick
  • sg build at <x> <z> / by <name> / today — query the heatmap
  • sg destroyed at|by|today and sg placed at|by|today — filter to destroys or placements only

Discord channel split

  • Public channel = community-friendly events only: joined, left, kicked, died. Safe to share with all players.
  • Admin channel (new) = curated moderation events: violations, config reloads, admin command audit, daily summary. Set discordWebhookUrlAdmin in settings.yaml.
  • Admins are hidden from the public channel. Their join/leave/death events go to the admin channel only.
  • Daily summary posts a one-paragraph digest each UTC midnight (joins, leaves, kicks, bans, top kick reasons).

New: ping / latency log

Optional admin-only feature: posts each player's first ping after join and their session-average on disconnect. Helps spot VPN / proxy users. Default off.

Other improvements

  • Self-test on boot. Smoke-tests config (HMAC, webhook URLs, file permissions). Alerts the admin channel on any failure.
  • Player death cause messages. Now show creature names, killer SteamID for PvP, or environmental cause (burned / drowned / fell / etc.).
  • Per-rule "counts as violation" toggle so you can tune which rules can lead to auto-ban vs which are just informational.
  • Hot-reload of all config files — edit settings.yaml / admins.yaml / allowed_mods.yaml and the server picks it up within a second.
  • Mod-set fingerprint mismatch detection. When a player connects with the right mods but different versions, the admin channel notes it.

Bug fixes

  • Admin connection event now shows up properly.
  • Hammer-removed pieces now log correctly with attribution.
  • Build positions now record the real world coords (not the prefab origin).
  • Several Mono compatibility fixes for current Valheim builds.

1.3.0

Initial public release. Mod allowlist with HMAC-signed attestation, per-peer auto-ban for repeat violations, hot-reload of configs, Discord webhook integration.