# Idle shutdown: why paying for empty servers is waste

> A game server with zero players still consumes machine time. Shutting it down after a short grace period, after saving its state, removes that waste. It only works safely if the server reports its player count honestly and can save and restart.

*NetCraftGames (NCG) by Charging Bull Software. Last updated: 2026-10-03. Canonical page: https://netcraftgames.com/guides/idle-shutdown-empty-servers/*

## The short answer

Most indie multiplayer games are empty most of the day. A server left running 24 hours a day for a 30-day month uses 720 server hours. If your players are online for three hours a day, only 90 of those hours do anything. The other 630 are an empty room with the lights on. Idle shutdown stops the machine when nobody is playing and starts it again when someone wants to.

## The arithmetic

| Pattern (one standard server, 30-day month) | Server hours used |
| --- | ---: |
| Always on | 720 |
| On during a 6-hour evening window only | 180 |
| Players present about 3 hours a day | 90 |
| Weekend test sessions, 8 hours on two days a week | about 64 |

NetCraftGames plans include 40, 80 and 120 standard hours a month. That is deliberate: it only makes sense if empty servers are not left running, which is why [pricing](https://netcraftgames.com/pricing/) states there is no unlimited always-on offer.

## What safe idle shutdown requires

1. **A real player count.** The server must report how many players are connected, for example as bounded JSON from a loopback endpoint such as `/players` returning `{ "players": 2 }`. If the count is unknown or stale, the idle clock resets rather than guesses.
2. **A grace period.** NetCraftGames waits for ten continuous minutes of zero players before acting, so a brief gap between matches does not tear down a server.
3. **Save before stop.** A graceful stop sends a termination signal, waits for your configured grace seconds, uploads a snapshot, and verifies the stored copy before the machine is destroyed. If the save fails, the machine is held for protection and the incident is visible.
4. **Fast, safe restart.** Your server must start cleanly from its saved state. Test it by stopping and starting it ten times.

## What to implement in your server

- Count connections after authentication, not raw sockets.
- Handle `SIGTERM`: stop accepting players, flush saves under your save path, then exit with code 0.
- Write state under one folder (`/game/saves` in the example manifests).
- Start fast: open the port first, load heavy content after.

## What idle shutdown does not do

- It does not protect you if your server reports zero players while people are connected. Test the endpoint with real clients.
- It does not replace sleeping a server explicitly. Servers that cannot report player counts must be put to sleep from the dashboard.
- It is not an anti-abuse tool. Someone holding a connection open keeps the server awake.

## Frequently asked questions


### How long does idle shutdown wait?

NetCraftGames waits for ten continuous minutes of zero reported players before it begins a graceful stop. If the player count is unknown or stale, the idle clock resets instead of assuming the server is empty. After the grace period the server is signalled to stop, saved, verified and then terminated.

### Does shutting a server down lose my game's data?

It should not. Shutdown first stops the game, then uploads a snapshot of your declared save path, and the controller hashes the stored bytes before destroying the machine. If the save or drain fails, the machine is kept in a visible protection hold instead of being deleted. Test restart from saves before launch.

## Related pages

- [Pricing built on honest server hours](https://netcraftgames.com/pricing/): NetCraftGames plans are $49, $79 and $99 a month for weighted server hours, with a $19 boost. What an hour buys, what expires and what is not included.
- [How to host a multiplayer game server cheaply](https://netcraftgames.com/guides/host-multiplayer-game-server-cheaply/): Honest ways to host a multiplayer game server cheaply: stop idle hours, right-size, mind egress, use free tiers and decide when managed hosting is worth it.
- [Hosting a Unity Netcode for GameObjects server](https://netcraftgames.com/engines/unity-netcode-for-gameobjects/): Host a Unity Netcode for GameObjects (NGO) dedicated server on NetCraftGames: Linux Server build, Unity Transport UDP, listen address, probes and honest gaps.
