Skip to content

MadBee71/WGS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

166 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Windows Game Server

Windows Game Server

Single-window management panel for Windows game servers

Version .NET Platform License Games Build


What is Windows Game Server?

Windows Game Server (WGS) is a free, open-source desktop application that lets you host and manage dedicated game servers on any Windows PC โ€” without touching the command line.

Instead of juggling SteamCMD scripts, batch files, Task Scheduler entries and manual firewall rules, WGS brings everything into one clean window:

  • Install any supported game server in one click โ€” SteamCMD is downloaded and run automatically in the background
  • Start, stop and restart servers with a single button โ€” or let WGS do it automatically after a crash, with smart crash-loop detection
  • Monitor CPU and RAM usage per server in real time, with history graphs and a global system dashboard
  • Schedule automatic restarts, updates and backups at any time of day or week
  • Back up world saves and configs automatically before every update, with configurable retention
  • Send console commands directly from the UI โ€” no need to switch windows or open a terminal
  • Edit config files for any server directly inside WGS, without opening a file manager
  • Install Workshop mods and manage Oxide/Minecraft plugins from the same interface
  • Add any game that isn't built-in using the graphical Plugin Creator โ€” no coding required
  • Control servers remotely via Discord bot commands or the built-in REST API
  • Manage firewall rules automatically โ€” WGS opens and closes the right ports when servers start and stop

WGS is designed for home lab hosts, small community server admins and anyone who wants a clean, reliable way to keep game servers running on Windows without spending time on maintenance.


๐Ÿ“ท Screenshot


Important

Windows SmartScreen Warning:

Since WGS is an independent open-source tool that manages system-level tasks (Firewall, Process Priorities), Windows might show a "SmartScreen" warning. To run WGS: Right-click WindowsGameServer.exe โ†’ Properties โ†’ Check Unblock at the bottom โ†’ OK.


โœจ Features

Server management

Feature Description
๐ŸŽฎ 63+ supported games Ready-made plugins for the most popular game servers
โฌ‡๏ธ SteamCMD integration Install and update servers with one click โ€” SteamCMD downloaded automatically
๐Ÿ”„ Auto restart Automatic restart after crash, with configurable delay and crash loop detection
๐Ÿ” Auto-update Periodic SteamCMD updates on a configurable interval while the server runs
โง‰ Server cloning Duplicate any server with all settings โ€” ports assigned automatically
๐Ÿ’ค Wake-on-demand Server starts automatically when the first player connects, saving resources when idle
๐Ÿ˜ด Shut down when empty Server stops automatically after a configurable idle timeout when all players leave

Monitoring

Feature Description
๐Ÿ“Š System dashboard Global CPU, RAM and disk usage across all running servers
๐Ÿ“ˆ Per-server performance charts CPU and RAM history graphs up to 1 hour, with selectable time range
๐Ÿ‘ฅ Player statistics Session tracking and total playtime per player, stored in SQLite
๐ŸŒ Bandwidth & connections Live network in/out and active connection count per server

Automation

Feature Description
๐Ÿ—“๏ธ Task scheduler Schedule start, stop, restart, update or backup โ€” once, daily or weekly
๐Ÿ’พ Automatic backups Zip backups of world saves before updates, configurable retention policy, selective backup paths per server

Remote access

Feature Description
๐Ÿ“Ÿ RCON console Send commands to running servers via Source RCON protocol
๐Ÿค– Discord bot Control servers from any Discord channel: !start, !stop, !restart, !update, !backup, !cmd
๐ŸŒ REST API Built-in HTTP server for external integrations โ€” start/stop/status/metrics/backup/restore endpoints
๐Ÿ–ฅ๏ธ Remote machine support Manage servers running on other PCs from a single master panel

Notifications

Feature Description
๐Ÿ”” Discord webhooks Get notified on start, stop, crash and update events in Discord โ€” global or per-server webhook URL
๐Ÿ“ง Email notifications (SMTP) Receive the same alerts by email โ€” configurable per server

Configuration & mods

Feature Description
๐Ÿ“ Config editor Browse and edit any server config file directly inside WGS
๐Ÿ—‚๏ธ Steam Workshop Install and manage Workshop mods for supported games via SteamCMD
๐Ÿ“ File manager Browse, upload, download and delete server files without leaving WGS

System & extensibility

Feature Description
๐Ÿ›ก๏ธ Firewall management Windows Firewall rules opened/closed automatically on start and stop
โš™๏ธ CPU affinity, priority & RAM limit Per-server core pinning, process priority and hard RAM cap via Windows Job Objects
๐Ÿ”ง Custom Plugin Creator Graphical tool to add any game server โ€” no code required
๐Ÿ“ฆ Plugin import / export Share plugins as .cs files between machines
๐Ÿ”” System tray Runs minimised in the background with tray notifications
๐Ÿ”’ Encrypted credentials Steam login and Discord tokens encrypted with Windows DPAPI

๐ŸŽฎ Supported Games

63+ games supported out of the box โ€” including Valheim, Rust, CS2, ARK, DayZ, Palworld, Minecraft, and many more.

๐Ÿ‘‰ Full game list with search โ†’

The Custom Plugin Creator lets you add any other game server without touching code.


๐Ÿ–ฅ๏ธ Requirements

  • Windows 10 / Windows Server 2019 or newer
  • .NET 8 Runtime โ€” download here
  • SteamCMD โ€” downloaded automatically on first install
  • Administrator rights for firewall rule management

๐Ÿš€ Installation

Pre-built binary (recommended)

  1. Download the latest release from the Releases page
  2. Extract the zip to a folder of your choice
  3. Run WindowsGameServer.exe
  4. If you get a .NET error, install the .NET 8 Runtime

Build from source

git clone https://github.com/MadBee71/WGS.git
cd WindowsGameServer/WGS
dotnet publish -c Release -o publish

Requires .NET 8 SDK


๐Ÿ“ฆ Project structure

WGS/
โ”œโ”€โ”€ Games/              # Game plugins (IGamePlugin interface)
โ”‚   โ”œโ”€โ”€ GamePluginBase.cs
โ”‚   โ”œโ”€โ”€ GameRegistry.cs
โ”‚   โ”œโ”€โ”€ ValheimPlugin.cs
โ”‚   โ”œโ”€โ”€ RustPlugin.cs
โ”‚   โ””โ”€โ”€ ...             # One .cs per game
โ”œโ”€โ”€ Models/             # Data models (GameServer, ConsoleMessage...)
โ”œโ”€โ”€ Services/           # Business logic and background services
โ”œโ”€โ”€ ViewModels/         # MVVM ViewModels
โ”œโ”€โ”€ Views/              # WPF XAML views
โ””โ”€โ”€ publish/            # Published executable output

๐Ÿ”Œ Adding a custom plugin

Graphical Plugin Creator

WGS includes a built-in Plugin Creator tool:

  1. Open Tools โ†’ Plugin Creator
  2. Fill in the game details (name, Steam AppID, executable, ports...)
  3. Click Save โ€” the plugin appears in the game list immediately

You can also export any plugin to a .cs file and share it, or import one from another machine via Tools โ†’ Import Plugin.

Writing a plugin in code

Create a new file Games/MyGamePlugin.cs:

using WGS.Games;
using WGS.Models;

public class MyGamePlugin : GamePluginBase
{
    public override string GameId            => "mygame";
    public override string GameName          => "My Game";
    public override string Description       => "Short description";
    public override string Category          => "Survival";
    public override int    SteamAppId        => 123456;
    public override string Executable        => "server.exe";
    public override int    DefaultPort       => 7777;
    public override int    DefaultQueryPort  => 27015;
    public override int    DefaultMaxPlayers => 32;

    public override string BuildStartArguments(GameServer s)
        => $"-port {s.ServerPort} -queryport {s.QueryPort} -maxplayers {s.MaxPlayers}";
}

Register it in Games/GameRegistry.cs:

Register(new MyGamePlugin());

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            WPF UI (XAML)            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  MainViewModel โ”‚  ServerViewModel   โ”‚  โ† CommunityToolkit.Mvvm
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ServerManagerService               โ”‚  โ† Process lifecycle
โ”‚  SteamCmdService                    โ”‚  โ† Install / update / Workshop
โ”‚  BackupService                      โ”‚  โ† Zip backups + retention
โ”‚  FirewallService                    โ”‚  โ† netsh / Windows Firewall COM
โ”‚  RconService                        โ”‚  โ† Source RCON protocol
โ”‚  SystemMetricsService               โ”‚  โ† Global CPU / RAM / disk
โ”‚  PerformanceMonitorService          โ”‚  โ† Per-process CPU / RAM
โ”‚  PerfHistoryService                 โ”‚  โ† Time-series chart data
โ”‚  PlayerStatsService                 โ”‚  โ† Session tracking (SQLite)
โ”‚  ModManagerService                  โ”‚  โ† Oxide / Minecraft plugins
โ”‚  SteamWorkshopService               โ”‚  โ† Workshop item management
โ”‚  ConfigEditorService                โ”‚  โ† In-app config file editing
โ”‚  ScheduledTaskService               โ”‚  โ† Recurring automation tasks
โ”‚  NotificationService                โ”‚  โ† Discord webhooks
โ”‚  DiscordBotService                  โ”‚  โ† Discord bot (long-poll)
โ”‚  WebApiService                      โ”‚  โ† REST API (HttpListener)
โ”‚  ServerGroupService                 โ”‚  โ† Server grouping
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  IGamePlugin (per game)             โ”‚
โ”‚  GamePluginBase (defaults)          โ”‚
โ”‚  GameRegistry (registration)        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿค Contributing

Pull requests are welcome! For large changes, please open an issue first to discuss what you'd like to change.

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -m "Add: my new feature"
  4. Push: git push origin feature/my-new-feature
  5. Open a Pull Request

๐Ÿ“„ License

MIT License โ€” see the LICENSE file.


Support

If you find WGS useful, you can support my work here:

ko-fi

Built with .NET 8 ยท WPF ยท CommunityToolkit.Mvvm