# autoheal (Portainer template) Autoheal is a tool that monitors Docker containers and restarts them if they are unhealthy. It works by listening for Docker events and checking the health status of containers that have specific labels enabled. Quick notes: - **Socket Access**: This container requires access to the Docker socket (`/var/run/docker.sock`) to monitor and restart other containers. - **Targeting**: By default, it only monitors containers with the label `autoheal=true`. - **Environment**: You can configure check intervals and timeouts using environment variables like `AUTOHEAL_INTERVAL`. Usage: 1. Import the compose file into Portainer's Stacks or App Templates. 2. Ensure the volume mapping for `/var/run/docker.sock` is correctly set for your host. 3. Add the label `autoheal=true` to any container you want this service to monitor. 4. Deploy the stack via Portainer. Helpful links: - GitHub Repository: https://github.com/willfarrell/docker-autoheal - Docker Hub: https://hub.docker.com/r/willfarrell/autoheal **Status:** Ready for configuration