immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
42.58k stars 2.08k forks source link

First time setup. #1028

Closed PrivacyOsint2 closed 1 year ago

PrivacyOsint2 commented 1 year ago

Describe the bug I just tried building the immich with docker-compose. I might messed it up maybe. I do see the logo for setup then I click it shows this error below in the cli.

Task List

I will figure it out maybe.

Website Error Error code 500 Internal Error Verbose {"message":"Internal Error"}

CLI error. immich-web_1 | Error: connect EADDRNOTAVAIL ::1:80 - Local (:::0) immich-web_1 | at internalConnect (node:net:953:16) immich-web_1 | at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18) immich-web_1 | at node:net:1044:9 immich-web_1 | at processTicksAndRejections (node:internal/process/task_queues:78:11)

alextran1502 commented 1 year ago

Do you change anything in docker-compose file? Can you share the docker-compose file and .env file?

PrivacyOsint2 commented 1 year ago
version: "3.8"

services:
  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - /home/someone/immich2/data1:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - /home/someone/immich2/data2:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - /home/someone/immich2/data3:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - database
    restart: always

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - .env
    environment:
      # Rename these values for svelte public interface
      - PUBLIC_IMMICH_SERVER_URL=10.7.7.102
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: 5LjMDALPdd6wQCte4TDGzvfkrkJEYS9ih5fZDGqpHpGYoibQ7Tq8XwqJmFhSDwfsR5DLvvZt4zkS3qJGT7QFTmWuaVXEZxhfE3a9
      POSTGRES_USER: wowy
      POSTGRES_DB: immich
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2000:8080
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: always

volumes:
  pgdata:
###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich_postgres
DB_USERNAME=wowy
DB_PASSWORD=5LjMDALPdd6wQCte4TDGzvfkrkJEYS9ih5fZDGqpHpGYoibQ7Tq8XwqJmFhSDwfsR5DLvvZt4zkS3qJGT7QFTmWuaVXEZxhfE3a9
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Upload File Location
#
# This is the location where uploaded files are stored.
###################################################################################

UPLOAD_LOCATION=absolute_location_on_your_machine_where_you_want_to_store_the_backup

###################################################################################
# Log message level - [simple|verbose]
###################################################################################

LOG_LEVEL=simple

###################################################################################
# JWT SECRET
#
# This JWT_SECRET is used to sign the authentication keys for user login
# You should set it to a long randomly generated value
# You can use this command to generate one: openssl rand -base64 128
###################################################################################

JWT_SECRET=ii6eg77usybuqfjh6t6cr4wvr2mff6hecs5pnd28svdouwc2t8erizpsx85q3k9bfpn8rcprye5grrnjdd7oon9bdmf8q7kkqr86ncugajkqfpts8vphhvxdbocu5bw4

###################################################################################
# Reverse Geocoding
#
# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM
####################################################################################

# DISABLE_REVERSE_GEOCODING=false
# REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
#
# Custom message on the login page, should be written in HTML form.
# For example:
# PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
####################################################################################

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################
# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

# IMMICH_WEB_URL=http://immich-web:3000
# IMMICH_SERVER_URL=http://immich-server:3001
# IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

####################################################################################
# OAuth Setting - Optional
#
# These setting will enable OAuth login for your instance of Immich
# Folow the instructions in the page https://immich.app/docs/usage/oauth to set up your OAuth provider
####################################################################################

# OAUTH_ENABLED=false
# OAUTH_ISSUER_URL=
# OAUTH_CLIENT_ID=
# OAUTH_CLIENT_SECRET=
# OAUTH_BUTTON_TEXT=Login with OAuth
# OAUTH_AUTO_REGISTER=true
# OAUTH_SCOPE="openid profile email"
alextran1502 commented 1 year ago

it seems like you use your own IP for the container, the proxy container needs these two environment variables as well

     - IMMICH_SERVER_URL
     - IMMICH_WEB_URL
alextran1502 commented 1 year ago

For first time setup I suggest you setup with the default setting and slowly tweak it to your needs

PrivacyOsint2 commented 1 year ago

I thought you have change it from ${IMMICH_SERVER_URL} to your ip. Please make an update note let you know its extra.

PrivacyOsint2 commented 1 year ago

Its working now. I built my own bookstack/nextcloud servers and they need an ip or it won't work at all.

alextran1502 commented 1 year ago

I thought you have change it from ${IMMICH_SERVER_URL} to your ip. Please make an update note let you know its extra.

They are noted in the .env file as they are optional values

alextran1502 commented 1 year ago

Its working now. I built my own bookstack/nextcloud servers and they need an ip or it won't work at all.

Ah I see! Glad it is working. I am closing this issue now

bo0tzz commented 1 year ago

@PrivacyOsint2 I see you've mounted different folders to each container's library path. That won't work - they all need to share the same folder.

ArgentumCation commented 1 year ago

UPDATE: Turns out the issue was because I was accessing Immich from my internal IP instead of public URL. I also had to change PUBLIC_IMMICH_SERVER_URL to https://immich.$PERSONAL/api

I seem to be getting the same issue, but it seems like all of my environment vars should be set correctly

Error log from web interface

Error code 500
Internal Error
Verbose

{"message":"Internal Error"}

Error Log for immich-web:

Listening on 0.0.0.0:3000
Error: connect EADDRNOTAVAIL ::1:80 - Local (:::0)
    at internalConnect (node:net:953:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18)
    at node:net:1044:9
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

docker-compose.yml:

services:
  postgres:
    container_name: postgres
    env_file:
      - .env
      - $ENV_DIR/postgres.secrets.env
    image: postgres:latest
    labels:
      - traefik.enable=false
    restart: always
    volumes:
      - $CONF_DIR/postgresql:/var/lib/postgresql/data
  redis:
    container_name: redis
    env_file:
      - .env
    expose:
      - 6379
    image: redis:alpine
    labels:
      - traefik.enable=false
    restart: always
    volumes:
      - $CONF_DIR/redis:/data
  immich-server:
    container_name: immich-server
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - $PICTURES_DIR:/usr/src/app/upload
    env_file:
      - $ENV_DIR/immich.secrets.env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - postgres
    restart: always

  immich-microservices:
    container_name: immich-microservices
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - $PICTURES_DIR:/usr/src/app/upload
    env_file:
      - $ENV_DIR/immich.secrets.env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - postgres
    restart: always

  immich-machine-learning:
    container_name: immich-machine-learning
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - $PICTURES_DIR:/usr/src/app/upload
    env_file:
      - $ENV_DIR/immich.secrets.env
    environment:
      - NODE_ENV=production
    depends_on:
      - postgres
    restart: always

  immich-web:
    container_name: immich-web
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - $ENV_DIR/immich.secrets.env
    environment:
      # Rename these values for svelte public interface
      - PUBLIC_IMMICH_SERVER_URL=immich.$PERSONAL
    restart: always
  immich-proxy:
    container_name: immich-proxy
    image: altran1502/immich-proxy:release
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
    restart: always

immich.secrets.env:

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=postgres
DB_USERNAME=user
DB_PASSWORD=password
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Upload File Location
#
# This is the location where uploaded files are stored.
###################################################################################

UPLOAD_LOCATION=/raid/20 Pictures # absolute_location_on_your_machine_where_you_want_to_store_the_backup

###################################################################################
# JWT SECRET
#
# This JWT_SECRET is used to sign the authentication keys for user login
# You should set it to a long randomly generated value
# You can use this command to generate one: openssl rand -base64 128
###################################################################################

JWT_SECRET=x/G5zbTEvbyHJIiBLjB4dRRwWKjXUlbIl1bPrLtfoG8zwAtnIyheHuEjVDB/NLZAEAmQYtP1PN72hkjJOAMQqkBm4EevjvG8vT1gHwM0x34JdVmiusE51BrTHeeTUN60/VIcZ4Mk54HNIlrtxGowwXXnh3T9im8ryyC3V4O7zII=

###################################################################################
# Reverse Geocoding
#
# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM
####################################################################################

# DISABLE_REVERSE_GEOCODING=false
# REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
#
# Custom message on the login page, should be written in HTML form.
# For example:
# PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
####################################################################################

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################
# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
alextran1502 commented 1 year ago

I seem to be getting the same issue, but it seems like all of my environment vars should be set correctly

Error log from web interface


Error code 500

Internal Error

Verbose

{"message":"Internal Error"}

Error Log for immich-web:


Listening on 0.0.0.0:3000

Error: connect EADDRNOTAVAIL ::1:80 - Local (:::0)

    at internalConnect (node:net:953:16)

    at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18)

    at node:net:1044:9

    at processTicksAndRejections (node:internal/process/task_queues:78:11)

docker-compose.yml:


services:

  postgres:

    container_name: postgres

    env_file:

      - .env

      - $ENV_DIR/postgres.secrets.env

    image: postgres:latest

    labels:

      - traefik.enable=false

    restart: always

    volumes:

      - $CONF_DIR/postgresql:/var/lib/postgresql/data

  redis:

    container_name: redis

    env_file:

      - .env

    expose:

      - 6379

    image: redis:alpine

    labels:

      - traefik.enable=false

    restart: always

    volumes:

      - $CONF_DIR/redis:/data

  immich-server:

    container_name: immich-server

    image: altran1502/immich-server:release

    entrypoint: ["/bin/sh", "./start-server.sh"]

    volumes:

      - $PICTURES_DIR:/usr/src/app/upload

    env_file:

      - $ENV_DIR/immich.secrets.env

    environment:

      - NODE_ENV=production

    depends_on:

      - redis

      - postgres

    restart: always

  immich-microservices:

    container_name: immich-microservices

    image: altran1502/immich-server:release

    entrypoint: ["/bin/sh", "./start-microservices.sh"]

    volumes:

      - $PICTURES_DIR:/usr/src/app/upload

    env_file:

      - $ENV_DIR/immich.secrets.env

    environment:

      - NODE_ENV=production

    depends_on:

      - redis

      - postgres

    restart: always

  immich-machine-learning:

    container_name: immich-machine-learning

    image: altran1502/immich-machine-learning:release

    entrypoint: ["/bin/sh", "./entrypoint.sh"]

    volumes:

      - $PICTURES_DIR:/usr/src/app/upload

    env_file:

      - $ENV_DIR/immich.secrets.env

    environment:

      - NODE_ENV=production

    depends_on:

      - postgres

    restart: always

  immich-web:

    container_name: immich-web

    image: altran1502/immich-web:release

    entrypoint: ["/bin/sh", "./entrypoint.sh"]

    env_file:

      - $ENV_DIR/immich.secrets.env

    environment:

      # Rename these values for svelte public interface

      - PUBLIC_IMMICH_SERVER_URL=immich.$PERSONAL

    restart: always

  immich-proxy:

    container_name: immich-proxy

    image: altran1502/immich-proxy:release

    environment:

      # Make sure these values get passed through from the env file

      - IMMICH_SERVER_URL

      - IMMICH_WEB_URL

    ports:

      - 2283:8080

    depends_on:

      - immich-server

    restart: always

immich.secrets.env:


###################################################################################

# Database

###################################################################################

DB_HOSTNAME=postgres

DB_USERNAME=user

DB_PASSWORD=password

DB_DATABASE_NAME=immich

# Optional Database settings:

# DB_PORT=5432

###################################################################################

# Redis

###################################################################################

REDIS_HOSTNAME=redis

# Optional Redis settings:

# REDIS_PORT=6379

# REDIS_DBINDEX=0

# REDIS_PASSWORD=

# REDIS_SOCKET=

###################################################################################

# Upload File Location

#

# This is the location where uploaded files are stored.

###################################################################################

UPLOAD_LOCATION=/raid/20 Pictures # absolute_location_on_your_machine_where_you_want_to_store_the_backup

###################################################################################

# JWT SECRET

#

# This JWT_SECRET is used to sign the authentication keys for user login

# You should set it to a long randomly generated value

# You can use this command to generate one: openssl rand -base64 128

###################################################################################

JWT_SECRET=x/G5zbTEvbyHJIiBLjB4dRRwWKjXUlbIl1bPrLtfoG8zwAtnIyheHuEjVDB/NLZAEAmQYtP1PN72hkjJOAMQqkBm4EevjvG8vT1gHwM0x34JdVmiusE51BrTHeeTUN60/VIcZ4Mk54HNIlrtxGowwXXnh3T9im8ryyC3V4O7zII=

###################################################################################

# Reverse Geocoding

#

# Reverse geocoding is done locally which has a small impact on memory usage

# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable

# This ranges from 0-3 with 3 being the most precise

# 3 - Cities > 500 population: ~200MB RAM

# 2 - Cities > 1000 population: ~150MB RAM

# 1 - Cities > 5000 population: ~80MB RAM

# 0 - Cities > 15000 population: ~40MB RAM

####################################################################################

# DISABLE_REVERSE_GEOCODING=false

# REVERSE_GEOCODING_PRECISION=3

####################################################################################

# WEB - Optional

#

# Custom message on the login page, should be written in HTML form.

# For example:

# PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"

####################################################################################

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################

# Alternative Service Addresses - Optional

#

# This is an advanced feature for users who may be running their immich services on different hosts.

# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.

# Note: immich-microservices is bound to 3002, but no references are made

####################################################################################

IMMICH_WEB_URL=http://immich-web:3000

IMMICH_SERVER_URL=http://immich-server:3001

IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

You setup is different, I believe you have modified docker-compose file and you are using Traefik for reverse proxy, correct? Can yoi please open a new issue for this?