How to Map a Remounted Drive Correctly in Immich Storage Settings

Moving photos is stressful. Moving a drive that holds your Immich library can feel like juggling eggs near a fan. But do not panic. If your drive was remounted, Immich can still find everything. You just need to map the drive path correctly. Think of it like giving Immich the right street address after your photo house moved.

TLDR: A remounted drive must be mounted at a stable path on the host, then mapped into the Immich container with the correct Docker volume path. Immich sees the container path, not always the host path. Update your Docker Compose file, restart Immich, then check your library or storage settings. Keep paths consistent, or Immich may think your files disappeared.

Why this happens

Immich usually runs in Docker. Docker is like a neat little box. Your computer has paths. The Docker container has paths too. They are not always the same.

For example, your drive may be mounted on the host at:

  • /mnt/photos

But inside Immich, Docker might show it as:

  • /usr/src/app/external

That means Immich does not care about the host path directly. It cares about the path it can see inside the container.

This is the most common mistake. People remount a drive. Then they enter the host path in Immich. Immich looks inside its container and says, “Nope. I do not live there.” Rude, but technically correct.

The golden rule

The path in Immich must match the path inside the container.

Not the path you see in your file manager. Not the path you remember from last Tuesday. The container path.

If your Docker Compose file says this:

volumes:
  - /mnt/photos:/photos

Then Immich should use:

/photos

That is the container path. It is the right side of the mapping.

The left side is the host path. The right side is the container path.

  • Host path: /mnt/photos
  • Container path: /photos

Easy rule. Left is outside. Right is inside.

Step 1: Find where the drive is mounted now

First, check the current mount point on your host system. This is the real location of the drive on your server.

You can use:

lsblk

Or:

df -h

Look for your drive. It may appear as something like:

  • /mnt/photos
  • /media/storage
  • /srv/immich/photos

If it has a weird path like /media/user/Big Drive, you may want to change it. Spaces can work, but they make everything more annoying. Computers are very dramatic about spaces.

A clean path is better. For example:

/mnt/immich_photos

Simple. Stable. Boring. Boring is good for servers.

Step 2: Make the mount stable

This part is important. If your drive remounts to a different path after reboot, Immich may lose track of it again.

Use a stable mount in /etc/fstab. The best way is to mount by UUID.

Find the UUID:

blkid

You might see something like:

UUID="1234-ABCD" TYPE="ext4"

Then add a line to /etc/fstab. This example is for an ext4 drive:

UUID=1234-ABCD /mnt/immich_photos ext4 defaults,nofail 0 2

Then create the mount folder:

sudo mkdir -p /mnt/immich_photos

Test the mount:

sudo mount -a

If there are no errors, good. Your drive now has a steady home. Give it a tiny housewarming party.

Step 3: Check your Docker Compose volume mapping

Now open your Immich Docker Compose file. It is often called:

  • docker-compose.yml
  • compose.yml

Find the Immich server service. It may look like this:

immich-server:
  volumes:
    - ${UPLOAD_LOCATION}:/usr/src/app/upload
    - /etc/localtime:/etc/localtime:ro

If you are using an external library, you need to add your remounted drive as a volume.

For example:

immich-server:
  volumes:
    - ${UPLOAD_LOCATION}:/usr/src/app/upload
    - /mnt/immich_photos:/photos:ro
    - /etc/localtime:/etc/localtime:ro

In this example:

  • Host path: /mnt/immich_photos
  • Container path: /photos
  • Mode: ro, which means read only

Read only is good for external libraries. It helps prevent accidental changes. Immich can scan the files, but it cannot modify them.

If Immich needs to write to this location, do not use ro. But for many external library setups, ro is safer.

Step 4: Understand upload storage versus external libraries

Immich has different kinds of storage. This can be confusing.

Upload storage is where Immich stores files uploaded through the app. This is usually controlled by UPLOAD_LOCATION in your .env file.

It may look like this:

UPLOAD_LOCATION=/mnt/immich_uploads

Then Docker maps it like this:

${UPLOAD_LOCATION}:/usr/src/app/upload

So the host path is:

/mnt/immich_uploads

And the container path is:

/usr/src/app/upload

External libraries are different. These are folders that already contain photos and videos. Immich scans them. You add them in the Immich web interface.

For external libraries, you must enter the container path. So if your compose file maps:

/mnt/immich_photos:/photos:ro

Then the library import path in Immich should be:

/photos

Or maybe a subfolder, like:

/photos/family

Do not enter /mnt/immich_photos unless that same exact path exists inside the container.

Step 5: Restart Immich

After changing your compose file, restart Immich.

From the folder with your compose file, run:

docker compose down
docker compose up -d

Or, if you prefer:

docker compose restart

A full down and up is often cleaner after volume changes. Docker needs to rebuild the container setup with the new mount.

Then check that the path exists inside the container:

docker exec -it immich_server ls /photos

Your container name may be different. You can find it with:

docker ps

If ls /photos shows your folders, you did it. Immich can see the drive.

Step 6: Update Immich storage or library settings

Now open Immich in your browser.

Go to the admin area. Then look for your library settings. The exact menu can change between Immich versions, but you are usually looking for external libraries or library paths.

If your old path was wrong, remove it or edit it. Add the correct container path.

For example, use:

/photos

Or:

/photos/vacations

Then save the settings. Run a library scan. Immich should begin checking the files again.

If items appear missing at first, do not scream into the router. Give Immich time. Scans can take a while, especially with many photos.

Step 7: Fix permissions if needed

Sometimes the path is correct, but Immich still cannot read the files. That smells like permissions.

Check the drive permissions on the host:

ls -la /mnt/immich_photos

The Immich container needs permission to read the files. If it cannot read them, it cannot scan them.

If your files are owned by a different user, that may be okay. They just need readable permissions. For folders, Immich also needs execute permission so it can open them.

A common safe read permission looks like this:

drwxr-xr-x

For files, this is common:

-rw-r--r--

Be careful with permission commands. Do not blindly run chmod 777. That is the “leave every door open” option. It may work, but it is messy.

If you use a network drive, such as SMB or NFS, permissions may need extra mount options. Make sure the mounted files are visible and readable on the host first. Then make sure Docker maps them correctly.

Common mistakes

  • Using the host path in Immich. Immich needs the container path.
  • Forgetting to restart Docker. New volumes need a container restart.
  • Changing the mount path after setup. Keep it stable.
  • Mounting the wrong folder level. Map the folder that actually contains your photos.
  • Bad permissions. Immich must be able to read the files.
  • Using spaces in paths. They can work, but they invite chaos goblins.

A simple example

Let us say your photos live on a drive mounted here:

/mnt/bigdrive/photos

You want Immich to see them here:

/library

Your Docker Compose volume should be:

- /mnt/bigdrive/photos:/library:ro

Then in Immich, use this library path:

/library

That is it. The left side is for Linux. The right side is for Immich. They are pen pals, not twins.

What about the storage template?

Immich also has a storage template feature. This controls how uploaded files are organized. It does not magically remap a drive. It is more like a filing rule.

For example, it may organize uploads by year, month, or album. Nice and tidy. But it does not replace Docker volume mapping.

So if your remounted drive is not visible, do not start by changing the storage template. First fix the mount. Then fix Docker. Then check Immich paths.

Quick checklist

  • Find the drive mount path on the host.
  • Make the mount stable with UUID and fstab.
  • Map the host path into the Immich container.
  • Use the container path in Immich settings.
  • Restart Immich containers.
  • Check the path with docker exec.
  • Run a library scan.
  • Fix permissions if files do not appear.

Final thoughts

Mapping a remounted drive in Immich is not magic. It is just a path translation game. Your server sees one path. Immich sees another. Docker connects the two.

Once you understand the left side and right side of the volume mapping, the whole thing becomes much less scary. The host path points to the real drive. The container path is what Immich uses.

So keep your mount stable. Keep your paths simple. Restart after changes. Then let Immich scan.

Your photos are not lost. Immich just needed better directions.