Configuration with NPM Proxy Manager and Unraid
I need some help to configure a NPM proxy manager that reside on a different machine. Immich works with a local IP (Example http://192.168.8.105:8082) but if I configure it with NPM with standard settings I can access it but I cannot upload any image via web gui or APP.
I found this https://immich.app/docs/administration/reverse-proxy/ and this https://www.reddit.com/r/selfhosted/comments/wp1zxd/immich_and_nginx_proxy_manager/ I tried exposing port 3001 and 2283 and configure the NPM in the advance section with some suggested configs but what I get is sometimes a blank screen and sometimes a 502: `
502 Bad Gateway
ue@https://mydomain_removed_for_privacy/_app/immutable/chunks/fetch-client.DbGu7UYN.js:1:2908 ie@https://mydomain_removed_for_privacy/_app/immutable/chunks/fetch-client.DbGu7UYN.js:1:2832 ` My Unraid has address 192.168.8.105, I set the port 8082 for the webgui My NPM has address 192.168.8.3 and is in another machine in a Proxmox container. Works fine for everything else.
The Forward Port should be 8082 in your case
I've tried various configs. If I ignore the Advanced tab the service works but I cannot upload photos.
If I place the config in the advanced tab I get various results but none works. For example if I place 8082 as proxypass port I get a blank screen. Any other port get me a 502 error
What are you trying to achieve with the custom /api location ?
Yeah I guess its wrong the /api bit. Didnt read completely the reddit thread. But even if I remove completely the config from the advanced tab the problem remains. I cannot upload. It errors out.
It stays like this for a while and then
Error
This happens only with the proxy manager. If I use the IP:port directly it works.
Also, I set up the correct external domain in Immich settings
Can you share your docker logs and browser errors when you upload an asset ?
The logs from the Docker seems normal:
[Nest] 391 - 04/02/2024, 11:12:24 AM LOG [EventRepository] Websocket Disconnect: 89A6ej2468yRNbSdAAAz [Nest] 391 - 04/02/2024, 11:12:49 AM LOG [EventRepository] Websocket Connect: UAZPCckXLm46xZr_AAA3 [Nest] 391 - 04/02/2024, 11:13:12 AM LOG [EventRepository] Websocket Disconnect: 9_OWfdknhsRy1r2hAAA1 [Nest] 391 - 04/02/2024, 11:13:37 AM LOG [EventRepository] Websocket Connect: aDltc3OEb8eayqCTAAA5 [Nest] 391 - 04/02/2024, 11:13:59 AM LOG [EventRepository] Websocket Disconnect: UAZPCckXLm46xZr_AAA3 [Nest] 391 - 04/02/2024, 11:14:24 AM LOG [EventRepository] Websocket Connect: HeuVInbFG8JUSizrAAA7 [Nest] 391 - 04/02/2024, 11:14:47 AM LOG [EventRepository] Websocket Disconnect: aDltc3OEb8eayqCTAAA5 [Nest] 391 - 04/02/2024, 11:15:11 AM LOG [EventRepository] Websocket Connect: qMuTTrMGaiuIG5z9AAA9
Firefox debug:
I removed the domain for privacy
Weird. Can you try :
- without your Firefox extensions
- with another browser
- without SSL
I tried with Firefox no extensions, same output. Tried with Chrome no extensions:
Tried with no SSL, same output. I also changed the Server Settings in Immich and replace https with http Same thing
Mmh, you have a timeout when you're uploading an asset. In NPM, is the advanced section completely empty ?
At the moment yes
Also, the bottom-right corner where the Server status is. With the proxy It says Server Status Offline and Version Unknown. Without the proxy (http://192.168.8.105:8082) it works: Server status Online and Version 1.100.0.
The proxy is blocking something but its really strange. I have configured a lot of services with this proxy and none has this kind of problem.
The server version and status use websockets. It's for sure a network issue, double check your setup, firewall...
I had a big facepalm I configured two network interfaces on the proxy manager because I have another VLAN. I guess that the traffic was routed on the wrong one. I disabled the one that wasnt in the same network as Immich and voila, now works. I guess that now I have to check why it does that but at least is not a NPM or Immich problem.
The default settings works fine now. For future reference and who will possibly read this: I enabled Websocket support, SSL with HTTP/2 and HSTS, nothing in the advanced tab