Display MoreI think you are mixing concepts.
swag is a proxy that provides access to other containers from domains/subdomains. That is, you access port 443 of the server from the WAN through a domain (or 444 or whatever if you have done a bypass). swag reads the domain and binds it to a container. The way swag accesses that container is by using the name of the container, NOT by using an IP. So the path would be something like this:
WAN (subdomain.domain.com = Router_Public_IP) -> router (Server_IP:443) -> Swag (Container_name) -> Container
(I don't know if this scheme is very explanatory or maybe I'm making it more complicated to understand
)
So you don't need the container to have an IP on the local network. The network that docker creates is enough for swag to access that container and divert traffic to it.
This is configured in swag through the configuration files of each container, you must tell it which is the domain that corresponds to each container. This is explained in point 5 of the guide.
My router forwards port 80 to 81 and 443 to 444 as per guide. The swag container returns it. ports: - 444:443 - 81:80
I created swag-net and put it in the grocy container as per guide. Not sure if I created the swag-net bridge correctly, though. Or should I use swag_default which is created when swag is installed?
So, normally, I expect to use subdomain.domain.com to go to the router, then it should be forwarded to the internal server ip for my OMV server, and Swag should do the rest. But my subdomains give an connection refused error.
When I remove the port forwards on my router, the subdomains end up on the landing page of my router.
When I forward another port to OMV on my router and use the public ip with that port number, I can access OMV. Same goes for grocy with it's respective port forwarded.