Hello. I’m pretty new here. I just managed to get my Raspberry Pi setup at home to selfhost a simple website that will act as my portfolio for some art I do.

I’m using WordPress to make the content of the website, meaning it runs on Apache, MariaDB and MySQL in the background. It’s connected via port 80 since I don’t want to pay for SSL certificates to setup https. There will be no accounts or transactions happening on my website. I don’t have anything to manage my dynamic IP but I’ll figure that out later. I’ve deleted the default Pi user on the RPi.

Are there security issues I should address preemptively? I’m worried for instance that I am exposing my home network, making it easier for someone to breach into whatever is connected there.

Any tips on making sure my setup is secure?

27 points

Take a look at certbot. You don’t need to pay for ssl and ssl is actually pretty mandatory for anything served on the internet.

Make sure you don’t forward too much ports. And make sure you have a working firewall that only allow those same ports. You should be good to go then.

permalink
report
reply
19 points

Also be advised that wordpress will attract all the internet to try and hack in, so make sure you keep everything up to date

permalink
report
parent
reply
6 points

Setting up fail2ban to block people trying to brute force the admin panel is a good start.

permalink
report
parent
reply
6 points

I would add from an end-user privacy perspective, they might want HTTPS. If I hit a website not using HTTPS, I pretty much immediately back out. Bad actors like hostile governments and hackers can use seemingly meaningless data against you.

I can’t remember exactly what happened but I remember back when WebMD was fighting against rolling out TLS hackers were able to find medical weaknesses against people.

permalink
report
parent
reply
2 points

Not too mention the scary browser warnings. It’s not a good look tbh if this is your portfolio. Lots of great considerations and tips here already though.

permalink
report
parent
reply
1 point

Noted ! I’ll make sure to set https up.

Tbh, I haven’t heard the word firewall since probably 2005… would my router have a firewall built in or is that something I need to add on, let’s say, the RPi ?

permalink
report
parent
reply
3 points
*

Add it to the Pi. Easier maintenance.

permalink
report
parent
reply
3 points

Was going to say exactly the same thing.

Even if your router have one, better safe than sorry!

permalink
report
parent
reply
2 points

Your router probably does have one, but your end devices should too. If your router is some piece of trash ISP-supplied one, it might not even have a firewall for IPv6 (if it even supports IPv6 at all).

permalink
report
parent
reply
23 points

Go https, today there is no real reason not to and tons of good reasons to do it.

Let’s encrypt is 100% free and using their certbot its also automated and easy to do.

permalink
report
reply
1 point

Thanks, I’ll look into it. I didn’t know there were free SSL certs out there

permalink
report
parent
reply
1 point

Yeah, afaik, you just need to install letsencrpyt and then run the command with sudo. It’ll scan your apache conf and generate you an ssl version. Just make sure to include your domain name in the ServerName directive

permalink
report
parent
reply
22 points
*

Unless you require the dynamic features of Wordpress, you could have a look at some of the static site generators out there (such as Hugo). Having a static site would reduce the attack surface considerably. Also due to the shenanigans happening with Wordpress at the moment, I would be weary of using it.

About SSL, what others have already mentioned, SSL certs are available for free these days, thanks to letsencrypt.

permalink
report
reply
1 point
*

There are also static export plugins for wordpress. One needs to get rid of comment boxes and such as they don’t work then of course. But if all content is already in WordPress, serving just the static export is a low friction solution.

permalink
report
parent
reply
2 points

I’d almost go through the trouble of getting the content out of Wordpress. The nice thing about static site generators is you can completely switch out the framework, runtime, base Docker image and/or OS at any time.

permalink
report
parent
reply
20 points
*

since I don’t want to pay for SSL certificates to setup https.

You don’t need to pay for SSL certs anymore, most of the time. You can get them for free from a bunch of different places now. I use Let’s Encrypt. The web server/reverse proxy I use, Caddy is able to automatically get a cert for you, install it, and keep it renewed. The only time you need to pay for a cert is if you are handling financial transactions.

Are there security issues I should address preemptively?

WordPress itself has a generally good reputation for security, though depending on how the current drama goes, that may change. WordPress security problems have almost always stemmed from plugins or poor password hygiene. Remove any plugins you are not actively using, keep the ones you are using updated, and use a good password that you don’t use anywhere else. A password wallet like Bit Warden can generate and store such passwords for you.

Better on the security front would be to evaluate whether you actually need something like WordPress at all. A static site would likely be far more secure. There’s less moving parts that might be vulnerable.

While you could program a static site yourself, it’s more common nowadays to use a static site generator like Hugo to build the site. You set it up once for how you want the site to look and then you write your posts in markdown or whatever your particular generator uses.

I don’t have anything to manage my dynamic IP

Most domain name providers have some sort of setup for dealing with dynamic IP addresses, a program called ddclient is pretty common and is available in most repos.

permalink
report
reply
2 points

Wow lots of info. I’ll check all of this out. You have a good point that I don’t need wordpress. Hugo looks interesting, thanks for the advice!

And yes, as said above, I’ll look into the free SSL certs to setup https.

permalink
report
parent
reply
1 point

To add to this, you might check out some of the free Hugo themes here: https://themes.gohugo.io/tags/portfolio/

permalink
report
parent
reply
8 points

It may or may not be a concern to you, but if you are hosting it from your home then people will be able to determine your IP and rough physical location.

If you’re on American cable internet and expecting a lot of traffic, your upload speed may become a problem.

permalink
report
reply
1 point

Your first point is a good point. I guess it’s ok for now if my rough location is accessible. It’s not like my art is worth anything.

Regarding upload speed, yeah I know it could become an issue but since it’s just a portfolio website, I don’t expect more than a dozen visits a month.

permalink
report
parent
reply
1 point
*

scraping bots are expected to visit it, nowadays more than in previous years. a few of them are search engines, but there’s a lot of scraping for AI training, both on text and image data.

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

  • 1.8K

    Posts

  • 19K

    Comments