Migration Hell: "Clean" Docker Compose on Proxmox LXC crashes only after importing v2.2.x backup
Hello community, I am truly desperate after 30+ hours trying to migrate my Immich instance with Gemini 2.5 Pro and Flash.
My Systems:
Source (System A): Synology NAS running Immich v2.2.x (via Portainer/Docker). This instance holds my precious backup file (.sql.gz) with 2000+ manually sorted albums and face data.
Target (System B): Proxmox PVE. I built a new, clean LXC (Privileged, nesting=1 enabled) and installed Docker using the official latest/download/docker-compose.yml and example.env files.
My Goal: A clean SSD/NAS split. I want to use the modern .env file to set:
UPLOAD_LOCATION (Originals) ➔ _NASPATH
THUMBNAIL_PATH, CACHE_PATH, etc. (Metadata) ➔ _SSDPATH
The Problem (The "Catch-22"):
My new, clean setup (System B) works perfectly. I can access the webUI (http://[LXC-IP]:2283) and see the "Welcome" page.
The migration fails immediately after I import my database backup from System A.
As soon as the backup is restored, the immich-server (even the release tag) gets stuck in a crash-loop (Restarting...).
The Error (The Proof): The logs prove that the app is ignoring my clean .env settings (like UPLOAD_LOCATION=/mnt/nas...). Instead, it enters a "Legacy Check Mode" and crashes because it's looking for old, hardcoded paths that don't exist in my clean setup:
ERROR ... Failed to read (/data/library/.immich): ENOENT
If I "fix" this by manually adding that volume to the docker-compose.yml, it just crashes on the next legacy path: ERROR ... Failed to read (/data/upload/.immich): ENOENT ...and then /data/backups, and so on.