I
Immich•2y ago
Rebelius

How can I config the reverse proxy (SWAG) with different docker networks?

Hello everyone. I have configured my reverse proxy with swag, and it is working great, but only for the services inside its docker network called "multimedia" As immich has its own network "immich", I dont know how should i do to connect to my immich through swag. I created the CNAME in my domain, but when I try to reach immich, it lands in the swag page. Right now, im using dockersocket to auto configure swag, but when I was trying to do it manually, there is no immich file in the nginx preconfigurated files. Can you explain me how to solve this?
No description
20 Replies
Rebelius
RebeliusOP•2y ago
No description
Rebelius
RebeliusOP•2y ago
btw, I tried ading "&& docker network connect immich swag" ? the the swag post arguments and dockersocket, with no luck
Alex Tran
Alex Tran•2y ago
Immich expose port 2283 to the local network so you can reverse proxy to http://local-imich-ip:2283 and it should work
Rebelius
RebeliusOP•2y ago
is it 172.29.0.9?
No description
Alex Tran
Alex Tran•2y ago
From the screenshot it looks like 192.168.1.23:2283
Rebelius
RebeliusOP•2y ago
yes, that works. but my intention is to be able to acces from the internet
Alex Tran
Alex Tran•2y ago
understood, so proxy back to that ip address, then it should work, right?
Rebelius
RebeliusOP•2y ago
I guess, but I knwo nothing about this hahaha
Alex Tran
Alex Tran•2y ago
is your proxy sservice also running as a docker container?
Rebelius
RebeliusOP•2y ago
yes it is SWAG in this photo
Alex Tran
Alex Tran•2y ago
Can you proxy service ping 192.168.1.23?
Rebelius
RebeliusOP•2y ago
the problem is that I used different docker networks
Alex Tran
Alex Tran•2y ago
ah, I see
Rebelius
RebeliusOP•2y ago
If i type that address, I get to swag page
Alex Tran
Alex Tran•2y ago
Hmm not sure, I haven't used this case how about 192.168.1.23:2283? with the port
Rebelius
RebeliusOP•2y ago
yes, that gets me to immich, but this is in LAN, i need my mobile to backup when outside home
Alex Tran
Alex Tran•2y ago
I understand, I am trying to get you to reverse proxy back to Immich How are you setting up your proxy for other services?
Rebelius
RebeliusOP•2y ago
with swag, dockersockets, and the dockermod swag autoproxy. With this config, if the services are in the same network than swag, just creating the CNAME with the same name than the service name does all the job my problem is that immich creates its own docker network, because i have everything else in my main network
Alex Tran
Alex Tran•2y ago
🤔 Can you try posting your question to the general channel to see if we have other people who have used swag can help out?
Rebelius
RebeliusOP•2y ago
ok 🙂 thanks for your time

Did you find this page helpful?