Routing traffic between two Nginx Proxy Manager instances using Tailscale

Hey everyone,

I’m trying to set up a network where my VPS with Nginx Proxy Manager (NPM) sends traffic to another NPM on my home network through Tailscale. Right now, my VPS NPM goes straight to my home devices’ Tailscale IPs, but I want to change this.

The goal is to have the VPS NPM forward everything to my local NPM, which then handles the final routing. Tailscale would just connect the two NPMs.

I’ve tried different settings in the VPS NPM, but I keep running into issues like redirect loops, 503 errors, and SSL problems. I feel like I’m missing something basic in the VPS NPM setup.

Has anyone done something similar or have ideas on how to make this work? I’d really appreciate any tips or suggestions. Thanks!

yo mike, i’ve done smthing like this before. key thing is to set up your vps npm to forward everything to your home npm’s tailscale IP. make sure websockets are on and SSL is set right on both ends.

watch out for weird header issues between the npms, they can cause those redirect loops youre seeing. also double check your tailscale ACLs, they might be blocking stuff.

good luck man, hit me up if u need more help!

I’ve actually implemented a similar setup in my homelab environment. From my experience, the key is to properly configure the proxy hosts on both NPM instances.

On your VPS NPM, set up proxy hosts that point to the Tailscale IP of your home NPM, not the individual device IPs. Make sure to enable WebSocket support and set the SSL mode to ‘SSL Force’ if you’re using HTTPS.

For the home NPM, configure it to use the local IPs of your devices. This way, the VPS NPM acts as a reverse proxy to your home NPM, which then handles the final routing.

One gotcha I encountered was forgetting to open the necessary ports on my home router. Double-check your firewall settings to ensure traffic can flow properly.

Also, pay attention to the headers being passed between the NPM instances. You might need to add or modify certain headers to prevent redirect loops.

It took some trial and error, but once I got it working, it’s been rock solid. Good luck with your setup!

I’ve tackled a similar challenge in my setup. The crucial part is configuring your VPS NPM to use the Tailscale IP of your home NPM as the destination for all proxy hosts. This creates a tunnel between the two NPM instances.

On the home NPM, set up your local devices as usual. Ensure you’ve enabled ‘Block Common Exploits’ and ‘Websockets Support’ on both NPMs for each proxy host.

One often overlooked aspect is SSL configuration. Make sure your SSL certificates are valid on both ends and the ‘Force SSL’ option is consistently applied across both NPMs.

If you’re still encountering issues, check your Tailscale ACLs to ensure the NPMs can communicate freely. Also, review your nginx.conf files on both instances for any conflicting directives.

Remember, this setup adds a layer of complexity, so thorough testing is crucial before going live.