docker-immich icon indicating copy to clipboard operation
docker-immich copied to clipboard

Unable to logon to website new installation

Open mikey6283 opened this issue 6 months ago • 9 comments

After numerous attempts to install Immich. It finally worked as i was able to upload a couple of images. However tried to login again and I was unable to connect.

Any help to solve this would be appreciated as i am unsure where the problem lies.

I have pased the logs and Docker info. Postgres seems to work as there is no errors.

Error from logs

Nest] 1243  - 06/02/2025, 5:46:42 AM     LOG [Api:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 1243  - 06/02/2025, 5:46:42 AM   ERROR [Api:StorageService] Failed to write /photos/encoded-video/.immich: Error: EACCES: permission denied, open '/photos/encoded-video/.immich'
api worker exited with code 1
Starting api worker
[Nest] 1272  - 06/02/2025, 5:46:46 AM     LOG [Api:EventRepository] Initialized websocket server
[Nest] 1272  - 06/02/2025, 5:46:46 AM     LOG [Api:DatabaseRepository] Running migrations, this may take a while
[Nest] 1272  - 06/02/2025, 5:46:46 AM     LOG [Api:ServerService] Feature Flags: {
  "smartSearch": true,
  "facialRecognition": true,
  "duplicateDetection": true,
  "map": true,
  "reverseGeocoding": true,
  "importFaces": false,
  "sidecar": true,
  "search": true,
  "trash": true,
  "oauth": false,
  "oauthAutoLaunch": false,
  "passwordLogin": true,
  "configFile": false,
  "email": false
}

Docker config ommand execution

docker run
  -d
  --name='immich'
  --net='bridge'
  --pids-limit 2048
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Pine"
  -e HOST_CONTAINERNAME="immich"
  -e 'DB_HOSTNAME'='192.168.2.10'
  -e 'DB_USERNAME'='postgres'
  -e 'DB_PASSWORD'='postgres'
  -e 'DB_DATABASE_NAME'='immich'
  -e 'REDIS_HOSTNAME'='localhost'
  -e 'DB_PORT'='5433'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'=''
  -e 'SERVER_HOST'='0.0.0.0'
  -e 'SERVER_PORT'='8080'
  -e 'MACHINE_LEARNING_HOST'='0.0.0.0'
  -e 'MACHINE_LEARNING_PORT'='3003'
  -e 'MACHINE_LEARNING_WORKERS'='1'
  -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120'
  -e 'DOCKER_MODS'='imagegenius/mods:universal-redis'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8080]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
  -p '8085:8080/tcp'
  -v '/mnt/user/immichphotos/':'/photos':'rw'
  -v '/mnt/user/immichphotos/':'/libraries':'rw'
  -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich'

e6586a931df23a46ce53eccda2f929a851022cbccb3e779a27fcf50cdb898a3a

The command finished successfully!

mikey6283 avatar Jun 02 '25 04:06 mikey6283

Hi i have been scouring the web for answers as to why i cannot start Immich. In postgresql logs there is this error . As newbie I am unable to either "trust" local connection or remove the database to start again.

I would be gratefull for any advice on how to start up Immich

initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. 2025-06-02 21:43:28.257 BST [1] LOG: redirecting log output to logging collector process 2025-06-02 21:43:28.257 BST [1] HINT: Future log output will appear in directory "log". 2025-06-02 21:46:24.843 BST [1] LOG: redirecting log output to logging collector process 2025-06-02 21:46:24.843 BST [1] HINT: Future log output will appear in directory "log". The files belonging to this database system will be owned by user "postgres". This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Europe/London creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2025-06-02 21:43:25.863 BST [49] LOG: redirecting log output to logging collector process 2025-06-02 21:43:25.863 BST [49] HINT: Future log output will appear in directory "log". done server started CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down..... done server stopped

PostgreSQL init process complete; ready for start up.

PostgreSQL Database directory appears to contain a database; Skipping initialization

mikey6283 avatar Jun 03 '25 06:06 mikey6283

/photos/encoded-video/.immich: Error: EACCES: permission denied, open '/photos/encoded-video/.immich'

this is causing your issues, make sure that everything in /photos is owned by abc:abc within the container

chown -R abc:abc /photos within the container should fix it after restarting it

duplicate of https://github.com/imagegenius/docker-immich/issues/562

hydazz avatar Jun 04 '25 22:06 hydazz

/photos/encoded-video/.immich: Error: EACCES: permission denied, open '/photos/encoded-video/.immich'

this is causing your issues, make sure that everything in /photos is owned by abc:abc within the container

chown -R abc:abc /photos within the container should fix it after restarting it

duplicate of #562

Thanks for reply, I inputed chown -R abc:abc /photos into container on unraid as per screenshot, hope that this correct as i am a newbie and not very confident at the moment. I don't have any photos now as i deleted the only test one which did make any difference.

Do i change the abc :abc or do i have to make a group?

Sorry if these question a futile as i new to all this.

I hop ethat you can guide me in the right direction.

Image which

mikey6283 avatar Jun 05 '25 08:06 mikey6283

you need to be inside the container not the host, try docker exec -it immich bash

hydazz avatar Jun 05 '25 11:06 hydazz

you need to be inside the container not the host, try docker exec -it immich bash

Thanks i managed to login , however i came up with the same issue i had before , where as the server immich server goes on and off line.

Do you have any ideas?

_immich_logs(3).txt

_immich_logs(2).txt

mikey6283 avatar Jun 05 '25 14:06 mikey6283

its failing to connect to redis redeploy the container and check for around the logs when the docker mod is applied

hydazz avatar Jun 06 '25 09:06 hydazz

Hi, I am having the same issue with the container in unraid. I am able to resolve by changing the ownership of /photos/ inside the container to abc using above command. However after a time (less than a day) the ownership has reverted and the container is once again stuck unable to write files.

Any idea why this is happening and I how I can permanently resolve?

Could it be redis related? I'm not seeing any errors in redis though.

danieljclark avatar Jun 28 '25 09:06 danieljclark

do you have any other apps that use the folder immich uses?

hydazz avatar Jun 28 '25 13:06 hydazz

I don't think so. Just Immich, Immich-PostgreSQL and Immich-Redis from the unraid community app store.

I've used Immich-Go to bulk upload but that's a manually initiated process. I did initially have Luckybackup copying the folders from my main to my backup NAS but I've turned that off as a test and the permission issue still happens so it wasn't that.

danieljclark avatar Jun 28 '25 15:06 danieljclark