Immich Power Tools

Hi Everyone,

I have been running Immich happily on my Truenas Scale system and I would love to add Immich Power Tools to my setup but however I have been having some issues.

I have searched all 4 corners of the internet and I can see some others also having some issues too. I was just wondering if anyone has managed to successfuly get this running on TNS please?

1 Like

I finally got a custom app working.
On electric eel, the different apps don’t natively talk to each other. so I had to install dragonify in order for the custom app to contact the immich database server.
Most of the rest of it was pretty straight forward following the documentation for custom apps.
I had to set the following environment variables:
IMMICH_URL
EXTERNAL_IMMICH_URL
IMMICH_API_KEY
DB_HOST ---->> ix-immich-pgvecto-1
DB_USERNAME —> usually ‘immich’
DB_PASSWORD → found in your Immich app config
DB_DATABASE_NAME → usually ‘immich’

Under Network configuration I set 3000 to point to 8001

1 Like

Would you mind sharing your docker-compose please? I have the same settings but it does not look like it is connecting to the database. I get the error message below.

Database connection failed

getaddrinfo ENOTFOUND Jd&2Ys7W&o

[Setup Instructions]
Connected to (External)

External domain address

Connected to (Internal)

internal domain address

I didn’t use a docker compose. I built a custom app.
I can’t post links. Search the Documentation Hub for building custom apps.
Also verify the version of Scale you’re running. The container names changed between dragonfly and electric eel.

Thank you for the reply. i appreciate it.

Same issue! anyone has found a solution?

Hi! Still interested in installing and configuring Immich power tools?

That would make my day! :blush:

I run immich under dockge and added the following stuff to my immich-YAML:

power-tools:
    container_name: immich_power_tools
    image: ghcr.io/varun-raj/immich-power-tools:latest
    environment:
      DB_HOST: immich_postgres
      DB_PORT: 5432
      IMMICH_URL: http://immich_server:2283
    ports:
      - 8001:3000
    env_file:
      - .env
    restart: unless-stopped

to the env-file the following:

# Stuff for the Immich-Power-Tools
IMMICH_API_KEY="SecrET_AIp-kEy" # your_immich_api_key
IMMICH_URL="http://192.168.25.33:2283" # Your immich instace ip address and port
EXTERNAL_IMMICH_URL="https://immich.your-domain.com" # External address of immich

With those entries I can run the immich-power-tools

Can you kindly tell me what permissions you use for the dataset please? I am going out of my mind as some apps are not installing. I am getting in Dockge now an error “validating /mnt/nvme/docker/stacks/immichpowertools/compose.yaml: (root) Additional property power-tools is not allowed”

For the upload-dataset I have set:

Owner: root
Group: root

User - apps: Allow | Full Control
User - myusername: Allow | Full Control
User - duplicati: Allow | Full Control

And for the postgres-dataset I have set:

Owner: netdata
Group: docker

User - apps: Allow | Full Control
User - myusername: Allow | Full Control
User - duplicati: Allow | Full Control
owner@ - netdata: Allow | Special
group@ - docker: Allow | Special
everyone@: Allow | Special

Hello again. Here is the link, I installed it myself in 5 minutes.
https://github.com/varun-raj/immich-power-tools/issues/62

If people are running immich as a TrueNAS app, this is what can get the power-tools work e.g. out of dockge:

YAML:

services:
  immich-power-tools:
    container_name: immich_power_tools
    image: ghcr.io/varun-raj/immich-power-tools:latest
    ports:
      - 8001:3000
    env_file:
      - .env
    networks:
      - ix-immich_default
networks:
  ix-immich_default:
    external: true

.env:

IMMICH_API_KEY=YOUROWNAPIKEY
IMMICH_URL="http://192.168.178.27:2283"
EXTERNAL_IMMICH_URL="https://host.yourdomain.tld"

DB_USERNAME=immich
DB_PASSWORD=YOUROWNPASSWORD
DB_HOST=pgvecto
DB_PORT=5432
DB_DATABASE_NAME=immich

# Optional
#GOOGLE_MAPS_API_KEY= # Google Maps API Key
#GEMINI_API_KEY= # Gemini API Key

Two things are important to get it to work- the “networks:” section in the YAML and the various names in the .env part (esp. DB_HOST=pgvecto is not obvious).

Alternatively, one could move the environment variables into the YAML and run it as a custom app.

1 Like

You are a lifesaver, thanks!!

I run immich using Portainer. So I created a sample .env file with the following variables:

IMMICH_URL="http://192.168.0.13:2283" # Immich URL
IMMICH_API_KEY="MySecretKey" # Immich API Key
DB_USERNAME="postgres" # Postgress Database Username
DB_PASSWORD="postgres" # Postgres Database Password
DB_HOST="immich_postgres" # Postgres Host (IP address or hostname of the database)
DB_PORT="5432" # Postgres Port number (Default: 5432)
DB_DATABASE_NAME="immich" # Name of the database

# Additional configuration
#SECURE_COOKIE=false # Set to true to enable secure cookies

# Optional
#GEMINI_API_KEY="" # Gemini API Key for parsing search query in "Find"

# Immich Share Link
#IMMICH_SHARE_LINK_KEY="" # Share link key for Immich
#POWER_TOOLS_ENDPOINT_URL="" # URL of the Power Tools endpoint (Used for share #links)
#JWT_SECRET="" # JWT Secret for authentication

I get this error when I visit http://192.168.0.13:8001/ after following the portainer instructions GitHub - varun-raj/immich-power-tools: Power tools for organizing your immich library.

Ignore pgvecto on the image. I tried various host names. According to my immich variables in portainer the hostname should be immich_postgres:

That is also the name of the postgres database container:

I also attach my yml file.

#
# WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
  
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro

    env_file:
      - stack.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:41eacbe83eca995561fe43814fd4891e16e39632806253848efaf04d3c8a8b84
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    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
    shm_size: 128mb
    restart: always

volumes:
  model-cache: