Automated Linux Game Server
Overview
This project started with a simple goal: host game servers for friends while automating as much of the management as possible. The solution was a dedicated computer configured as a headless Ubuntu server, plus a suite of automation scripts to handle routine tasks.
The server currently runs 4+ concurrent Minecraft servers (the highest demand use case so far) with automatic memory allocation per game server to avoid resource contention. Every operational task (startup, nightly reboots, security updates, and backups/retention) is automated. Nothing requires manual intervention for day-to-day operation.
The backup system runs hourly and implements a custom retention policy that keeps recent backups granularly (every hour for the past day, daily for the past week, weekly beyond that) while pruning older data to manage disk space. The whole setup has been running reliably, but when the occasional hiccup occurs, notification pings are sent through Discord.
Technical Highlights
Headless Ubuntu Server Configuration
Configured a physical machine as a headless Ubuntu server: no GUI, SSH-only access, with restricted security settings and a minimal footprint to maximize resources available for game server processes.
Automated Startup & Memory Allocation
Game servers start automatically on boot via systemd services with explicitly configured memory limits, preventing any one server from starving the others during peak load.
Hourly Backups with Custom Retention Policy
A Bash backup script runs every hour via cron, implementing a tiered retention plan: hourly backups for 24 hours, daily for 7 days, weekly beyond that, balancing recovery granularity against disk usage.
Automated Security Updates & Daily Reboots
Unattended security upgrades apply patches automatically. A scheduled daily reboot clears memory leaks and applies kernel updates without any manual intervention required.