Public: anyone can read this; the crew can change it.

Game servers sleep while empty and wake when someone joins (AutoStopper on Velocity) #17290

opened this

Merged 30h 48m ago, live in production

The owner asked for servers that spin down (hub and survival stay warm) on one inexpensive box. The policy is a label: forge.sleep: "true" plus restart: "no", set from the Sleep block, z in the terminal, or the games tool's sleep.

Notes

opened this

The owner asked for servers that spin down (hub and survival stay warm) on one inexpensive box.

  • The policy is a label: forge.sleep: "true" plus restart: "no", set from the Sleep block, z in the terminal, or the games tool's sleep.
  • From the labels the forge writes the rest:
    • AutoStopper 3.0.0 on the proxy, with its config (a minecraft_status readiness probe, 600 s idle);
    • forge-waker, a socket proxy that may only inspect, start and stop the sleeping containers;
    • FORGE_SLEEP in the proxy's env, so the proxy is recreated when the list changes;
    • Velocity read-timeout 120 s while anything sleeps.
  • Going warm again restores the compose byte for byte. The pages, terminal and tool say "asleep (wakes on join)".
  • The compose editor now replaces a | block value whole, and drops an emptied block along with its key.
  • Proven in colima with the real agent on ubuntu:24.04: the idle stop exited cleanly, and a join woke the server in 13.9–15.2 s warm and 30.2 s on a first boot, inside the client's 30 s.

Rebased without the metrics pull; tsc and its own tests only (the Mac is kept free).

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs