Immich LXC Setup with External Storage and Backup Strategy
Overview
Immich was installed using the Proxmox Community Scripts, which resulted in a fully functional LXC container without issues.
After the initial setup, the container configuration was adjusted to provide sufficient storage capacity for photos and videos, as the default container disk size is not suitable for long-term media storage.
The solution is based on mapping Immich’s upload directory to a dedicated large storage volume and handling backups outside of Proxmox’s standard container backups.
Storage Layout and Mount Point
Immich Upload Directory
Immich stores all uploaded media in the following directory inside the container:
/opt/immich/upload/
To avoid filling up the container’s root filesystem, this directory is mapped to a separate mount point backed by a larger disk (e.g. ZFS storage on the Proxmox host).
Mount Point Migration Procedure
1. Backup Existing Upload Directory
Before changing anything, log into the Immich LXC and create a backup of the existing upload directory:
cp -a /opt/immich/upload /opt/immich/upload.backup
This ensures the original folder structure and any existing files are preserved.
2. Create and Map the Mount Point
On the Proxmox host:
- Create a new storage volume (e.g. ZFS dataset or subvolume) with sufficient capacity.
- Map this volume into the LXC at:
/opt/immich/upload/
This replaces the original directory with the external storage.
3. Restore Directory Contents
After the mount point is active inside the container:
cp -a /opt/immich/upload.backup/* /opt/immich/upload/
This guarantees that Immich finds the directory structure it expects.
4. Fix Ownership and Permissions
Immich requires the upload directory to be owned by the immich user:
chown -R immich:immich /opt/immich/upload
Failing to do this may lead to upload errors or missing media in the UI.
Backup Considerations (Important)
⚠ Proxmox Datacenter Backups
The mapped mount point is not included in regular Proxmox container backups.
This is expected behavior and must be handled explicitly.
Backup Strategy
Restic + rclone (WebDAV)
Backups are handled independently of Proxmox using the following stack:
- restic for versioned, encrypted backups
- rclone as the transport layer
- WebDAV as the remote storage backend as it is the easiest to be used inside LXCs (I think)
This approach provides:
- Encrypted, deduplicated backups
- Independence from container snapshots
- Fine-grained control over retention and scheduling
- Easy restores without Proxmox involvement
Only the external upload storage needs to be backed up; the container itself can be rebuilt at any time.
Design Rationale
- Large media data is decoupled from the container
- Container rebuilds are trivial
- Backups are reliable, explicit, and auditable
- Storage growth does not require LXC resizing
This setup aligns well with long-term photo library management and avoids common pitfalls with container-based media applications.