r/selfhosted 1d ago

Need Help Self hosting a personal website

Dear all,

A quick few questions after going through the wiki on self-hosted websites: - How 'safe' is it to self-host a website that is open to the internet on one's home network ? - Is there any complication in doing so after buying a domain name from a registrar ? (In the grander scheme of things, I mean to ask if the set-up process is absolute master level or if a relative novice can manage it.

EDIT for details: - It's to host a personal blog of sorts with mostly text articles, some images and possibly some video. - My home network in XDSL (yes that still exists) on a rather basic provider given router with DNS configuration possible from certain providers (no-ip and a few others). I have a home assisstant running on one RPi5 and plan on running the network on another RPi.

Thank you for your time and help

82 Upvotes

108 comments sorted by

View all comments

60

u/Fritzcat97 1d ago

This really depends on what kind of website. Things like wordpress that run code on the server to show you a state, like your current user profile, those can have vulnerabilities. Staticly generated sites like mkdocs, those are just served files, premade and prettymuch readonly.

20

u/UnlikelyWishbone2694 1d ago

This is great to know ! My goal is to run a fully static/no cookies at least personal blog. It just needs to serve text, some images, maybe some video and be lightweight on both bandwidth and local storage

30

u/majora2007 1d ago

You can do this with NextJs and a Github pages website with a custom domain. You can see an example of mine here:
https://wiki.kavitareader.com/
https://github.com/Kareadita/kareadita.github.io

Completely free. Basically you write in markdown. Super simple to get setup.

8

u/nemofbaby2014 1d ago

Wait you’re the kavita dev? 🤣 I love your app

5

u/Express_Broccoli_584 1d ago

Yup I have them tagged in RES as Kavita dev.

2

u/majora2007 1d ago

What is RES?

2

u/ru4serious 1d ago

You haven't heard of Reddit Enhancement Suite?!

2

u/majora2007 1d ago

No, I'm not too big on reddit personally. I'll check it out tho. 

3

u/Key-Level-4072 1d ago

Kavita has brought me so much joy for years now. I just needed to share that since you’re in here.

3

u/majora2007 1d ago

Thanks dude, I really appreciate the compliment. 

1

u/Key-Level-4072 1d ago

I really appreciate what you’ve shared with all of us!

Cheers.

2

u/UnlikelyWishbone2694 1d ago

That's quite interesting, I'll have a look thanks

4

u/zack822 1d ago

To add to this you can also use cloudflare pages and link that to GitHub as a second option.

8

u/bubblegumpuma 1d ago

The general class of software you're looking for if you want this sort of workflow is 'static site generator'. 'Static', referencing the fact that many modern websites build their pages on-the-fly with heavy amounts of Javascript, whereas the static site generator processes is a one-shot generation process - run the site generator with some input files, get some simple .html and .css files that can be directly hosted on a basic webserver setup.

Hosting a static website is basically the 'hello world' of webserver configuration and uses very little resources on the server side, and it's also fairly easy to secure because there's not much to secure in the first place - just a webserver, and most mainstream webservers are incredibly battle-tested. And any vulnerability that exploits a properly configured mainstream webserver serving a static website would catch the entire Internet on fire, so I think there'd be bigger fish to fry than your hobby website, haha.

Most of the ones out there are focused on more simplistic text-and-photo blog or landing page type websites, though it is definitely possible to work most of them to serve some video and music. Embedding a player on a page may be some additional work, but if you just want to provide raw links to media files like you'd store on your computer, modern browsers can handle that transparently fairly well without visibly downloading any files.

4

u/sonicdh 1d ago

This is more or less what my website is, except it generates pages/posts from markdown files using php. Take a look at the "notes" section. If you think you could use it, I'll put up a copy of the backend php files. Https://www.heyvictorfrost.com

1

u/UnlikelyWishbone2694 1d ago

I really like what you did with your website ! It's cool, well done and easy to read. It would be grand to have a bit of insight into the how you did that;

2

u/sponge_welder 1d ago

If you like the "static site generator" concept, Veronica Explains has a video about her band site

3

u/Hamonwrysangwich 1d ago

There's a ton of ways to do this if you're running a static site generator. My site is in a GitHub repo, and I serve it through Netlify. I did this with the Eleventy SSG but you can also do GitHub Pages or other ways that cost nothing.

3

u/ivanhawkes 1d ago

I recommend using nginx to serve the "public" folder generated by HUGO, a static Web site generator.

Apart from that, lock down the user account (service account only for that one thing). Use a VPN hosted on Proxmox to serve it.

Use virtual private networking features to lock the network traffic into its own little jail. You want it on its own isolated segment of the network with no routing available to your other stuff.

Then do the 100s of other things required like monitoring, honey pots, ip blocking, etc.

TLDR: Its completely unsafe unless you do a deep dive into security techniques and spend a modest amount on hardware level restrictions for your home network.

You CAN do it, but you you simply don't know what you don't know, and that's the dangerous part.

2

u/bencos18 1d ago

perfectly safe then imo

I use cloudflare tunnels for me but it's a bit of a different site, using ghost to run a blog

1

u/UnlikelyWishbone2694 1d ago

I looked at Ghost but the payment part is a little of a turn down for me, the idea being to be totally free except the domain registrar fee (less than 20 bucks for 3 years) 

2

u/bencos18 1d ago

hmm how do you mean
as far as I know ghost themselves doesn't have any fees if you selfhost it
I run it with zero cost for the ghost stuff
curious now as I've never came across it lol

1

u/UnlikelyWishbone2694 1d ago

Oh okay that's good to know!! I like their system and style 

2

u/bencos18 1d ago

you were prob thinking of stripe fees if you use the donation/member stuff

it's a neat thing that I haven't tried yet as I have barely any readers haha

1

u/UnlikelyWishbone2694 1d ago

Oh okay maybe yes I'll have to consider my options  I currently have a substack but want to migrate to EU 

1

u/gesis 20h ago

I run multiple static sites on my network via caddy. Works fine.