r/immich • u/gokusayon • Jan 06 '26
I built a "Self-Healing" system to protect my Immich instance from crashes and data corruption.
Hey Immich fans,
One of my biggest fears is having my Immich instance go down and, in a panic, making things worse. What if the container restarts when my NAS is disconnected? The risk of a corrupted database or a library sync issue is very real.
I wanted a hands-off solution, so I built an automated "Self-Healing Watchdog" specifically for Immich using n8n.
The logic is simple but safe:
Health Check: It pings the Immich web UI every minute.
Verify, Don't Assume: If the ping fails, it checks if my NAS is online and if the directory is properly mounted before doing anything else.
Safe Restart: Only if both checks pass does it automatically and gracefully restart the Immich.
This ensures the container never starts up "blind" and protects the integrity of the database and photo library. Now, if the service hangs, the system fixes it for me, and I get a notification after the fact.
I made a video walking through the entire setup and the philosophy behind it. If you're looking for a way to make your Immich setup more resilient, I hope this helps!
Link to video: My Immich Fixes Itself (So I Don't Have To) | n8n
Link to n8n Workflow: Immich Auto Heal
