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! :)

32 points

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.

permalink
report
reply
3 points

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

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
2 points

And itā€™s a school of thought I happen to agree with. :) But OP specifically called out homelab vs VPS.

permalink
report
parent
reply
27 points
*

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.

permalink
report
reply
2 points

This does seem like the way to go, thanks for the tips!

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

Iā€™ve been looking to get a vps. Where do you get one under $40/year?

permalink
report
parent
reply
3 points
*

https://greencloudvps.com/billing/store/budget-kvm-sale

https://lowendtalk.com/discussion/191501/real-deals-here-win-big-with-thousands-in-prizes-racknerds-new-year-offers-new-year-2024/ (New Year 2024 deals but I think theyā€™re still available)

Also, there are a LOT of sales during Black Friday. HostHatch usually have great Black Friday deals. Keep an eye on Lowendtalk.com forums.

Iā€™ve got a few VPSes at GreenCloudVPS (in San Jose, California) and HostHatch (in Los Angeles, California) and theyā€™re both pretty good. I live near San Jose so I get <10ms ping to those VPSes :)

HostHatch is a bit better (their control panel is more powerful) but youā€™d have to wait for them have a sale, whereas GreenCloudVPS usually has good deals year-round.

Iā€™ve used RackNerd in the past. Theyā€™re good too, although I prefer GreenCloud and HostHatch.

permalink
report
parent
reply

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).

permalink
report
reply
3 points

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?

permalink
report
parent
reply

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.

permalink
report
parent
reply
16 points

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.

permalink
report
reply
3 points

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

permalink
report
parent
reply
9 points

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.

permalink
report
reply
4 points

You donā€™t really need Cloudflare to have your own domain, you can do everything directly with GitHub.

permalink
report
parent
reply
3 points

I didnā€™t know this. Thanks for the info.

permalink
report
parent
reply
1 point

You can do the same with GitLab as another option, it supports custom domains too.

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you donā€™t control.

Rules:

  1. Be civil: weā€™re here to support and learn from one another. Insults wonā€™t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If itā€™s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Donā€™t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (donā€™t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5.2K

    Monthly active users

  • 3.7K

    Posts

  • 81K

    Comments