I
Immich•2y ago
tzeus

Help with docker compose behind nginx proxy manager

After looking around on github and reddit I still can't work out how to make immich work correctly. At the moment these are my setup files: docker-compose: https://privatebin.devol.it/?a88724d1dc848bb0#GPgQ4qnE1nGTDCYbAS6LYbdRE92wqGD1S7poctz1N5hg .env: https://privatebin.devol.it/?f9dc54ae6919e570#CaKm4nrs1HCo7Cs4HgeoV2bjKy53ViCXWsexvyNLZuoe So far all services start except altran1502/immich-machine-learning:release which fails with:
/bin/sh: 0: cannot open ./entrypoint.sh: No such file
/bin/sh: 0: cannot open ./entrypoint.sh: No such file
/bin/sh: 0: cannot open ./entrypoint.sh: No such file
/bin/sh: 0: cannot open ./entrypoint.sh: No such file
I'm not sure what to do next. I'm a bit confused after trying various things for the day. I've began with the standard setup present in the github. There I could only make it work on the local network via LAN ip and port. Then I tried the config from https://old.reddit.com/r/selfhosted/comments/wp1zxd/immich_and_nginx_proxy_manager/ (the last post) but server-release did not start for me because it also needed a typesense_api_key. After I added that to the env I got to this problem. Also I noticed there are two instances of altran1502/immich-server:release started, I have no idea if that's normal or not: https://privatebin.devol.it/?af85011ffb7b0ed2#778SQH2C59L9XhCidX2ELY64GmC5x68jgWHbuSYLWGn9 The server release pods have db related errors: https://privatebin.devol.it/?bde09697faeb6b01#BHTGV5yM7mE788T1ovdLf4MbAEfYw5rFEuGZsmBa2pmq
reddit
r/selfhosted - Immich and Nginx Proxy Manager
24 votes and 9 comments so far on Reddit
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
35 Replies
Alex Tran
Alex Tran•2y ago
Can you update your docker-compose? it is out of date
tzeus
tzeusOP•2y ago
I could, but I have many services running on it
Alex Tran
Alex Tran•2y ago
you can find the most up-to-date file here https://github.com/immich-app/immich/releases/tag/v1.68.0
GitHub
Release v1.68.0 · immich-app/immich
v1.68.0 Highlights Hello, Immich fans! Welcome to the v1.68.0 release of Immich. There are many QoS improvements in this version that you'll like. Some of the key highlights include: Add the a...
bo0tzz
bo0tzz•2y ago
There's a guide and up-to-date files at https://immich.app/docs/install/docker-compose
Docker Compose [Recommended] | Immich
Docker Compose is the recommended method to run Immich in production. Below are the steps to deploy Immich with Docker Compose.
Alex Tran
Alex Tran•2y ago
docker-compose.yml not docker-compose backage 😛
tzeus
tzeusOP•2y ago
I will check them out and come back. Most likely later today
bo0tzz
bo0tzz•2y ago
Also a note: we recommend against using watchtower/automatic updates because there's often some changes you need to make before updating and such
tzeus
tzeusOP•2y ago
Funny enough this was my starting point. But I couldn't get proxy to work correctly, since I'm already behing nginx proxy manager But I will try again tonight.... Still thinking that I'll run into the exact same issue as first time. Services up and running, but can only access them through the (immich proxy)LAN ip and port
bo0tzz
bo0tzz•2y ago
You can find a few notes on reverse proxies with Immich at https://immich.app/docs/administration/reverse-proxy
Reverse Proxy | Immich
When deploying Immich it is important to understand that a reverse proxy is required in front of the server and web container. The reverse proxy acts as an intermediary between the user and container, forwarding requests to the correct container based on the URL path.
tzeus
tzeusOP•2y ago
Yeah, I checked those out but to be honest I'm not that skilled so when it failed I moved on to the next possible solution. I'm using the nginx front end for my proxy and don't know what / where to edit. I'll give it another go, like I said Could someone tell me how to configure my nginx proxy manager? Screenshots would be great
Alex Tran
Alex Tran•2y ago
you can post this in #immich
tzeus
tzeusOP•2y ago
Thank you, I will
Alex Tran
Alex Tran•2y ago
what is your current setup now? Are you still using immich_proxy?
tzeus
tzeusOP•2y ago
Yes, still using it I reverted to the old compose files, which are the ones you recommend @Alex I think the app looks totally awesome, congrats on doing it. I have no idea how you manged to be honest :). I really have to go now, my kid is waiting on me, but I'll be back in a few hours. Apologies for this. If you want and have time reply and I'll check it out once I'm back if you're offline. Thanks again for all your hard work!
Alex Tran
Alex Tran•2y ago
so let's say your vm has ip of 192.168.1.15 where you host multiple services, right. And then you run Immich which can be accessed through address http://192.168.1.15:2283
tzeus
tzeusOP•2y ago
That is correct
Alex Tran
Alex Tran•2y ago
So your proxy will need to point to http://192.168.1.15:2283 not http://immich_proxy because I see that in the advanced tab of NPM
tzeus
tzeusOP•2y ago
It doesn't work. I get : Your connection isn't private
Attackers might be trying to steal your information from example.com (for example, passwords, messages or credit cards).
NET::ERR_CERT_AUTHORITY_INVALID
Subject: localhost

Issuer: localhost

Expires on: 29 Apr 2032

Current date: 22 Jul 2023

PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIUaKy5HwQfv6090+Ud6bo2BYvRpyLrTk/Iu+vve+h0 - this is actually longer
-----END CERTIFICATE-----
Attackers might be trying to steal your information from example.com (for example, passwords, messages or credit cards).
NET::ERR_CERT_AUTHORITY_INVALID
Subject: localhost

Issuer: localhost

Expires on: 29 Apr 2032

Current date: 22 Jul 2023

PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIUaKy5HwQfv6090+Ud6bo2BYvRpyLrTk/Iu+vve+h0 - this is actually longer
-----END CERTIFICATE-----
And this is what I get for all the iterations/attempts when I tried to configure npm
Alex Tran
Alex Tran•2y ago
have you been runing everything though NPM? or is this the first application you are running through NPM?
bo0tzz
bo0tzz•2y ago
Is this in your browser when you connect via npm? Because then that's just npm serving up an invalid https cert
tzeus
tzeusOP•2y ago
I'm running nextcloud aio, navidrome jellyfin and a few other containers through npm all work fine. The only thing I need to mention is that the address I configure is the IP of the docker service i.e. 172.20.0.x
Alex Tran
Alex Tran•2y ago
Can you try to use the IP of the local VM instead of the IP of docker service?
tzeus
tzeusOP•2y ago
Yep, doesn't work
Alex Tran
Alex Tran•2y ago
You are running NPM as a docker container?
bo0tzz
bo0tzz•2y ago
If npm is running on the same machine that won't work
tzeus
tzeusOP•2y ago
I'm running npm as a docker container, yes. All services are part of the same bridge network
bo0tzz
bo0tzz•2y ago
Can you try connecting to npm via http instead of https? You might have to change an npm setting to enable that for a moment
tzeus
tzeusOP•2y ago
I'm not sure what you mean by that. Change the proxy host scheme from https to http ?
bo0tzz
bo0tzz•2y ago
Yeah
tzeus
tzeusOP•2y ago
Both end up in the same result. If I query the logs on the ghcr.io/immich-app/immich-proxy:release the last line is:
2023/07/22 16:43:34 [error] 44#44: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.4.11, server: , request: "GET /api/server-info/stats HTTP/1.1", upstream: "http://172.20.0.47:3001/server-info/stats", host: "10.0.4.100:2283", referrer: "http://10.0.4.100:2283/admin/server-status"
2023/07/22 16:43:34 [error] 44#44: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.4.11, server: , request: "GET /api/server-info/stats HTTP/1.1", upstream: "http://172.20.0.47:3001/server-info/stats", host: "10.0.4.100:2283", referrer: "http://10.0.4.100:2283/admin/server-status"
10.0.4.11 is the ip of the machine I'm typing on Anything else I could try ??
Alex Tran
Alex Tran•2y ago
use Caddy? 😄 I think @jrasm91 also use NPM, he might be able to give you pointer when he has sometimes
jrasm91
jrasm91•2y ago
What is the issue...? If it is on the same network (both immich and npm) then you can set the destination to: http://immich-proxy:8080
tzeus
tzeusOP•2y ago
Woud that be in the host details, the advanced script or both?
jrasm91
jrasm91•2y ago
In npm? I would delete your advanced section with the custom location. Npm has source and destination fields under the proxy hosts. That should go under "destination"
jrasm91
jrasm91•2y ago
No description

Did you find this page helpful?