Immich: Difference between revisions

From NixOS Wiki
Onny (talk | contribs)
Cleanup config
Dander (talk | contribs)
show, don't tell; follow MoS
Line 1: Line 1:
[https://immich.app Immich] is an open source photo and video management solution, designed to provide a self-hosted alternative for managing and backing up photos and videos, with a focus on privacy and ease of use.
[https://immich.app Immich] is a self-hosted photo and video management solution.
 
== Setup ==
 
The following example configuration will enable Immich locally.


== Installation ==
To install Immich, add the following to your NixOS configuration:
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.enable = true;
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.enable = true;
}}To see more options, visit the [https://search.nixos.org/options?channel=unstable&query=services.immich Immich module's options page].
services.immich.port = 2283;}}
 
[https://search.nixos.org/options?channel=unstable&query=services.immich More options] are available.
After applying the above configuration you will be able to access Immich at http://localhost:2283.


=== Hardware Accelerated Transcoding using VA-API ===
== Tips and Tricks ==
Before anything else, make sure you have configured hardware acceleration on your system as described in [[Accelerated Video Playback]].


To make use of hardware accelerated video transcoding using VA-API,  add your Immich user to the <code>render</code> and <code>video</code> groups.
=== Enabling Hardware Accelerated Video Transcoding ===
Add the Immich user to the <code>render</code> and <code>video</code> groups, and enable [[Accelerated Video Playback]] on your system:{{file|/etc/nixos/configuration.nix|nix|3=hardware.graphics = {
# ...
# See: https://wiki.nixos.org/wiki/Accelerated_Video_Playback
}
users.users.immich.extraGroups = [ "video" "render" ]; }}


If you are using the default <code>immich</code> user, you can use the following snippet to enable VA-API support.{{file|/etc/nixos/configuration.nix|nix|3=users.users.immich.extraGroups = [ "video" "render" ];
=== Using Immich behind Nginx ===
}}
 
=== Reverse Proxy ===
 
A typical [[nginx]] configuration to multiplex Immich with other web services might look like:


This is a typical [[Nginx]] configuration for Immich:
{{file|/etc/nixos/configuration.nix|nix|3=services.nginx.virtualHosts."immich.example.com" = {
{{file|/etc/nixos/configuration.nix|nix|3=services.nginx.virtualHosts."immich.example.com" = {
   enableACME = true;
   enableACME = true;
Line 31: Line 28:
};
};
}}
}}
[[Category:Server]]
[[Category:Server]]
[[Category:Web Applications]]
[[Category:Web Applications]]

Revision as of 12:54, 27 December 2024

Immich is a self-hosted photo and video management solution.

Installation

To install Immich, add the following to your NixOS configuration:

/etc/nixos/configuration.nix
services.immich.enable = true;
services.immich.port = 2283;

More options are available.

Tips and Tricks

Enabling Hardware Accelerated Video Transcoding

Add the Immich user to the render and video groups, and enable Accelerated Video Playback on your system:

/etc/nixos/configuration.nix
hardware.graphics = { 
 # ...
 # See: https://wiki.nixos.org/wiki/Accelerated_Video_Playback
}
users.users.immich.extraGroups = [ "video" "render" ];

Using Immich behind Nginx

This is a typical Nginx configuration for Immich:

/etc/nixos/configuration.nix
services.nginx.virtualHosts."immich.example.com" = {
  enableACME = true;
  forceSSL = true;
  locations."/" = {
    proxyPass = "http://[::1]:${toString config.services.immich.port}";
    proxyWebsockets = true;
  };
};