Immich: Use Remount Mounted Drive the Right Way

Immich: Use Remount Mounted Drive the Right Way

You’ve finally got your self-hosted photo setup looking clean. Immich is running, your phone is syncing, and the AI is busy tagging your face in blurry photos from 2014. Then it happens. You run out of space on your main SSD. Or maybe you bought a massive new 14TB HDD and want to move the whole library over without breaking the database.

It sounds easy. Just move the files and change a path, right? Honestly, that’s how most people end up with a "500 Internal Server Error" or a library full of "Missing Asset" icons. When you want to have Immich use remount mounted drive setups, you aren't just moving files. You're remapping the virtual nervous system of a complex Docker stack.

I’ve seen dozens of people wipe their metadata because they didn't realize how Immich handles filesystem markers. Let’s talk about how to do this without losing your mind—or your memories.

👉 See also: Why Having a No Profile Picture TikTok Is Actually the App's Most Understated Flex

The Secret Marker You Probably Ignored

If you look inside your Immich upload folder, you’ll see some tiny, hidden files named .immich. Most people ignore them. Some people delete them because they think they’re junk. Don't do that.

These files are the only reason Immich doesn't self-destruct when a drive fails to mount. When the server starts, it checks for these markers. If the drive didn't mount correctly and Immich sees an empty folder instead of your photos, it will stop itself. This prevents the database from thinking all your photos were "deleted" and wiping its records.

If you're moving to a new drive, you have to move these files too. If you don't, Immich will throw a "System Integrity Check" error and refuse to boot. It’s a safety feature, but it feels like a brick wall if you don't know why it's happening.

🔗 Read more: How to Make Faces on Keyboard Without Looking Like a Total Newbie

Moving the Library: The Step-by-Step

Let's say you're moving from /mnt/old-drive/immich to /mnt/new-hd/immich.

  1. Stop everything. Run docker compose down. Do not try to move files while the containers are active. You’ll end up with corrupted thumbnails or a database that's half-synced.
  2. The Big Move. Use a tool like rsync. Why? Because cp is basic and can fail halfway through without telling you. Run:
    rsync -avzP /mnt/old-drive/immich/ /mnt/new-hd/immich/
    The -a flag is vital. It preserves permissions and timestamps. If you lose the "Date Created" metadata on the filesystem, Immich might get confused later during a rescan.
  3. Update your .env file. This is where most people get tripped up. Find the UPLOAD_LOCATION variable. Change it to your new path:
    UPLOAD_LOCATION=/mnt/new-hd/immich
  4. The "Remount" Trick. If you're using an external USB drive, make sure your /etc/fstab is solid. If the drive mounts as /dev/sdb1 one day and /dev/sdc1 the next, Immich will break. Use the UUID of the drive in your mount settings.

External Libraries vs. The Upload Folder

There is a huge difference between moving your main "Upload" folder and adding an "External Library."

If you just want Immich to see photos that already live on another drive (like a NAS share or an old photography archive), you don't move them. You mount them as a new volume in your docker-compose.yml.

services:
  immich-server:
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /mnt/my-big-archive:/usr/src/app/external/archive:ro

Notice the :ro at the end? That stands for Read-Only. It's a massive safety net. It tells Immich, "You can look at these, you can index them, you can generate thumbnails, but you are NOT allowed to delete or move them."

Once you’ve added that line and run docker compose up -d, you head into the Immich Web UI. Go to Administration > External Libraries. You’ll add the path /usr/src/app/external/archive there. Not the path on your host, but the path inside the container.

Why Your Permissions are Probably Broken

Linux permissions are the final boss of self-hosting.

Immich usually runs as a specific user (often UID 1000). If your new drive is owned by root, the Immich container won't be able to write the .immich marker files. It will crash.

📖 Related: James Webb Earth Photo: Why NASA Won’t Give You the Picture You Want

You need to make sure the user running Docker owns the folders on the new drive.
sudo chown -R 1000:1000 /mnt/new-hd/immich

If you're using a NAS via SMB or NFS, this gets even weirder. You might need to map the permissions in your mount command using uid=1000,gid=1000 in your fstab options. Honestly, if you see "Permission Denied" in your logs, 99% of the time it's because the host hasn't granted the Docker user rights to that specific mount point.

Dealing with the "Missing Asset" Nightmare

Sometimes, you do everything right, but the web UI still shows grey squares. This happens when the database thinks a photo is at /usr/src/app/upload/library/vacation.jpg but the file is actually gone or unreadable.

If you’ve successfully remounted the drive and the files are there, but Immich isn't seeing them, go to the Jobs tab in the admin settings.

  • Run Storage Template Migration if you changed your folder structure.
  • Run Library Scan for external libraries.
  • Check the System Logs. If you see "ENOENT," it literally means "Error No Entity"—the file isn't where Immich thinks it is.

Actionable Next Steps

To make sure your remount sticks, do these three things right now:

  1. Verify the UUID: Run blkid and make sure your /etc/fstab uses UUID=your-long-string instead of /dev/sdb. This ensures that even if you plug the drive into a different USB port, it always mounts to the same spot.
  2. Test the Mount: Before starting Docker, run ls -a /mnt/new-hd/immich. If you don't see the .immich file, the mount failed or you didn't copy hidden files.
  3. Check Container Paths: Open your docker-compose.yml and ensure both immich-server and immich-microservices have the exact same volume mappings. If one can see the drive and the other can't, the machine learning features (like face recognition) will fail to process your new photos.

The beauty of Immich is its speed, but that speed relies on a very rigid understanding of where your files live. Treat your mount points with respect, keep your UUIDs consistent, and never, ever delete those hidden .immich files.