Swag config with immich in a docker container.
Good morning everyone,
First off, I'm new here but I'm really excited to use immich and report anything unexpected I encounter. I'm an unRAID user and installed immich from the apps center within unRAID.
I'm making use of a redis and postgreSQL database outside of the container. (see screenshot) Within this screenshot the port mappings are also apparent. I had to change the default mapping of 8080 (still the case within my docker network) to something else (8585, in my case) to not conflict with other containers within the network.
I'm trying to expose my container making use of my SWAG reverse proxy, which is also present within the same docker network. I'm changing the default app name from immich to image. I will now provide both my docker compose file for the container and my SWAG reverse proxy setup.
How does this setup look? Unfortunately, SWAG is currently complaining about something, but I have yet to figure it out. I'm thinking that it has to do with the proxy pass part being incorrect. From what I've seen online people were using different ports, I only seem to have 8080 mapped; people seem to name immich-server and immich-web. I could use some help here :)

15 Replies
gathering more info
Now that I'm looking at my docker compose, 1 thing I know is that I've got the port mapping completely wrong.
I can confirm that my swag container etc. is correctly configured.
I changed the location /api part:
However, it still doesn't seem to work. So, if anyone could provide some assistance? Thanks in advance. :) (Please tag me)
When trying to access the site with the above config it reports a 502 error. WHen I switch immich_app to immich and port from 3000 to 8080, it reports a 400 error.
Bit stuck.
yeah I can't seem to figure it out. It's either a 400 bad request or 502
or this when switching both api and location to 3001 and immich

You're using a non-standard single container setup, so some things might be different. But usually port 3001 is the server/api and port 3000 is the web container. The included proxy container is running on port 8080 and you should be able to just point your own proxy to port 8080
Hm
I wonder why it won't work then, not doing anything special here
Did you fix the port mapping in the compose file? What happens when you go to
http://192.168.1.121:8585
?oh that works without issue
But since it's all in the same docker network I can get away by saying http://immich:8080
or at least I should be able to
When I set up port 8080, it throws a bad request message, which I have not encountered before with other apps.
when changing to 3001 I get the message as shown in the screenshot
I know it works since I'm able to ping immich:8080 from my swag container
well, I suppose any port would work
but I can ping immich
And then pointing your swag nginx proxy to immich doesn't work?
What if you try a basic config like this
that works
hm
that is odd
ah okay I think I found why it is giving me a 400 error
It seems to be linked to the proxy.conf file within swag

Alright I made some changes and got it working, it seems that the following settings were already provided by proxy.conf and were exactly the same:
After commenting them out and enabling proxy.conf again it works without issue it seems.
This problem has been resolved.