I have a nextcloud instance being hosted from my home network. The URL associated with it points directly at my home’s IP. I don’t want to host the instance on a VPS because disk space is expensive. So, instead, I want to point the URL at the VPS, and then somehow route the connection to my home’s nextcloud instance without leaking my home’s ip.

How might I go about doing this? Can this be achieved with nginx?

EDIT: Actually, not leaking my home’s IP is not essential. It is acceptable if it is possible to determine the IP with some effort. What I really want is to be able to host multiple websites with my single home IP without those websites being obviously connected, and to avoid automatic bots constantly looking for vulnerabilities in my home network.

  • MetroWind@lemmy.mws.rocks
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    You can setup HTTP reverse proxy on your VPS. You’ll need to point the domain to your VPS for that to work.

    What I really want is to be able to host multiple websites with my single home IP without those websites being obviously connected

    That’s easy. You have two ways:

    • Host the websites under different paths in the same domain. If your websites are static this is fine, but if they are “services” this may not be feasible (and could be very complicated if it is feasible).
    • Host them under different sub-domains. The way it works is you create a bunch of NS records in your DNS, pointing the subdomains to your root domain, and setup one “virtual host” for each of them in your HTTP server. Both Apache and Nginx have the ability to match virtual host by domain name.

    to avoid automatic bots constantly looking for vulnerabilities in my home network.

    I’m not sure how you would eliminate bots by separating the websites though.

  • valkyre09@vlemmy.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    You could do the VPN / VPS option with a reverse proxy like nginx proxy manager. Or, you could use Cloudflare tunnels. Worth noting that from a privacy perspective you’d be putting a lot of trust in Cloudflare. The same is also true for whoever you pick as your VPS provider

    • Max@mander.xyzOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Thanks! Wireguard was suggested as a VPN, and I am currently playing with that.