Add a bind mount ending in :ro under immich-server → volumes in docker-compose.yml, then run docker compose up -d. In Immich, create an external library, add the container-side path under Folders, and click Scan. Immich External Libraries documentation
Add the read-only mount
Open the docker-compose.yml for your existing Immich installation. Append the photo directory to the existing volumes list under services → immich-server. Keep the existing ${UPLOAD_LOCATION}:/data entry for uploads. Immich external library mount example, Docker Compose services reference
services:
immich-server:
volumes:
- ${UPLOAD_LOCATION}:/data
- /mnt/nas/christmas-trip:/mnt/media/christmas-trip:ro
In this example, /mnt/nas/christmas-trip is the host folder. /mnt/media/christmas-trip is where it appears inside the container and is the path Immich scans. Replace the host path with your existing photo directory. Compose’s short syntax creates a directory at the host path if it doesn’t exist, so double-check the path before applying the change. Immich import path example, Docker Compose volume syntax
With :ro, Immich can scan the folder, but it cannot delete originals through the web UI or write XMP sidecars through that mount. Immich can still read supported metadata from matching XMP sidecars alongside the media. Immich read-only mount behavior, Immich external library sidecar support
Set an SELinux label if needed
If the photo folder needs relabeling on an SELinux host, add z or Z to the mount options and keep ro. Use :ro,z for content shared by multiple containers or :ro,Z for content private to one container. Docker Compose volume syntax
These options modify the label on the host file or directory. Avoid :Z on system directories such as /home or /usr because relabeling them can make the host unusable. For a dedicated photo directory shared by multiple containers, the replacement line is below. Docker Engine SELinux label guidance
- /mnt/nas/christmas-trip:/mnt/media/christmas-trip:ro,z
Apply the mount and check access
From the directory containing docker-compose.yml and .env, apply the change with docker compose up -d. Open a shell in immich_server and list the container path. Immich Docker Compose instructions, Immich library troubleshooting
docker compose up -d
docker exec -it immich_server bash
Run this inside the container shell. Immich library troubleshooting
ls /mnt/media/christmas-trip
If the folder is missing or you cannot list its contents, check the host path, the mount entry, and directory permissions before scanning. If you run a dedicated microservices container, give it the same mount and check the path there too. Immich library troubleshooting
Create the library and scan it
Sign in as an administrator. The library belongs to the user selected at creation, and its owner cannot be changed later. Immich library creation instructions
- Open your avatar menu and go to Administration → External Libraries.
- Click Create Library and select the owner.
- Under Folders, click Add, enter
/mnt/media/christmas-trip, and click Add. - Click Scan. Immich library creation instructions
While the scan is running, check Administration → Jobs for library and processing activity. The imported photos and videos appear in the main timeline. Immich guide to checking scan jobs, Immich External Libraries documentation
Rescan when files change
If you modify a file outside Immich, rescan the library for the change to show up. If you delete an original from disk, Immich moves the corresponding asset to trash on rescan. Immich External Libraries documentation
Immich schedules an automatic scan once a day. To change the interval as an administrator, go to Administration → Settings → External Library and choose a preset or use a cron schedule. Immich nightly scan, Immich scan scheduling
Automatic file watching is experimental and likely won’t work on network drives. Use periodic scans in that case. Immich automatic watching documentation
Evidence and limits. The procedure follows the Immich v3.4.2 external-library documentation and Docker’s Compose volume and Engine bind-mount references. The documentation was checked on November 26, 2026. The procedure was not run. Immich v3.4.2 library documentation, Docker Compose volume syntax, Docker Engine bind mounts