I have an openwrt router at home which also acts as my home server. It’s running a bunch of services using docker (Jellyfin, Nextcloud, etc.)

I have set up an SSH tunnel between my openwrt router and VPS and can access jellyfin successfully.

I understand that I need to set up a reverse proxy to access multiple services and have https.

But I’m confused if I should set up this reverse proxy on the VPS or on the router itself. Is nginx the easiest option? Should i add subdomains in cloudflare for every service?

Pease don’t recommend vpns since they are all blocked where i live (wireguard, tailscale openVPN, etc.) I’m limited to using ssh tunneling only.

Thanks

  • mFat@lemdro.idOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    Thanks for the detailed reply. But I’m still confused. Do I need a separate ssh tunnel for every single service I run on my local server?

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      The reverse proxy is going to have a config that says “for hostname ‘foo’ I should forward traffic to foo.example.com:port”.

      If you setup the rproxy at home then ssh just needs to forward all port 443 traffic to the rproxy. It doesn’t care about hostnames. The rproxy will then get a request with the hostname in the data and forward it to the appropriate target on behalf of the requester.

      If you setup the rproxy at the vps then yes - you would need to forward different ports to each backend target. This is because the rproxy would need to direct traffic to each target individually. And if your target is “localhost” (because that’s where the ssh endpoint is) then you would differentiate each backend by port.

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      No, that’s the magic of the reverse proxy. You can transport all HTTP services through just one port. It will route them to the correct service on your service based on the domain (which is passed through the HTTP headers).

      It won’t work for non-HTTP services, for those you’ll have to make a separate ssh tunnel per port.