Home Assistant Add-On Immich

Hi,
I have been trying on and off for a few months to run this add-on.
Unfortunately every version released so far, results in the same issue for me.
The log says the database cannot be reached, rretrying.

There is nothing in the instructions to change the database host name, port or anyhting else so I have tried the defaults and also changing the hostname to the local ip address. Both have the same issue.
Any ideas or tips?

DB Hostname tryed:
127.0.0.1
192.168.0.4
homeassistant.local

All fail
[Nest] 1140 - 08/18/2024, 12:51:09 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)ā€¦
Error: connect ECONNREFUSED 127.0.0.1:5432

Paul

Do you mean this: GitHub - outadoc/immich-home-assistant: Home Assistant component to display random pictures from your Immich library.

hassio-addons/immich at master Ā· alexbelgium/hassio-addons (github.com)

1 Like

did you read this line in the docs linked above?

Beware that you need to install a separate postgres addon to be able to connect the database. You can install the postgres addon already in my repository. Beware to change the password BEFORE starting it ; it wonā€™t change afterwards

Also it may need the port number 2283. I have immich installed in on a separate server and it runs on that port.

1 Like

So you seem to have a habit to create topics, ask for help but you lack the decency to react to any effort to help you, let alone show your gratitude and just stay silent even though you are active on the forum!?
Some characterā€¦

1 Like

Hi everyone I made a repository :package: with a bunch of easy to use all-in-one addons, including Immich :camera_flash:

Itā€™s easier to configure because you donā€™t have to mess around with Postgres and Redis as they are built in.

And backups and restores are just a simple addon backup and restore without worrying to break any data stored inside Postgres or Redis.

Check it out and if you like the idea maybe you can help me maintaining it or expanding the documentation.

Others addons (all-in-one) that you can find are: Paperless-ngx, Nextcloud, Gitlab, Syncthing and others

Now Iā€™m currently working on Gitea, but if you have other requests feel free to submit them :hugs:

2 Likes

Hi Fabio,

I was earlier using the Immich package from alexbelgium, and I was trying to use the immich app from your repository, because of the all-in package, but i received an error when I try to start it:

Data page checksums are enabled.

initdb: error: directory ā€œ/config/postgresā€ exists but is not empty

initdb: hint: If you want to create a new database system, either remove or empty the directory ā€œ/config/postgresā€ or run initdb with an argument other than ā€œ/config/postgresā€.

Can you help me with this error? Do i need to manually remove some files that was earlier created by the postgres addon (from alexbelgium)? I cannot find a folder /config/postgresā€¦

Thanks in advance

You are right, my bad.
Now itā€™s fixed

still the same, after updating to 1.124.2-v0

initdb: error: directory ā€œ/config/postgresā€ exists but is not empty

initdb: hint: If you want to create a new database system, either remove or empty the directory ā€œ/config/postgresā€ or run initdb with an argument other than ā€œ/config/postgresā€.

EDIT: had to remove the addon_config/postgres folder manually and restart the addon fixed the issue.

Thank you!

1 Like

Hi Fabio,

thank you so much for your work, Iā€™m quite new to HA but slowly Iā€™m learningā€¦
Everything works for me, but I have two questions, is there a way to change the default folder where the photos are saved (like on an external HD)?
I saw that in external libraries it is possible to insert your own path, but I donā€™t know how to indicate a simple HD connected directly to a Raspberry 4ā€¦

Second, is it possible to integrate a cloud backup? or is there any way to bind it?

To avoid both problems, I had thought of mounting the Raspberry SD as large as possible and thus avoiding having to specify an external HDD. At this point, when Home Asssistant backs up to OneDrive, it should also bring all the contents of immich right?

A thousand thanks!

At the moment Immich stores its library under /media/immich and canā€™t be changed as it would break Immich
HA OS doesnā€™t let you specify where to mount your usb drive, so the only thing you could use it for is as an external library (canā€™t upload to it)
If you want to mount a usb drive to ha, you can follow this:

My advice is to use a nas if you can

Regarding backups, if your immich folder isnā€™t on any external storage, it will be included in the ha full backups