Anyone try hosting a site from a home PC securely?

Hey all,

Looking for some advice on setting up a small home server. I’m aiming to host a personal site, kind of like a CV, and another site that a few friends and I could use to advertise our services. Both would have limited traffic (probably under 1000 visitors daily). I was thinking of hosting from a mini PC or maybe even a Raspberry Pi.

My biggest concern is security—I’d have to port forward on port 80, and I’ve heard that having SSH on port 22 could attract random attacks. I know hosting plans aren’t too expensive nowadays, but I’d like to learn the basics myself by setting this up at home. I just want to be sure I’m taking the right precautions so my family’s network stays safe.

Probably better to avoid home hosting and go for a VPS like DigitalOcean instead. You’ll get hands-on experience with more practical applications.

EDIT: If you still want to try hosting at home, you’ll need a static IP for your computer and for your web server to keep things stable and separate.

@Leighton
Agreed! I used to run my own server from home years back. It was fun, but it’s just not worth it anymore. A VPS gives you more control, plus essential perks like DDoS protection and more reliable bandwidth.

@Leighton
Yep, some ISPs won’t let you run servers on residential connections. A VPS will be more reliable anyway.

@Leighton
Thanks for the advice. I’m still in the planning phase but will keep all this in mind when I decide on the setup. Appreciate the help!

Tracy said:
@Leighton
Thanks for the advice. I’m still in the planning phase but will keep all this in mind when I decide on the setup. Appreciate the help!

People can get overly cautious about self-hosting. Opening port 80 isn’t a big deal as long as you keep your code secure. If you’re not running risky server-side code, you can manage just fine, even on something like a Raspberry Pi.

Hosting locally and on a VPS doesn’t differ much in terms of learning; you can gain similar experience with both setups.

@Alivia
One tip, though: check your ISP’s terms. Some providers don’t allow home-hosted servers.

Mackenzie said:
@Alivia
One tip, though: check your ISP’s terms. Some providers don’t allow home-hosted servers.

Thanks, I read that too. My ISP seems okay with it as long as there’s no spam or other suspicious activity.

Mackenzie said:
@Alivia
One tip, though: check your ISP’s terms. Some providers don’t allow home-hosted servers.

Sounds like typical ISP overkill. I’d be curious to see their exact reasoning just for fun!

@Alivia
Check the Acceptable Use Policy here: https://www.spectrum.com/policies/residential-terms.html

@Alivia
Cox Communications has similar rules: https://www.cox.com/aboutus/policies.html, look under items 1 and 5.

Mackenzie said:
@Alivia
One tip, though: check your ISP’s terms. Some providers don’t allow home-hosted servers.

I think it’s mostly a catch-all to stop heavy data users. These days, many devices serve as tiny web servers, so it feels outdated.

@Alivia
Thanks for the input! Lots of folks are suggesting VPS options, so I’ll look into Digital Ocean for that too.

Tracy said:
@Alivia
Thanks for the input! Lots of folks are suggesting VPS options, so I’ll look into Digital Ocean for that too.

Definitely! Digital Ocean is solid, and they’ve got some helpful guides for server management if you’re starting out.

For a simple setup, shared hosting is easiest. You get a private directory and resources on the host server, so you only focus on setting up the site itself. Great if you just need the site to be available without worrying about the tech behind it.

If you want hands-on learning about servers, a VPS will let you control the setup, pick your database, configure everything yourself. But with a VPS, you also don’t have to worry about residential ISP rules or home network issues.

A mixed approach can work too. Host your CV site on shared hosting and use a VPS for learning, just set up DNS to direct each to the right place.

If these sites are for business, renting a server is likely the way to go. Home connections don’t offer the same speed and reliability unless you have something like business-class fiber.

Learning about hosting is cool, but network security is complex. To keep your network safe, try learning the basics of network security. If you’re doing it for learning’s sake, start with recent books or tutorials.

@Bellamy
Yeah, I get that security is a huge topic, and I may not have enough time to go that deep right now!

Tracy said:
@Bellamy
Yeah, I get that security is a huge topic, and I may not have enough time to go that deep right now!

That makes sense! You could start with basics like iptables and fail2ban, and look into using Debian for better security. Following guides will get you part of the way, but for full security, experience counts.

If you’re set on hosting at home, here’s a few things you can do:

  • Use Cloudflare for your domain to improve speed, get DDoS protection, and hide your IP.
  • If you have dynamic DNS, Cloudflare’s API can keep your IP up-to-date.
  • Configure virtual hosts so each site is only accessible via its specific domain name.
  • Set a default host that shows nothing, catching any direct IP access.
  • Configure your firewall to only allow traffic from Cloudflare’s IPs.
  • Ideally, stick to HTTPS, with a rule in Cloudflare to enforce it.

It’s a good learning experience. You’ll also want to secure SSH access with public-key login only, and limit access by IP range.