I have a few things that I host from my house. I have read that it’s better practice to route stuff through a VPS to not expose your home IP.
Here’s what I’ve done so far: VPN setup on VPS with successful routing of containers. Confirmed by using a CLI IP check within the container which returned the VPS IP. I used PiVPN because I know it and it’s easy to set up.
Where I got stuck: I pointed Nginx to the supposed IP:port of the connection, but couldn’t get it to load.
What should I do next?


You’ve confirmed I’ve understood it correctly. Someone on the Internet requests your site. They reach your VPS with nginx. So far so good. Now, how does nginx know how to reach the upstream service?
The goal is to route the services through the VPN and point Nginx to them… but it doesn’t work.
Right. How are you routing traffic from nginx?
For the services already hosted by the VPS, I just point service.web.site to the appropriate localhost:port.
My hiccup is that the VPN software (pivpn) gives me an internal IP for the clients but pointing Nginx to that IP doesn’t work.
The nginx host is the VPN client in this case, so it’d be connecting to itself. You need to point it to the host on the VPN server side network.
If the VPS acts as the VPN provider and exit point, then yes, it should show the VPS IP address.
This is, of course, assuming that OP is using a VPN as per the original use case for linking remote computers over a virtualized LAN, and not the modern bastardization as a glorified proxy for obfuscating your IP.