I’m trying to set up the new Immich module but so far my config doesn’t work.
{
containers.immich = {
autoStart = true;
bindMounts = {
"/var/lib/immich" = {
hostPath = "/mnt/sdb1/photos";
isReadOnly = false;
};
};
config =
{ pkgs, ... }:
{
services = {
immich = {
enable = true;
host = "immich.***.ts.net";
};
tailscale = {
enable = true;
useRoutingFeatures = "server";
interfaceName = "userspace-networking";
};
};
system.stateVersion = "24.05";
};
};
}
As you can see, I have it in a container and I use Tailscale.
I ran tailscale serve --bg 3001
. I was wondering why this module uses port 3001 instead of 2283 like the official implementation?
I also ran journalctl -xeu postgresql
:
Oct 11 16:32:43 immich systemd[1]: Starting PostgreSQL Server...
░░ Subject: A start job for unit postgresql.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit postgresql.service has begun execution.
░░
░░ The job identifier is 93.
Oct 11 16:32:43 immich postgres[260]: [260] LOG: starting PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.3.0, 64-bit
Oct 11 16:32:43 immich postgres[260]: [260] LOG: could not bind IPv6 address "::1": Address already in use
Oct 11 16:32:43 immich postgres[260]: [260] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Oct 11 16:32:43 immich postgres[260]: [260] LOG: could not bind IPv4 address "127.0.0.1": Address already in use
Oct 11 16:32:43 immich postgres[260]: [260] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Oct 11 16:32:43 immich postgres[260]: [260] WARNING: could not create listen socket for "localhost"
Oct 11 16:32:43 immich postgres[260]: [260] FATAL: could not create any TCP/IP sockets
Oct 11 16:32:43 immich postgres[260]: [260] LOG: database system is shut down
Oct 11 16:32:43 immich systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit postgresql.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Oct 11 16:32:43 immich systemd[1]: postgresql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit postgresql.service has entered the 'failed' state with result 'exit-code'.
Oct 11 16:32:43 immich systemd[1]: Failed to start PostgreSQL Server.
░░ Subject: A start job for unit postgresql.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit postgresql.service has finished with a failure.
░░
░░ The job identifier is 93 and the job result is failed.
Aren’t my containers separated from each other? What do I need to do to fix this?