Hey there!

I’m thinking about starting a blog about privacy guides, security, self-hosting, and other shenanigans, just for my own pleasure. I have my own server running Unraid and have been looking at self-hosting Ghost as the blog platform. However, I am wondering how “safe” it is to use one’s own homelab for this. If you have any experience regarding this topic, I would gladly appreciate some tips.

I understand that it’s relatively cheap to get a VPS, and that is always an option, but it is always more fun to self-host on one’s own bare metal! :)

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 hours ago

    There’s nothing wrong with just using a VPS for this. Despite what some mouth-frothing hobbyists will tell you, it’s still well within the realm of self hosting. There’s just no reason or difference for hosting a blog on your UnRAID server vs a VPS.

    If you really want to be some kind of purist and only use your own hardware, then you could configure a web server that can reverse proxy on your UnRAID server and forward port 443 in your router to your UnRAID box, but you’d have to change your UnRAID access port to something else. You’d want to keep this web server docker container up to date, and preferably see if you can implement some kind of WAF with it or in front of it. You’d then forward the requests from this web server to your ghost container.

    A better idea would be to use a different piece of hardware for this web server reverse proxy, like a raspberry pi or something, and put it on a different subnet in your house. Forward 443 to that, then proxy the connection back to UnRAID, in whatever port you bind the ghost container to. Then you can tighten access that raspberry pi has. Or hell, host the blog on that hardware as well and don’t allow any traffic to your main LAN.

    There are half a dozen better ways to do this, but they all require you to rely on a third party service to some extent.

  • sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    5 hours ago

    I use a VPS and generate static sites using Hugo. Works fine.

    I could host it in my network, but I don’t see a point, and I’d really rather not have a power outage or loss of internet break my site (much more likely at home than at a datacenter). I host pretty much everything else within my network though.

  • sntx@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 hours ago

    yes: sntx.space, check out the spurce button in the bottom right corner.

    I’m building/running it the homebrewed-unconventional route. That is I have just a bit of html/css and other files I want to serve, then I use nix to build that into a usable website and serve it on one of my homelab machines via nginx. That is made available through a VPS running HA-Proxy and its public IP. The Nebula overlay network (VPN) connects the two machines.

  • pythia@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 hours ago

    could someone please point me to a “self-host-beginner-tutorial”? I had pretty good ICT-knowledge but when it comes to selfhosting my knowledge ends…

    • Sunny' 🌻@slrpnk.netOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      Here is one of the top of my head; https://perfectmediaserver.com/.

      I’d say it boils down to what you see yourself hosting, what do you need/want? There are many great YT content creators out there documenting their experiences, tips and guides. HardwareHaven, Raid Owl, Jeff Geerling, Christian Lempa, TechnoTim and Wolfgang to mention a few.

      JupiterBroadcasting has a wide variety of Podcasts dedicated to both selfhosting and linux stuff if that should peak your interest.

      If you need tips for what to selfhost, here is another great resource :) https://github.com/awesome-selfhosted/awesome-selfhosted

  • Strit@lemmy.linuxuserspace.show
    link
    fedilink
    English
    arrow-up
    6
    ·
    17 hours ago

    I host mine just like you want to do. Ghost running in a docker container on my homelab, with reverse proxy and domain pointing to it.

    Haven’t had any issues so far.

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    2
    ·
    edit-2
    2 hours ago

    A VPS still counts as self-hosting :)

    I host my sites on a VPS. Better internet connection and uptime, and you can get pretty good VPSes for less than $40/year.

    The approach I’d take these days is to use a static site generator like Eleventy, Hugo, etc. These generate static HTML files. You can then store those files on literally any host. You can stick them on a VPS and serve them with any web server. You could upload them to a static file hosting service like BunnyCDN storage, Github Pages, Netlify, Cloudflare Pages, etc. Even Amazon S3 and Cloudfront if you want to pay more for the same thing. Note that Github Pages is extremely feature-poor so I’d usually recommend one of the others.

    • JubilantJaguar@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      This is a bit fuzzy. You seem to recommend a VPS but then suggest a bunch of page-hosting platforms.

      If someone is using a static site generator, then they’re already running a web server, even if it’s on localhost. The friction of moving the webserver to the VPS is basically zero, and that way they’re not worsening the web’s corporate centralization problem.

      I host my sites on a VPS. Better internet connection and uptime, and you can get pretty good VPSes for less than $40/year.

      I preferred this advice.

      • dan@upvote.au
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 hours ago

        You seem to recommend a VPS but then suggest a bunch of page-hosting platforms.

        Other comments were talking about pros and cons of self-hosting, so I tried to give advice for both approaches. I probably could have been clearer about thay in my comment though. I edited the comment a bit to try and clarify.

        I have some static sites that I just rsync to my VPS and serve using Nginx. That’s definitely a good option.

        If you want to make it faster by using a CDN and don’t want it to be too hard to set up, you’re going to have to use a CDN service.

        Self-hosted CDN is doable, but way more effort. Anycast approach is to get your own IPv4 and IPv6 range, and get VPSes in multiple countries through a provider that allows BGP sessions (Vultr and HostHatch support this for example). Then you can have one IP that goes to the server that’s closest to the viewer. Easier approach is to use Geo DNS where your DNS server returns a different IP depending on the visitor’s location. You can self-host that using something like PowerDNS.

        • JubilantJaguar@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 hour ago

          I have some static sites that I just rsync to my VPS and serve using Nginx. That’s definitely a good option.

          Agree. And hard to get security wrong cos no database.

          If you want to make it faster by using a CDN and don’t want it to be too hard to set up, you’re going to have to use a CDN service.

          Yes but this can just be a drop-in frontend for the VPS. Point the domain to Cloudflare and tell only Cloudflare where to find the site. This provides IP privacy and also TLS without having to deal with LetsEncrypt. It’s not ideal because… Cloudflare… but at least you’re using standard web tools. To ditch Cloudflare you just unplug them at the domain and you still have a website.

          Perhaps its irrational but I’m bothered by how many people seem to think that Github Pages is the only way to host a static website. I know that’s not your case.

  • cron@feddit.org
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    1 day ago

    No, with these reasons:

    • Bandwidth isn’t plenty
    • My “uptime” at home isn’t great
    • No redundant hardware, even a simple mainboard defect would take a while to replace

    I have a VPS for these tasks, and I host a few sites for friends amd family.

    • daddy32@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 hours ago

      Weeeell, there’s a school of though leaning towards the opinion that using VPS is still self-hosting ;)

      • cron@feddit.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        I agree, but I understood this question in the context of a homelab.

        And for me, a homelab is not the right place for a public website, for the reasons I mentioned.

  • LainTrain@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    21 hours ago

    Yes I host everything public with cloudflare tunnels. Everything more heavy is VPN with DDNS on invite basis to friends and fam. For the former it’s Hassle-free HTTPS, no reverse proxy, no firewall, no nonsense.

  • wjs018@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 day ago

    I have hosted a wordpress site on my unraid box before, but ended up moving it to a VPS instead. I ended up moving it primarily because a VPS is just going to have more uptime since I end up tinkering around with my homelab too often. So, any service that I expect other people to use, I often end up moving it to a VPS (mostly wikis for different things). The one exception to that is anything related to media delivery (plex, jellyfin, *arr stack), because I don’t want to make that as publicly accessible and it needs close integration with the storage array in unraid.

    • Sunny' 🌻@slrpnk.netOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Good points here, uptime is a factor I had not taken into consideration. Probably better to get a vps as you say.

  • Foster Hangdaan@lemmy.fosterhangdaan.com
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    1 day ago

    I self-host everything from my home network including my website. I like to keep all my data local. 😁

    It’s a simple setup: just a static site made with Lume, and served with Caddy. The attack surface is pretty small since it’s just HTML and CSS files (no JavaScript).

    • LunchMoneyThief@links.hackliberty.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      20 hours ago

      I wonder sometimes if the advice against pointing DNS records to your own residential IP amounts to a big scare. Like you say, if it’s just a static page served on an up to date and minimal web server, there’s less leverage for an attacker to abuse.

      I’ve found that ISPs too often block port 80 and 443. Did you luck out with a decent one?

      • Foster Hangdaan@lemmy.fosterhangdaan.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        11 hours ago

        I wonder sometimes if the advice against pointing DNS records to your own residential IP amounts to a big scare. Like you say, if it’s just a static page served on an up to date and minimal web server, there’s less leverage for an attacker to abuse.

        That advice is a bit old-fashioned in my opinion. There are many tools nowadays that will get you a very secure setup without much effort:

        • Using a reverse proxy with automatic SSL certs like Caddy.
        • Sandboxing services with Podman.
        • Mitigating DoS attacks by using a WAF such as Bunkerweb.

        And of course, besides all these tools, the simplest way of securing public services is to keep them updated.

        I’ve found that ISPs too often block port 80 and 443. Did you luck out with a decent one?

        Rogers has been my ISP for several years and have no issue receiving HTTP/S traffic. The only issue, like with most providers, is that they block port 25 (SMTP). It’s the only thing keeping me from self-hosting my own email server and have to rely on a VPS.

  • eric@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 day ago

    I have a Hugo site hosted on GitHub and I use CloudFlare Pages to put it on my custom domain. You don’t have to use GitHub to host the repo. Except for the cost of the domain, it’s free.

  • nicgentile@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    22 hours ago

    I self host a Grav site among other things on a 15 Euro VPS.

    Also, I started with Ghost but the fact that they locked up the newsletter side of business to a single provider and were unwilling to rework things at the time made me walk away. Yes, I know you could go code side, and add others, but that was a complicated setup in itself. Grav works perfectly for me.