SWAG with multiple PC/servers

I have set up SWAG on one PC/server to provide a reverse proxy for a web server (website). But I also want to set up reverse proxies for various apps on another PC/server which includes *arr apps etc. Is there any way to connect the second PC to the first PC so that I only have one SWAG instance or perhaps another setup that makes it work. Perhaps separate VLAN’s and separate SWAG’s or can the different Docker setups be combined in a cluster such that one SWAG can see all the Docker apps.

Without over complicating the setup, you can just take the proxy confs and set them to point to the IP of the other host / port of the application and that’d do what you want.

Thanks for the quick reply. On github it mentions:

If the reverse proxied containers are not reachable via dns or they are running on a different machine, you will have to modify these confs to fit your needs.

So I guess the change would be in the server section something like the following:
server {
listen 443 ssl;
listen [::]:443 ssl;

192.168.1.1:sonarr.*;

But this doesnt look quite right. Any suggestions please.

I have done a bit of digging and may nearly have the answer.
One document on nginx server names suggests:
server {
listen 80;
server_name example.org
www.example.org
“”
192.168.1.1
;

}

while another document gives :

server {
listen 192.168.1.1:80;
server_name example.org www.example.org;

}

So I guess I can play around with this from here.
It was useful to get this out there and the reply pointed me in the right direction. Thanks

Hi Marcus,

This may sound like an over kill but in the long run will be great. Have pfsense as you main router. Configure the WAN as your public IP and set up one or two LAN’s. Have a server in one of the LAN to run docker. Ok on the pfsense install HA Proxy ( Straight forward one click install from pfsence package manager). So you will have trafiic coming into your pfsense box/router on port 80 the frontend then routed to the backend your docker server.

Here is the cool bit you can fire up as many containers as you want, keep the default ports as is, but map them to the host docker server.

Example nginx container (host) 6080:80 (container), then maybe a swag container 6081:<default_swang_port> etc. In your pfsence configaration you would set the backend as <server_ip>:<container_port> like so 192.168.122.150:6080

So if this is a webserver, you would get a domain and point it to your WAN. HA Proxy willl direct traffiic to the back end docker server, which then will direct traffic to your container.

Dont worry of the complexity all the settings are in HA Proxy GUI. So you can have as many PC’s, or docker containers as you want.

Might not be what you are looking for but something to consider.

You can youtube all this stuff, check this tutorial…https://www.youtube.com/watch?v=bU85dgHSb2E

Jibagast.

Hi Jibagast,
Thanks for this great lead. I looked at the video which is really helpful and it looks like the solution. I was planning to use opnsense at some point which also has an HAproxy plugin so I am sure it will be a similar process.
The one thing I am not sure is whether I need a box with 2 NICs. I searched and saw that you can do a setup with one NIC but it makes it harder to do. So I think that will be the final step for my setup.
Thanks again for the great advice.

Hi Marcus,

You would need a box with at least 2 NIC. What I did after researching, I found this, abit old but does the job: Espicially if you will be running multiple things, Internet, gaming, multiple servers, docker container ( LinuxServerio has great images ), cameras, wifi, VPN, pfBlockingNG, ACME LetsEncrypt certificates, Arp Watch, DHCP on multiple LANs, DNS forwarging and many other packeges.

Then get the expansion intel 4 NIC card about £14

https://www.ebay.co.uk/itm/176770803001?_skw=PCI+Network+card+optiplex+7010&itmmeta=01JX2AVPD012YWEBZ4XFRHTCXZ&hash=item29285c6539:g:d38AAOSwdSVneBPy&itmprp=enc%3AAQAKAAABAFkggFvd1GGDu0w3yXCmi1f8jTF%2BEGB8sPmsilmt3Pxp7Q2pQe7eymFDxcUq4YaND%2FoVSc%2BrzOL6FA9yS20UhbCwYcCd38ugc5gFJJ6bdvRPp3AkEfLIU2rEXePX9VCSqKGKSG6N8IuRYTUapa%2FkGUxel%2BZYlPGQDp4Mnj3wrHYfHWpf52gOYVC1GUd8eD6Sg6D%2Be3QOA%2BgwqvxrkI4a%2BD7aEyAElqi05xZz5uTTZy8wfbZferOq9YcFnA17mS9tVHr68xGd7KavcQsgzbHdBKNyhrR7KmmR3kwIuRQw4qLn7uA7fH1mPECsqt4AD7GW0OqQzKotn9FDqFLsfAhsF%2BA%3D|tkp%3ABk9SR-Dm7sroZQ

Now you can use the onboard NIC as the WAN (em0) and the 4 NICs will be ig0,ig1,ig2 and ig3 to assign as LANs

pfsence will pick these up as you install it. Get the community edition iso. Let me know if you need help setting this up.

Good luck…

Jibagast