Autoscaling (also called sleeping, scale to zero, or wake on join) is the pattern of stopping a Minecraft server when nobody is playing and starting it again when someone tries to connect. This saves resources when the server is not in use, ideal for VPS environments, home servers, or metered cloud platforms.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/itzg/docker-minecraft-server/llms.txt
Use this file to discover all available pages before exploring further.
Autoscaling differs from auto-pause and auto-stop. These solutions use external proxies to intercept connections and manage the server container lifecycle.
Autoscaling Solutions
There are three main solutions for autoscaling Minecraft servers:- mc-router - Routes by hostname with auto-start/stop
- Lazymc - Proxy that starts/stops on player join/leave
- Lazytainer - Traffic-based container lifecycle management
mc-router
mc-router is a Minecraft-aware router and multiplexer that can:- Route players by connection hostname (multiple servers behind one port)
- Auto-start backend containers when players join
- Auto-stop backend containers after idle timeout
Features
- Hostname-based routing - Direct players to different servers based on their connection address
- Automatic container management - Start/stop containers via Docker API
- Multiple server support - Route to many backend servers from a single port
- Transparent to players - No special client configuration required
Example Configuration
How It Works
When to Use mc-router
- Multiple servers sharing one public port
- Dynamic server startup based on demand
- Simplified server routing and management
- When you need hostname-based routing
Lazymc
Lazymc keeps a server “asleep” until a player connects. It’s commonly used with lazymc-docker-proxy for Docker environments.Features
- Sleep state management - Keep servers dormant until needed
- Fast wake times - Quickly start servers on connection
- Docker integration - Manage containers via Docker API
- Status spoofing - Show custom MOTD while server is sleeping
Example Configuration
How It Works
When to Use Lazymc
- Single server deployments
- Want custom “waking” MOTD messages
- Need fine-grained control over wake/sleep behavior
- Prefer lightweight proxy solution
Lazytainer
Lazytainer starts and stops containers based on network traffic patterns.Features
- Traffic-based triggers - Monitor packet thresholds
- Inactivity timeouts - Stop containers after idle periods
- Multi-protocol support - Works with any TCP/UDP service
- Container orchestration - Manages multiple containers
Example Configuration
How It Works
When to Use Lazytainer
- Need generic traffic-based scaling
- Managing multiple services (not just Minecraft)
- Simple threshold-based triggers
- Don’t need Minecraft-specific features
Comparison Table
| Feature | mc-router | Lazymc | Lazytainer |
|---|---|---|---|
| Protocol aware | Yes (Minecraft) | Yes (Minecraft) | No (generic TCP/UDP) |
| Multi-server | Yes (routing) | No | No |
| Custom MOTD | No | Yes | No |
| Hostname routing | Yes | No | No |
| Static IP required | No | Yes | No |
| Noise resistance | High | High | Low |
| Wake speed | Fast | Fast | Medium |
| Complexity | Medium | Medium | Low |
Choosing the Right Solution
Use mc-router when:
- You need multiple servers behind one port
- You want hostname-based routing
- You need robust Minecraft-aware proxying
- You’re running a network of servers
Use Lazymc when:
- You have a single server
- You want custom wake-up messages
- You need precise control over sleep/wake behavior
- Static IPs are acceptable
Use Lazytainer when:
- You need simple traffic-based triggers
- You’re managing multiple service types
- You don’t need Minecraft-specific features
- You’re in a low-noise network environment