Using existing SWAG instance instead of immich-proxy

I already have SWAG set up and find it works well for managing access to services by subdomain. Can I exclude the proxy container, or is it doing additional work behind the scenes beyond just being a gateway? If I exclude the immich-proxy container and use SWAG will this impede functionality?
10 Replies
jrasm91
jrasm913y ago
You can do that, it is just a proxy, but you'll basically have to copy the same configuration so most people just forward their managed proxy to immich 2283 and leave the immich one there As it is less hassle and Nginx doesn't use that many resources
TheMadman
TheMadmanOP3y ago
If resource usage is low I guess that makes sense! Just to clarify, if I set immich to be accessible from immich.domain.org via SWAG, do I need to update IMMICH_WEB_URL & IMMICH_SERVER_URL in order to access all services? I will be leaving the container names as the default values. The docs suggest this is for advanced use cases where services are on different hosts (which is not the case for me).
jrasm91
jrasm913y ago
Correct. You don't need to set those. I believe they are only used inside the immich proxy container to know where the upstream servers are, but that defaults to docker service names
TheMadman
TheMadmanOP3y ago
Perfect, thanks for the help!
jrasm91
jrasm913y ago
So you should be able to point to port 2283 or 8080 depending if you are using the external or internal port on the proxy
TheMadman
TheMadmanOP3y ago
Yeah, I'm pretty comfortable with docker in general so don't think it should be too hard to figure out
TheMadman
TheMadmanOP3y ago
Oh damn, just realised that SWAG doesn't have an Immich template yet Thanks for that. I assume I'll need to add those details into my SWAG immich.conf file for things to work properly.
TheMadman
TheMadmanOP3y ago
GitHub
docker-swag config (tested + working) · Discussion #1275 · immich-a...
working as of 2023-01-08 in docker-swag/config/nginx/proxy-confs/immich.subdomain.conf: server { listen 443 ssl; listen [::]:443 ssl; server_name immich.*; include /config/nginx/ssl.conf; client_ma...
TheMadman
TheMadmanOP3y ago
This should do the trick, I'm thinking

Did you find this page helpful?