Help recover immich after trueNAS app broke
Hello, I've had immich on trueNAS Scale running as one of truenas apps for a while. Today it had an update, and after that it would not start. Looking at the containers running on trueNAS, the container for immich didn't even appear, so I assumed there was an issue during deploying of the new version, and the container was not recreated.
I've tried having it start for a bit, and deleted the application in order to try and reinstall it, but it also does not reinstall, and I'm not able to see any logs (at least I don't know where). I'm currently attempting to install the application through docker compose, using the same directories the trueNAS installation was using, which should hopefully allow me to recover my data.
I don't know all of the configurations TrueNAS does behind the scenes, but I've decided to attempt to leave stuff mostly at default as per the guide on the docker compose, and to add the REDIS_PASSWORD variable in the redis, since truenas asked for one. I don't know which username it might use, so I left it blank as I assumed it might use a default.
When I start the compose, it appears to see that a database is indeed present, but it seems to throw a compatibility error:
immich_server exited with code 1
immich_server | Starting api worker
...
immich_server | Error: getaddrinfo ENOTFOUND database
immich_server | at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
immich_server | errno: -3008,
immich_server | code: 'ENOTFOUND',
immich_server | syscall: 'getaddrinfo',
immich_server | hostname: 'database'
immich_server | }
immich_server | microservices worker error: Error: getaddrinfo ENOTFOUND database, stack: Error: getaddrinfo ENOTFOUND database
continuing in reply because of char limit
9 Replies
:wave: Hey @Orion,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs docs
- Container Status: docker ps -a docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close command, and re-open it later if needed....
immich_postgres | PostgreSQL Database directory appears to contain a database; Skipping initialization
immich_postgres | 2025-11-01 22:36:20.983 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
immich_postgres | 2025-11-01 22:36:20.983 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
immich_postgres | 2025-11-01 23:36:20.984 CET [1] FATAL: database files are incompatible with server
immich_postgres | 2025-11-01 23:36:20.984 CET [1] DETAIL: The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 14.19 (Debian 14.19-1.pgdg12+1).
immich_postgres exited with code 1
I wanted to try and simply update the postgres version on the compose, but I've noticed the peculiar version name on the compose file:
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
Given the peculiar name of the version, I don't assume I can just change the 14 for a 15?
Also, does anyone know of any other non standard configuration I would need to make to have it connect to the previous configuration made from trueNAS?
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
The docker compose is just the default one with port changed on immich-server:
ports:
- 30041:2283
Of course the paths, and on redis this was added:
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8@sha256:81db6d39e1bba3b3ff32bd3a1b19a6d69690f94a3954ec131277b9a26b95b3aa
environment:
REDIS_PASSWORD: [Password]
With a bit of trial and error I managed to make it work.
I've set it to this image: image: ghcr.io/immich-app/postgres:15-vectorchord0.4.3-pgvectors0.2.0, I don't have the sha part, let me know if this needs fixing, and apparently the postgres user used by truenas was immich
Hello! I did not see your ticket before
Do you still need help for anything?
And indeed trueans use immich for the pg usert
Hey, just wandering if the redis username is also necessary, otherwise everything seems to be working right now
username password for redis doesn't matter, the database is "only" for the running jobs IIRC, so it's recreated at each immich reboot
perfect, thank you!
This thread has been closed. To re-open, use the button below.