Docker Community Forums

Share and learn in the Docker community.

How to access wireguard-connected homeserver on my public VPS (in a datacenter) with help of nginx-proxy?

LIke the title of this thread following setup:

  1. VPS Running Ubuntu 18.04 with docker installed. Nginx-Proxy together with jrcs/letsencrypt-nginx-proxy-companion working with several websites. Works neatly and perfect.

  2. On this VPS a wireguard server is running.

  3. At home behind cruel DS-Lite NATed firewall is my ubuntu machine running wireguard as a client connected to the VPS mentioned above. Both machines can ping and reach other (from the VPS I can reach a webserver running on that homeserver via the wireguards ip address of my homeserver).

Now the tricky part: I want to use nginx-proxy to host a website under my TLD (secured by Letsencrypt SSL) that is actually running on my homeserver. But how?

How can I tell nginx-proxy and letsencrypt companion to Proxy to an external site/ip (in this case the wireguard ip address assigned to my homeserver) to passthrough my website so visitors have the impression they are watching a website that is hosted on my VPS?

Thanks for any help.

PS I tried “qoomon/docker-host” but it “just” can forward external apps on a certain port but they have to run on the docker-host itself. Not possible to passthrough an external IP/server.