explaingit

shitan198u/immich-mount-check

Analysis updated 2026-05-18

4Audience · ops devopsComplexity · 2/5LicenseSetup · easy

TLDR

A Docker Compose override that blocks an Immich media server stack from starting until an external storage drive is confirmed mounted, preventing accidental writes to the wrong disk.

Mindmap

mindmap
  root((mount check))
    What it does
      Blocks Immich startup
      Verifies drive is mounted
      Prevents wrong disk writes
    Tech stack
      Docker Compose
      Alpine helper container
      Immich
    Use cases
      Self hosted photo storage
      GitOps deployments
      Prevent database corruption
    How it works
      Mount table check
      Healthcheck dependency
      Fail fast overrides

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Prevent an Immich Docker stack from starting if an external photo storage drive is not mounted.

USE CASE 2

Add a Docker Compose override that fails fast instead of silently writing data to the wrong disk.

USE CASE 3

Protect a self-hosted media server setup from database corruption caused by drive disconnects.

What is it built with?

Docker ComposeAlpine LinuxImmich

How does it compare?

shitan198u/immich-mount-check0labs-in/vision-link1038lab/agnes-ai
Stars444
LanguageTypeScriptPython
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audienceops devopsdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires an existing Immich Docker Compose deployment and an external drive mount path.

MIT license, free to use, modify, and distribute including for commercial purposes.

In plain English

Immich Mount Check is a small Docker Compose utility that stops your Immich media server stack from starting if an external hard drive is not actually plugged in and mounted. It is built for people who store their photo library on a separate hard drive from their operating system. The problem it solves is a quirk of Docker bind mounts: if the folder where your drive should be mounted is missing because the drive is unplugged, Docker just creates an empty folder on your main system drive and starts the containers anyway. That means your photos and database can start writing to the wrong disk, which can fill up your main drive or corrupt your database once the real drive is reconnected later. To fix this, the tool adds a Docker Compose override file with a small Alpine Linux helper container that checks the Linux kernel's mount table in a loop to confirm the external drive is really mounted, rather than just checking if a folder has files in it. The main Immich services, including the database, Redis, and the machine learning and server components, are all set to wait until this helper container reports healthy before they are allowed to start. If the drive is not mounted, they stay paused instead of running against the wrong location. Setup involves copying an example environment file, filling in the paths where your drive mounts and where your Immich data should live, then running the stack as usual with Docker Compose. If you do not use a separate external drive, you can leave the mount check settings blank. The project works alongside GitOps workflows and Docker managers like Portainer or Arcane, and it is released under the MIT license.

Copy-paste prompts

Prompt 1
Set up this mount-check override for my existing Immich Docker Compose stack.
Prompt 2
Explain why Docker creates an empty folder instead of failing when a bind-mounted drive is missing.
Prompt 3
How do I configure EXTERNAL_MOUNT_PARENT and EXTERNAL_MOUNT_NAME for my external hard drive setup?
Prompt 4
Adapt this wait-for-mount pattern to protect a different self-hosted app's Docker Compose stack.

Frequently asked questions

What is immich-mount-check?

A Docker Compose override that blocks an Immich media server stack from starting until an external storage drive is confirmed mounted, preventing accidental writes to the wrong disk.

What license does immich-mount-check use?

MIT license, free to use, modify, and distribute including for commercial purposes.

How hard is immich-mount-check to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is immich-mount-check for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.