Immich: Difference between revisions

Arcstur (talk | contribs)
Using borg for backups: use "config.services.immich.mediaLocation" instead of hardcoding the path
Add note for setting Immich log level and reducing Redis log verbosity.
 
(4 intermediate revisions by one other user not shown)
Line 5: Line 5:
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.enable = true;
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.enable = true;
services.immich.port = 2283;}}
services.immich.port = 2283;}}
More options are available: {{nixos:option|services.immich.}}  
 
To access Immich from other devices via network, add the following as well:
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.host = "0.0.0.0";
services.immich.openFirewall = true;}}
 
To change Immich’s default log verbosity, you can set the [https://docs.immich.app/install/environment-variables#general <code>IMMICH_LOG_LEVEL</code>] environment variable:
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.environment.IMMICH_LOG_LEVEL = "warn";}}
More options are available: {{nixos:option|services.immich.}}


== Tips and Tricks ==
== Tips and Tricks ==
=== Reducing Log Verbosity Of Redis ===
As noted in the [https://docs.immich.app/FAQ/#how-can-i-reduce-the-log-verbosity-of-redis Immich FAQ], you can reduce Redis log verbosity by setting the log level to warning. In NixOS this is done with the [https://search.nixos.org/options?show=services.redis.servers.%3Cname%3E.logLevel log Level option] of the Redis server that Immich uses:
{{file|/etc/nixos/configuration.nix|nix|3=services.redis.servers.immich.logLevel = "warning";}}
{{info|Valid log levels for Redis are <code>debug</code>, <code>verbose</code>, <code>notice</code>, and <code>warning</code>.}}
=== Custom Media Location ===
While the official Immich documentation recommends modifying <code>UPLOAD_LOCATION</code> environmental variable for Docker build, NixOS does not support modifying it. Instead, {{nixos:option|services.immich.mediaLocation}} may be used, which simply sets [https://docs.immich.app/install/environment-variables/ <code>IMMICH_MEDIA_LOCATION</code>] variable, while this is not recommended in the official documentation:
{{file|/etc/nixos/configuration.nix|nix|3=services.immich.mediaLocation = "/var/lib/immich";
}}
{{warning|If you have used Immich before, changing this option will completely stop Immich service, disabling access from browser. You may need to reset / remove Postgresql database.}}
{{info|If you only need to change the location where raw data is stored, [https://docs.immich.app/guides/external-library/ External Libraries] may be used.}}


=== Enabling Hardware Accelerated Video Transcoding ===
=== Enabling Hardware Accelerated Video Transcoding ===
Line 57: Line 81:
== Troubleshooting ==
== Troubleshooting ==


=== Fixing postgresql database issue after 25.05 upgrade ===
=== Fixing PostgreSQL database issue after 25.05 upgrade ===


==== Postgresql collation version mismatch ====
==== PostgreSQL collation version mismatch ====
After upgrading you might run into an issue like this, leading to immich-server continuously failing and restarting: <syntaxhighlight>Jul 01 14:23:12 server2 immich[178592]: Postgres notice: {
After upgrading you might run into an issue like this, leading to immich-server continuously failing and restarting: <syntaxhighlight>Jul 01 14:23:12 server2 immich[178592]: Postgres notice: {
Jul 01 14:23:12 server2 immich[178592]:  severity_local: 'WARNING',
Jul 01 14:23:12 server2 immich[178592]:  severity_local: 'WARNING',