Game servers accumulate memory usage, entity data and temporary state over time. A periodic restart clears this buildup, prevents crashes and keeps performance consistent. The trick is restarting at the right time with proper warnings.
Why restart?
- Memory leaks: Palworld, Minecraft with many plugins, and FiveM with heavy scripts all leak memory over hours. A restart resets usage to baseline.
- Cleanup: dropped items, expired entities and cached data are purged on restart.
- Updates: some games only apply updates on restart (mods, plugins, configuration changes).
Method 1: panel schedules (recommended)
The HostValues game panel has a built-in scheduler:
- Go to the Schedules tab.
- Create a new schedule with a cron expression:
0 */6 * * *= every 6 hours.0 4 * * *= daily at 4:00 AM.0 */12 * * *= every 12 hours.
- Add tasks in order:
- Send a console command warning players (e.g.,
say Server restart in 5 minutes). - Wait 5 minutes (300 seconds delay).
- Send another warning (
say Server restart in 60 seconds). - Wait 60 seconds.
- Power action: Restart.
- Send a console command warning players (e.g.,
Method 2: cron + RCON on a VPS
If you run a server on a VPS without a panel, use mcrcon (Minecraft) or the equivalent RCON tool:
# /etc/crontab entry 55 3 * * * root mcrcon -H 127.0.0.1 -P 25575 -p yourpassword "say Server restart in 5 minutes" 0 4 * * * root systemctl restart minecraft
Optimal restart intervals
| Game | Recommended | Why |
|---|---|---|
| Minecraft | 12 to 24 hours | Stable; restart mainly for cleanup |
| FiveM | 6 to 12 hours | Script memory leaks accumulate |
| Palworld | 6 to 12 hours | Known memory leak issues |
| Rust | 24 hours (with save) | Stable but benefits from daily cleanup |
| ARK | 12 hours | Dino AI and base rendering accumulate |
Should I restart during peak hours?
No. Schedule restarts during off-peak hours (typically 3 to 6 AM in your players' timezone). A restart during a raid in Rust or a boss fight in Palworld will upset players.
Does a restart lose player data?
No. Game servers auto-save before shutdown. The world, player inventories and configurations are preserved. Only data since the last auto-save (typically 5 to 15 minutes) is at risk during a hard crash, but a clean restart saves first.
Scheduled restarts are built into the panel at HostValues.