How to Install Immich on Your Synology NAS

How to Install Immich on Your Synology NAS

Immich is a very high performance self-hosted photo and video backup solution directly from your mobile phone. You can run Immich on your Synology NAS and it lets you upload photos and videos from your browser or mobile phone via the dedicated Android Immich app or the iOS Immich app. The Immich user interface feels like Google Photos, especially if you are using the mobile apps. In this step by step guide I will show you how to install Immich on your Synology NAS using Docker and Portainer.

💡Note: This guide works perfectly with the latest Immich v1.79.1 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it immich. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Immich Synology NAS Set up 1

  • STEP 4

Now create six new folders inside the immich folder that you created at STEP 3 name them cachedb, micro, redis, typesense, upload. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.

Immich Synology NAS Set up 2 2new 2024

  • STEP 5

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 6

In the Name field type in immich. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  immich-redis:
    image: redis
    container_name: Immich-REDIS
    hostname: immich-redis
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping || exit 1"]
    user: 1026:100
    environment:
      - TZ=Europe/Bucharest
    volumes:
      - /volume1/docker/immich/redis:/data
    restart: on-failure:5

  immich-db:
    image: postgres
    container_name: Immich-DB
    hostname: immich-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "immich", "-U", "immichuser"]
      interval: 10s
      timeout: 5s
      retries: 5
    user: 1026:100
    volumes:
      - /volume1/docker/immich/db:/var/lib/postgresql/data
    environment:
      - TZ=Europe/Bucharest
      - POSTGRES_DB=immich
      - POSTGRES_USER=immichuser
      - POSTGRES_PASSWORD=immichpw
    restart: on-failure:5

  immich-server:
    image: altran1502/immich-server:release
    command: ["start-server.sh"]
    container_name: Immich-SERVER
    hostname: immich-server
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
    restart: on-failure:5
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started
      typesense:
        condition: service_started

  immich-microservices:
    image: altran1502/immich-server:release

    command: ["start-microservices.sh"]
    container_name: Immich-MICROSERVICES
    hostname: immich-microservices
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
      - /volume1/docker/immich/micro:/usr/src/app/.reverse-geocoding-dump
    restart: on-failure:5
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started
      typesense:
        condition: service_started

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    container_name: Immich-LEARNING
    hostname: immich-machine-learning
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
      - /volume1/docker/immich/cache:/cache
    restart: on-failure:5
    depends_on:
      immich-db:
        condition: service_started

  immich-web:
    image: altran1502/immich-web:release
    container_name: Immich-WEB
    hostname: immich-web
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
    env_file:
      - stack.env
    restart: on-failure:5
    depends_on:
      - immich-server

  immich-proxy:
    image: altran1502/immich-proxy:release
    logging:
      driver: none
    container_name: Immich-PROXY
    hostname: immich-proxy
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: curl -f http://localhost:8080/ || exit 1
    environment:
      - IMMICH_SERVER_URL=http://immich-server:3001
      - IMMICH_WEB_URL=http://immich-web:3000
    ports:
      - 8212:8080
    restart: on-failure:5
    depends_on:
      - immich-server
      
  typesense:
    container_name: Immich-TYPESENSE
    image: typesense/typesense:0.25.0
    environment:
      - TYPESENSE_API_KEY=MariushostingMariushostingMari13
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - /volume1/docker/immich/typesense:/data
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for TYPESENSE_API_KEY and add your own API KEY. MariushostingMariushostingMari13 is an example for a API KEY. You should invent your own Value. Add 32 random characters, both letters and numbers.

Immich Synology NAS Set up 3 new 2024

  • STEP 7

Click the Upload button after Web editor. Download the stack.env file by clicking the blue link below and then upload it from your computer in the “Load variables from .env files“. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

👉🏻Download stack.env file

Immich Synology NAS Set up 4

  • STEP 8

Add your own Time Zone value. In my case, Europe/Bucharest. (Select your current Time Zone from this list.) Add your own TYPESENSE_API_KEY that you have previously created at STEP 6. Follow the instructions in the image below.

Immich Synology NAS Set up 5 new 2023

  • STEP 9

After you make the change and add your own TZ value at STEP 8, click the Web editor button. Follow the instructions in the image below.

Immich Synology NAS Set up 4b new 2024

  • STEP 10

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection. Note: Immich requires approximately 4 GB of image files to be downloaded.

Immich Synology NAS Set up 6 new 2024

  • STEP 11

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Immich Synology NAS Set up 8

  • STEP 12

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 13

Please wait approximately 2 minutes for the installation to be completed or you will get a blank page if you try to connect too soon. The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-ip-address:8212 Click Getting Started. Follow the instructions in the image below.

Immich Synology NAS Set up 9 new 2023

  • STEP 14

Add your own credentials then click Sign Up. Follow the instructions in the image below.

Immich Synology NAS Set up 10 new 2023

  • STEP 15

Add your own Email and Password that you have previously created at STEP 14. Click Login. Follow the instructions in the image below.

Immich Synology NAS Set up 11 new 2023

  • STEP 16

If you like, you can choose to switch to the Dark Mode theme. Click Upload to start uploading your own photos and videos. Follow the instructions in the image below.

Immich Synology NAS Set up 13 new 2024

  • STEP 17

If you want, you can create a personalized albums. On the left sidebar click on Albums. Follow the instructions in the image below.

Immich Synology NAS Set up 14 new 2024

  • STEP 18

Upload your photos, then give a name to the Album. Follow the instructions in the image below.

Immich Synology NAS Set up 15

  • STEP 19

Watch your favorite video!

Immich Synology NAS Set up 16

  • STEP 20

Run Immich via HTTPS so that you can use it even when you are not at home.

Enjoy Immich!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Immich container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Friday / September 22nd, 2023 at 7:40 AM