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: Immich requires a CPU with AVX support. After running extensive tests, the NAS models that DO NOT support Immich at all due to hardware limitations are the 20+ series like the DS220+DS720+DS920+, DS1520+. So only NAS models from 2021 as well as older ones work for Immich, but not the 20x series. Note: Read my recommendations for NAS models that work perfectly with Docker.

💡Note: This guide works perfectly with the latest Immich v1.50.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 five new folders inside the immich folder that you created at STEP 3 name them data, db, micro, redis, upload. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.

Immich Synology NAS Set up 2 new

  • 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: always

  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: always

  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./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: always
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./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: always
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    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/data:/usr/src/app/upload
    restart: always
    depends_on:
      immich-db:
        condition: service_started

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    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: always
    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: always
    depends_on:
      - immich-server

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.)

Immich Synology NAS Set up 3

  • 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.

👉🏻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.)

Immich Synology NAS Set up 5

  • 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

  • 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

  • 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

  • STEP 14

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

Immich Synology NAS Set up 10

  • 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

  • STEP 16

Your Immich instance will look like this.

Immich Synology NAS Set up 12

  • STEP 17

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

  • STEP 18

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

  • STEP 19

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

Immich Synology NAS Set up 15

  • STEP 20

Watch your favorite video!

Immich Synology NAS Set up 16

  • STEP 21

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

Enjoy Immich!

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 / March 3rd, 2023 at 12:48 AM