A Raspberry Pi cluster
Published by Beto Dealmeida on
Some notes about my self-hosting setup
I've been using a Raspberry Pi for my self-hosting needs, but last week it ran out of disk space because of Mastodon. The Pi was running on an 8GB SD card, so I order one with 128GB so I don't have to worry about it for a while. Since I have a few Pis at home I decided to split the services across a few of them.
I ordered a small 3D-printed case that holds 4 Pis and a hard disk, and this is what I'm planning to do:
Gateway (Pi 3)
This Pi will have an external IPV4 address, and forward ports to the other Pis. I'll probably create a new wifi SSID for the Pis, since it's simpler than wiring them through a hub, and I don't care about latency. This Pi would be an access point for the other Pis, keeping them isolated from my main wifi SSID.
Application (Pi 4 8GB)
I want to have a Pi dedicated to running applications. This includes:
- My personal Mastodon instance.
- Mosquitto, a message queue that I use for home automation.
- Señor Octopus, a custom home automation/data archival tool that I built.
- Shoutout bot, a Slack bot that I use or people to send shout-outs at work.
- Jetforce, a Gemini server. I'm currently running my capsule on a VPS.
- A custom IndieAuth provider that I wrote.
- Apache Superset, a data visualization web application that I work on.
Storage (Pi 3)
The third Pi will be used for storage, running my database and a large disk for remote backs via duplicity:
- Postgres
- 3 TB hard drive
Mail (Pi 4 4GB)
Finally, I've been considering moving my mail server home. I currently run Mail-in-a-box on a VPS, and it would be nice to have all my hosting from my closet. I'm somewhat worried about my network connectivity (I have a line-of-sight provider), and with being without email when the internet is down. But I can always have Pi #1 (the router) connect to my mobile hotspot in cases like that.