docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

Add AutoStopper to the Related Projects page

Open Criseda opened this issue 3 months ago • 4 comments

Enhancement Type

Improve an existing feature

Describe the enhancement

Hello! I maintain AutoStopper (https://github.com/Criseda/AutoStopper), a Velocity plugin that manages Docker lifecycle for backend servers on a proxy network. I'd like to propose adding it to the Related Projects page (docs/misc/related-projects.md) and would be happy to open the docs PR if it's something you'd consider.

I'm aware of ENABLE_AUTOSTOP, that feature stops a container after an idle timeout and requires manual restart afterwards. AutoStopper runs on the proxy and provides the full sleep/wake cycle for proxy-routed backends. It stops mapped containers when empty and starts them again when a player connects, waiting on a real readiness signal before handoff. It manages several backends from one config and detects idleness from actual Velocity sessions rather than the backend's own connection state. So it's a complement for multi-server Velocity setups rather than a replacement.

Proposed entry, matching the existing format:

 [AutoStopper](https://github.com/Criseda/AutoStopper)

A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.

Happy to adjust wording or drop this if it doesn't fit. Thanks you for considering!

Criseda avatar Aug 13 '26 18:08 Criseda

That would be a great addition to the docs. Go ahead and submit a PR for that.

Side note: I haven't really been a huge fan of the in-container auto-stop. Instead I have been focusing on the discovery and scaling parts of mc-router such as the docker variant

https://github.com/itzg/mc-router#docker-auto-scale-updown

So, doing scaling from the Velocity side aligns very nicely with that philosophy. Speaking of which, the labels are "mc-router" prefixed but perhaps we could come up with a unified naming scheme and containers can declare either.

itzg avatar Aug 13 '26 19:08 itzg

Thanks, I'll set up the PR and submit it.

In regards to the labels: I'm completely open to AutoStopper reading mappings from container labels as an alternative to the user writing them in autostopper/config.yml, whether that's mc-router.host, mc.*, or whatever shared scheme you think works fine.

There are two things I'd appreciate your take on though:

  1. Coexistence: if mc-router runs with -auto-scale-up/-auto-scale-down and AutoStopper manages the same containers, we have a race on stop/starts. Either I can have AutoStopper skip containers that carry mc-router's scale labels, or (if we agree on some shared label scheme) we declare per-container ownership explicitly, e.g. an owner key (mc-router | autostopper | none), so no tool guesses. Simplest case though, in a Velocity network, mc-router runs without the scale flags, but that's the operator's choice.
  2. Naming: you mean the prefix? Renaming mc-router would break every existing docker-compose out there, so the easy route is AutoStopper just reads the mc-router.* keys as-is and the "unified naming scheme" becomes a short doc of which keys are shared. If you'd rather have a more neutral prefix, e.g. mc.*, it's completely your call, your base 😊

Criseda avatar Aug 13 '26 21:08 Criseda

PR submitted: https://github.com/itzg/docker-minecraft-server/pull/4231

Criseda avatar Aug 13 '26 21:08 Criseda

Correct, referring to the prefix.

  1. Good point and question. IMHO it doesn't make sense for a user to be using both at the same time, so perhaps I'm overthinking the "shared label" concept 😄 . The idea of skipping ones with those annotations is interesting though, if a user is using both mc-router and AutoStopepr, then that can be their way to designate the management per container.
  2. Like you mentioned, breaking compatibility with existing deployments is no-go. So, I was thinking mc-router could look for both styles of labels, say mc-router.host and mc.host.

So all in all, the labels are fine as they are since the user can enable the scaler solution for that particular cluster.

itzg avatar Aug 14 '26 01:08 itzg