The Minecraft server image includes mc-monitor for health checking. Health checks allow Docker and orchestration systems to monitor server status and automatically restart unhealthy containers.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.
Default Health Check
The image includes a built-in health check that continuously monitors the server status:Checking Health Status
Using Docker Inspect
Query the container’s health status programmatically:healthy- Server is running and respondingunhealthy- Server is not respondingstarting- Server is still starting up
Using mc-health Wrapper
Themc-health script wraps mc-monitor status with the correct arguments:
Custom Health Check Configuration
You can customize health check parameters in a Docker Compose file:Health Check Parameters
| Parameter | Description | Default |
|---|---|---|
test | Command to run for health check | mc-health |
start_period | Grace period before health checks begin | 1m |
interval | Time between health checks | 5s |
retries | Number of consecutive failures before unhealthy | 20 |
timeout | Maximum time for health check to complete | 10s |
Disabling Health Checks
Using Environment Variable
Some orchestration systems (like Portainer) don’t allow disabling the default health check. Use the environment variable:Using Docker Compose
Disable health checks directly in the service declaration:Health Checks with Auto-Pause
When using the auto-pause feature, reference themc-health wrapper instead of mc-status directly:
Health Checks for Older Versions
Health checks are automatically disabled for Minecraft versions before Beta 1.8, as these versions don’t support server pinging.Versions before Beta 1.8 lack the Server List Ping protocol. See the Minecraft Wiki for more information.
Kubernetes Health Checks
For Kubernetes deployments, configure liveness and readiness probes:Monitoring Health Check Logs
View detailed health check logs:Troubleshooting
Health Check Failing on Startup
Increase thestart_period to give the server more time to start:
Intermittent Health Check Failures
Adjust retry count and interval:Health Check Not Working
Verify mc-monitor is working:Best Practices
- Use mc-health wrapper instead of calling mc-monitor directly
- Increase start_period for modded servers (2-5 minutes)
- Configure appropriate timeouts based on server performance
- Monitor health check logs during initial setup
- Disable health checks only when absolutely necessary
- Use with restart policies for automatic recovery