I have been hosting a few websites from my home server and it has taught me a lot. I have recently had major issues with the electrical storms, Kogan NBN support (Australia), and the NBN network in general. I know 4g is not fast, but I would like to use it so that in the event of a network outage, im not at the mercy of NBN. On to the question!

I run pfsense in hyper v with a 4 port nic which passes through those ports to pfsense.

I realized that 4g ip addresses are not public, which stops me from hosting the websites.

Reading into wireguard and vpn services my plan is to:

  • Set up a VPS ✅
  • Set up wireguard on the VPS ✅
  • Create a wireguard connection on my windows server, and pass that in as an interface to pfsense, so that hopefully, I wont need to change to much on my internal infrastructure.

Does this sound like an OK plan? I’m open to any other ideas where I can achieve the following:

web app >> nginx >> pfsense >> vpn tunnel >> VPS with Public IP (can be dynamic)

Thanks!—

  • forwardvoid@feddit.nl
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    If you’re hosting websites and not applications, perhaps you can use SSGs like Hugo/Gatsby. You could deploy your site in a bucket and put cloudflare in front. They can also be used on your own server of course. If you are hosting applications and want to keep them on 4g, you could put a CDN (CloudFlare or …) in frint of it. That would cache all static resources and greatly improve response times.

      • taladar@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        Depending on what you are trying to host and where you live power usage and your own hardware might be more expensive than the VPS you require to host those.

    • thirdBreakfast@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      This. Hosting at home might be cheaper if you are serving a lot of data, but in that case, the speed’s going to kill you.

      I’m a keen self-hoster, but my public facing websites are on a $4 VPS (Binary Lane - which I recommend since you’re in Aus). In addition to less hassle, you get faster speeds and (probably) better uptime.

  • sgh@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    11 months ago

    Have you looked into Cloudflare Tunnel? It’s a turnkey solution that does exactly what you want. No idea what the cost is though.

  • nis@feddit.dk
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I’m using Headscale for something similar. I have a VPS and a server at home. Both are on the same Headscale network. On the home server I set up a Matrix server. On the VPS I set up Caddy as a reverse proxy for the home server with its Headscale IP. It works nicely.

    I’m not on 4G, though.

  • StrawberryPigtails@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Sounds like a connection would work with that setup but it would depend on what you are planning on hosting. Anything that is sensitive to latency would probably not work well. Static sites should be fine though.

  • nopersonalspace@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 months ago

    I mean I think it really depends on the type of website you’re trying to host. A static blog would use way less bandwidth than a media server for example. Traffic would have the same effect too, where 1 concurrent visitor to a blog would probably be fine but 10,000 would be a problem.

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I know 4g is not fast, but I would like to use it

    There was a time when people used to have 2400 bits per second from home (for the youngsters: that is 0.003M). So if you are doing it for fun, why not.

    • filcuk@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      True, but everything is more bandwidth demanding these days, plus we’re used to fast loading.