immich-power-tools icon indicating copy to clipboard operation
immich-power-tools copied to clipboard

Need Help Install Power-Tools

Open kaylopez1962 opened this issue 10 months ago • 16 comments

I have attempted to install Power-Tools and I am getting the following message:

Database connection failed getaddrinfo ENOTFOUND "immich-postgres"

How do I find the correct value to enter into the .env file? I have tried "datebase", the IP address of my Immich install. No luck. Please help.

Thank you so much!

kaylopez1962 avatar Jan 22 '25 20:01 kaylopez1962

Look at your docker compose in the settings for the database, does it have a container_name? If so use that. For example in this sample of my docker compose I have "container_name: immich_postgres"

name: immich

services:
.. other items removed ..
  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data

iolaire avatar Jan 23 '25 02:01 iolaire

I am running into the same issue: Image

This is the only thing showing in the logs: Image

Here is the compose for postgres: Image

Here is the power tools compose: Image

NightHawkATL avatar Jan 24 '25 17:01 NightHawkATL

I have tried the suggested solution and I am still getting the same error message.

kaylopez1962 avatar Jan 25 '25 13:01 kaylopez1962

You are probably already doing it but have you stopped and re-loaded the docker compose for both power tools and immich? i.e.

docker compose stop
docker  compose up -d

iolaire avatar Jan 25 '25 14:01 iolaire

I just restarted my whole immich stack and get the same error.

NightHawkATL avatar Jan 25 '25 14:01 NightHawkATL

My only other suggestion is to read through the logs on the power tools docker instance to see if those show anything.

iolaire avatar Jan 25 '25 17:01 iolaire

My only other suggestion is to read through the logs on the power tools docker instance to see if those show anything.

This is all the docker logs show. Image

NightHawkATL avatar Jan 25 '25 18:01 NightHawkATL

Hi, Can you check if immich db and power tools are in the same docker network?

varun-raj avatar Jan 26 '25 05:01 varun-raj

I have all my Immich stuff in a single stack so they will all be on the same docker network. Simplifies communications most times..

NightHawkATL avatar Jan 26 '25 14:01 NightHawkATL

@NightHawkATL can you try changing the hypen in your immich url to underscore?

immich-server -> immich_server

varun-raj avatar Jan 27 '25 05:01 varun-raj

Here is the latest with the updated changes.

Image

Image

NightHawkATL avatar Jan 27 '25 16:01 NightHawkATL

I finally got this to work.

This is what I added for just power-tools in my docker-compose.yml:

  # Other services...
  power-tools:
    container_name: immich_power_tools
    image: ghcr.io/varun-raj/immich-power-tools:latest
    networks:
      - immich_network
    environment:
      DB_HOST: immich_postgres
      DB_PORT: 5432
      IMMICH_URL: "http://immich_server:2283"
    ports:
      - "8001:3000"
    env_file:
      - .env

I also added this at the bottom of my docker-compose.yml:

networks:
  immich_network:
    driver: bridge

Additionally, I made sure that every service in docker-compose.yml also had this:

networks:
      - immich_network

satmandu avatar Feb 07 '25 15:02 satmandu

+1, getting the same issue. My config is identical to @NightHawkATL

jamess60 avatar Feb 18 '25 21:02 jamess60

+1, getting the same issue. Any solution?

naamah75 avatar Apr 08 '25 06:04 naamah75

Try removing the " " and also remove the whitepsaces from the environment like this:

IMMICH_URL= IMMICH_API_KEY= DB_USERNAME= DB_PASSWORD= DB_HOST= DB_PORT= DB_DATABASE_NAME=

pchresta avatar Jun 20 '25 20:06 pchresta

This is my solution for installing on TrueNAS:

networks:
  immich-network:
    external: True
    name: ix-immich_default
services:
  immich-power-tools:
    environment:
      DB_DATABASE_NAME: immich
      DB_HOST: ix-immich-pgvecto-1
      DB_PASSWORD: ****
      DB_PORT: '5432'
      DB_USERNAME: immich
      EXTERNAL_IMMICH_URL: http://****:2283
      GEMINI_API_KEY: ****
      GOOGLE_MAPS_API_KEY: ****
      IMMICH_API_KEY: ****
      IMMICH_URL: http://****:30041
      SECURE_COOKIE: 'true'
    image: ghcr.io/varun-raj/immich-power-tools:latest
    networks:
      - immich-network
    ports:
      - '30042:3000'
    restart: unless-stopped

naamah75 avatar Jun 21 '25 03:06 naamah75