Trust Self Signed Certificates with Immich - OAuth Setup #18614
Replies: 2 comments 3 replies
-
To get this to work correctly, I had to also configure a DNS for the immich_server service so that the oauth2 endpoint both the certificate and the immich service itself knew where to go to talk to the OAuth service. services:
immich-server:
...
dns:
- ${DNS_SERVER}
... |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you a lot for this, but despite doing precisely what you said, I'm still having the same error :
To provide you with some context, everything is running on a proxmox host with two interfaces (vmbr0 : 192.168.1.20/24 & vmbr1 : 10.10.10.254/24) I have one domain controller VM (samba) at 10.10.10.1 and I have configured authelia (at 10.10.10.4:9091) to authenticate against the ldap. It works fine. I have enabled TLS using a trusted chain with the domain's CA certificate and authelia'CA certificate and key. I have an NGINX Reverse Proxy Manager at 192.168.1.X and 10.10.10.253. I have forwarded the authelia and immich hosts and I can access the both of them. However, I can't get immich to work with authelia.
I believe that the issue occurs because while my DC (which I set as the DNS in the docker-compose.yaml) resolves auth.home.lan at 10.10.10.4, NPM redirects auth.home.lan at 10.10.10.4:9091 directly. However, I do not know how to fix this. I can share both my Authelia and Immich configs if need be. I don't know what to try next... Any chance you could help ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was setting up Authentik to function as an OAuth2/OpenID provider for Immich, but ran into a problem where I'd get the following, somewhat vague error.
This is despite the fact that I could
curl
my Authentik server just fine at theISSUER_URL
endpoint I have saved in Immich. However, if I pointed at the HTTP endpoint for Authentik instead, OAuth worked just fine.Turns out that Immich was having issues with the self-signed CA I used to issue the HTTPS cert for Authentik, which is using a reverse proxy I set up with NGINX. It would work at the HTTP endpoint, because I'd point directly to port 9000, which is what the Authentik container exposes by default.
Fortunately, this is a relatively easy fix for Immich!
/etc/pki/ca-trust/source/anchors/
a. man page for update-ca-trust.
docker-compose.yml
file, and for theimmich-server
service, and add a mount to the/certs
directory. In my case, I point directly to where my custom CA files are at on my Enterprise Linux distribution (my case Rocky Linux). Don't add theZ
flag if you don't have SELinux on your system.environment
block and point to the specific CA file that issued your OAuth server's HTTPS cert.docker compose down && docker compose up -d
, and try logging in via OAuth again. Fixed!Here's the full reference for the
immich-server
service:Beta Was this translation helpful? Give feedback.
All reactions