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?

3 points

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?

permalink
report
reply
2 points

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.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

Definitely use cloudflare in front of your website

permalink
report
reply
3 points

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.

permalink
report
parent
reply
2 points

If the option is no certs…

permalink
report
parent
reply
0 points

In my experience cloudflare has an issue with being slow

permalink
report
parent
reply
1 point

If you care enough to set up, you can use cloudflare. They do some basic caching, certs, ddos protection for free.

permalink
report
reply
0 points
Removed by mod
permalink
report
reply
7 points

Let’s Encrypt is good practice, but IMO if you’re just serving the same static webpage to all users, it doesn’t really matter.

Given that it’s a tiny raspi, I’d recommend reducing the overhead that WordPress brings and just statically serve a directory with your site. Whether that means using wp static site options, or moving away from wp entirely is up to you.

The worst case scenario would be someone finding a vulnerability in the services that are publicly exposed (Apache), getting persistence on the device, and using that to pivot to other devices on your network. If possible, you may consider putting it in a routing DMZ. Make sure that the pi can only see the internet and whatever device you plan to maintain it with. That way even if someone somehow owns it completely, they won’t be able to find any other devices to hack.

permalink
report
reply
1 point
*
Deleted by creator
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