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?
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.
Keep wordpress up-to-date, and keep the number of plugins you use to a minimum.
Alright everyone, thank you so much for your thoughtful recommendations! To sum it up, here’s what I have done:
- I used let’s encrypt’s Certbot to get my SSL certs and setup https, auto-renew every 3 months and I setup a reminder to update Certbot every month.
- I setup a permanent redirect from http to https in Apache
- I installed a firewall on the Pi, only 80, 443 and [22 from my computer to the RPi] are open. I couldn’t find the firewall settings on my router but I assume they exist since I had to forward 80 and 443 there.
- installed the following plugins: WordFence and WP Fail2Ban
- changed the user password on the pi to a better longer one
I think I should be all set, shouldn’t I?
You may want to consider dockerizing your services just for maintainability and isolation from your host. I recommend something like Nginx Proxy Manager to serve as the “main entrance” for your docker network and to handle Let’s Encrypt for you.
I second this. I didn’t understand that until…you know, like you install the latest python or something and then your website is proof! Gone. Dockerization gives it a little bit of stability.
If you care enough to set up, you can use cloudflare. They do some basic caching, certs, ddos protection for free.
Definitely use cloudflare in front of your website
Yes and no. It’s great for hiding your IP and preventing DDOS attacks, but it does require you to use their certs, which means they technically have access to your data. Cloudflare is pretty trustworthy, but the risk is still there.
If the option is no certs…
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.
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 ?
Also be advised that wordpress will attract all the internet to try and hack in, so make sure you keep everything up to date
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.
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.
Removed by mod