User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:immich [2025/02/24 08:05] willyservices:immich [2025/03/13 14:41] (current) – [Installation] willy
Line 3: Line 3:
 [[https://immich.app/|Immich]] is a modern photo management web application which aims to be similar to Google Photo. It can be uses to backup phone photos and also manage older collection of older photos. [[https://immich.app/|Immich]] is a modern photo management web application which aims to be similar to Google Photo. It can be uses to backup phone photos and also manage older collection of older photos.
  
-Immich is fairly new player in the game but it's growing a lot and is gaining a lot of traction. It's heavily under development and very polished.  +Immich come along long way in the past year, and even if i had initially tried it out but abandoned due to the lack of some basic (for my use case) featuresi can say that as little as less than one year later it proved not only to be **the one** top photo management backup and gallery solution for self-hostingbut a damn good one tooThe devs really rocks and work hard, and Immich itself is so flexible that there are little excuses not to use it!
-Overall it's probably the best solution **but**: +
-  * Doesn't support folders as albums (sorrylong term solution **must** be stored in folders and not only in a database) +
-  * Uses a database for metadatawhich is not good again for long term solution. +
-  * It's been a bit unclear since it was acquired by Futo's. Futo's stance on Open Source is unclear to me. +
-  * After moving to Futo they added some controversial support system (on which they also backtracked), and it seemed not very well tought of. +
-  * Devs don't seems to care too much on user needs and keep plowing ahead on their roadmap.+
  
-Immich, at this time, does not support //base_url// out of the box. A lot of discussion is going on around the topic and somebody found a nice fix using a specific NGINX setup, which i will describe in this page.+Immich, at this time, still does not support //base_url// out of the box. A lot of discussion is going on around the topic and somebody found a nice fix using a specific NGINX setup, but think it's better to stick to subdomains for Immich, at least until it will __officially__ support sub-paths. Anyway, you should really use subdomains with something so complex as Immich to leverage cross-domain security.
  
-Overalli stopped using it.+While installing Immich overall is not a huge taskyou should really read carefully this page **and** all the very good documentation on Immich website itself.
  
-===== Installation ===== 
  
 +===== Installation =====
  
-Use **photos** user and groupsee [[services:photomanagement|Photos Management Server]].+I will assume you will store all Immich stuff under **/data/photos**. You will need two folders here: 
 +  * /data/photos/Library: will contain your photos and all additional Immich files (cachethumbnails, encoded videos...). You want to backup the //library// (yes, lowercase!) and //backups// subfolders in here. 
 +  * /data/photos/immich_databasewill contain PostgreSQL stuff, you do not want to backup this folder.
  
 Immich needs to be installed using a docker compose file. This is the official and only supported installation method. I will show you, of course, how to run it rootless with podman. Immich installation is detailed [[https://immich.app/docs/install/docker-compose|here]], and i suggest you take a look at. Immich needs to be installed using a docker compose file. This is the official and only supported installation method. I will show you, of course, how to run it rootless with podman. Immich installation is detailed [[https://immich.app/docs/install/docker-compose|here]], and i suggest you take a look at.
  
-I assume you have already created the photo user and group, but in case you didn't, here you go+I assume you have already created the photo user and group (see [[selfhost:photomanagement|here]], but in case you didn't, here you go:
-So, let's get going. Create an **immich** user:+
 <code bash> <code bash>
 useradd -d /data/daemons/photos photos useradd -d /data/daemons/photos photos
 +mkdir /data/photos
 +mkdir /data/photos/Library
 +mkdir /data/photos/immich_database
 </code> </code>
  
Line 54: Line 52:
 </code> </code>
  
- +Please note that you can have more than one mount, ideally one for each folder tree that contains photos you want to add as //external library// to Immich.
-Please note that you can have more than one mount, ideally one for each folder tree that contains photos you want to add as external library to Immich.+
  
 edit the **/data/daemons/immich/.env** file to adapt at least your //Uploads// and //external// folder: edit the **/data/daemons/immich/.env** file to adapt at least your //Uploads// and //external// folder:
 <code> <code>
-UPLOAD_LOCATION=/data/Media/Photos/Uploads +# The location where your uploaded files are stored 
-EXTERNAL_PATH=/path/to/your/external/photos/trees +UPLOAD_LOCATION=/data/photos/Library 
-IMMICH_VERSION=release+# The location where your database files are stored 
 +DB_DATA_LOCATION=/data/photos/immich_database
 </code> </code>
 +
 +You can fine-tune the rest of the env file to your needs.
 +
  
 ===== Configuration ===== ===== Configuration =====
 +
 +You should follow all the steps below before starting using Immich for real, as they have some implications and it's better to sort out stuff before, than reorganize everything later. Immich does a pretty great job of ensuring it's consistent and changeable at a later point in time tough. Still better to dedicate a little time to think stuff out before than later.
 +
  
 ==== External Library setup ==== ==== External Library setup ====
Line 96: Line 100:
 Storage templates let's you choose how Immich should store photos and videos on your filesystem. This is specially useful if you like to sort your photos for albums and/or year-month-day. I think this is a very powerful feature of Immich and a very welcome addition to it's features. Storage templates let's you choose how Immich should store photos and videos on your filesystem. This is specially useful if you like to sort your photos for albums and/or year-month-day. I think this is a very powerful feature of Immich and a very welcome addition to it's features.
  
-My template is: **{{y}}/{{#if album}}{{album}}{{else}}Altre{{/if}}/{{filename}}** and that can be setup from //Immich web gui -> administration -> settings -> storage templates//.+My template is:  
 +<code> 
 +{{y}}/{{#if album}}{{album}}{{else}}Others{{/if}}/{{filename}} 
 +</code> 
 + 
 +this template will store folders by **year** and **album**. If the photo is not stored in an album, it will go into a folder called **Others**. 
 + 
 +That can be setup from //Immich web gui -> administration -> settings -> storage templates//.
  
 You also need to __enable__ it from the same setting area. Remember to run the update storage templates task if you change it. Also, remember to check that it's working as intended before you have thousand of photos stored the wrong way. You also need to __enable__ it from the same setting area. Remember to run the update storage templates task if you change it. Also, remember to check that it's working as intended before you have thousand of photos stored the wrong way.
Line 103: Line 114:
 ==== SSO authentication setup ==== ==== SSO authentication setup ====
  
-==== Bakcups setup ====+Immich support direct integration with [[selfhost:sso|Authelia SSO]], specific instructions can be found [[https://www.authelia.com/integration/openid-connect/immich/|on this page]]. 
 + 
 +First of all, you need to configure Authelia with a new client: 
 +<code> 
 +identity_providers: 
 +  oidc: 
 +    ## The other portions of the mandatory OpenID Connect 1.0 configuration go here. 
 +    ## See: https://www.authelia.com/c/oidc 
 +    clients: 
 +      - client_id: << see below to generate ClientID >> 
 +        client_name: 'immich' 
 +        client_secret: << see below to generale ClientSecret >> 
 +        public: false 
 +        authorization_policy: 'one_factor' 
 +        redirect_uris: 
 +          - 'https://immich.mydomain.com/auth/login' 
 +          - 'https://immich.mydomain.com/user-settings' 
 +          - 'app.immich:///oauth-callback' 
 +        scopes: 
 +          - 'openid' 
 +          - 'profile' 
 +          - 'email' 
 +        userinfo_signed_response_alg: 'none' 
 +</code> 
 + 
 +To generate a ClientID: 
 +<code bash> 
 +authelia crypto rand --length 72 --charset rfc3986 
 +</code> 
 +This information will need to copied to both authelia config and immich settings. 
 + 
 +To generate a Client Secret: 
 +<code bash> 
 +authelia crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986 
 +</code> 
 +Please note **both** the hash and the password itself! You will need the password itself in the next step. 
 + 
 +Then you need to configure Immich to use Authelia SSO, so go to //Immich web gui → administration → settings → Authentication settings// and enter the following information: 
 +  * Issuer URL: https://auth.example.com/.well-known/openid-configuration. 
 +  * Client ID: << the generated ClientID >>. 
 +  * Client Secret: insecure_secret. 
 +  * Scope: openid profile email. 
 +  * Button Text: Login with Authelia. 
 +  * Auto Register: Enable if desired. 
 + 
 + 
 + 
 + 
 +==== Bakcup setup ====
  
 I assume you have setup a backup schedule like described [[selfhost:backup|here]], with restic. I assume you have setup a backup schedule like described [[selfhost:backup|here]], with restic.
Line 181: Line 240:
 immich upload --recursive directory/ immich upload --recursive directory/
 </code> </code>
- 
  
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information