I
Immich2y ago
meh

immich + NGINX proxy manager

Hello, I have been trying to get this to work for the past few hours but no luck. Environment: immich on docker host with IP:192.168.2.20 NPM on docker host with IP: 192.168.2.30 1. NPM settings: 2. NPM advance settings section 3.location /api { # Compression gzip_static on; gzip_min_length 1000; gzip_comp_level 2; proxy_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; proxy_buffers 64 4k; proxy_force_ranges on; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; rewrite /api/(.*) /$1 break; proxy_pass http://192.168.2.20:3001; } I keep getting error on android app "could not connect to server" I keep getting screenshot#4 where the server appears offline on immich web. @jrasm91 I have seen your multiple posts where you have been using NPM successfully. What obvious mistake I am making here, if you can help please whenever you get a chance.
No description
No description
No description
No description
14 Replies
jrasm91
jrasm912y ago
Are the docker containers in the same network or no? I don't use the advanced location settings, just send everything to the proxy container.
meh
mehOP2y ago
They are not, running on 2 different hosts.
jrasm91
jrasm912y ago
Does anything change when you remove the advanced location stuff? Are you able to access the web UI? How did you login? You can verify API connectivity by browsing /api/server-info/ping Can you also verify everything works as expected when you browse it by local IP? Ie http://192.168.0.20:2283?
meh
mehOP2y ago
Yup local ip works fine both on mobile & web. After removing the advanced stuff, I can login via web just fine and all functions load. But cannot login via app using domain.com/api And get this when i ping the api (after removing advance stuff) {"res":"pong"} Cleared cache & data for the Android app. No luck unfortunately So it's just the app that's the issue at this point. My limited thinking is it's cause of the /api path in the url I have other services I am able to proxy successfully on the same host as immich, so I think connectivity is not an issue
jrasm91
jrasm912y ago
Can you login/access the app via https + tld via mobile browser?
meh
mehOP2y ago
Sorry app via browser? I can access immich web via mobile browser and can login using https://+tld
jrasm91
jrasm912y ago
I meant the web app, yes. So it's not a proxy / network issue. You can access the web via IP and tld via the mobile device, right?
meh
mehOP2y ago
Yup both are accessible via mobile device
jrasm91
jrasm912y ago
The mobile app has some pretty strict requirements for https. Are you using a let's encrypt certificate? Does your url include https:// and or /api at the end?
meh
mehOP2y ago
Yup using let's encrypt cert obtained vi dns challenge. Omg I want using https in the app Wasn't* I thought npm will do a redirect as i used http in the npm config for immich Talking about this part It works now Seriously kept trying different npm configs for 3 straight hours And it was the https part in the app itself
jrasm91
jrasm912y ago
You don't have to add https or /API btw photos.immich.app would work and it tries https + /api by default But http://photos.immich.app would try just http lol
meh
mehOP2y ago
Thanks a lot again for your help.
ddshd
ddshd2y ago
That doesn’t work for me on the app Without /api works but not without http or https
jrasm91
jrasm912y ago
Interesting.

Did you find this page helpful?