How To Make Your Own Raspberry Pi Data Center
Introduction
This is the first part of series that describes how to set up your home data center using Raspberry Pi. In this post I will cover the list of equipment and software we will need. In addition, I will estimate the total fixed and monthly cost of the project. Finally, I will outline the work we will be doing. Each subsequent post will expand on one item from the outline.
Since it’s release the Raspberry PI 4 has proved to be a great tool for education and home automation. For just 100 € you can buy a computer with a 4-core ARM CPU and 8 GB of RAM memory. The specification is comparable to a lower-tier dedicated VPS. At the same time, renting such a machine at one of the big cloud providers would give you about 2 months runtime for the same amount. Of course, their price would include backups and probably an automated OS install. In contrast, my solution offers you a smaller expenditure in cash with a greater expenditure in time. With the added benefit of learning the ins and outs of servers and networking.
The Hardware
Firstly, here is a shopping list of things you will need. We will be setting up a data center with two Raspberry PI 4Bs and attached storage. All of these items can be easily ordered online. In addition, all of them are sold separately. In any case, you can take your time and search for the cheapest distributor for each item in order to cut costs.
- Raspberry Pi 4B 8GB x 2 – 210 €
- USB HDD 1 TB w/ Case x 2 – 95 €
- Class 10 SD Card 32 GB x 2 – 15 €
- USB-C 3A Power Supply x 2 – 18 €
- 2-Level Cluster Case – 15 €
Total fixed cost: 353 €
Subscriptions and fees
Next, to expose our servers to the World Wide Web we will be using a cheap VPS that will serve as a VPN gateway and nginx host. In addition, we will also purchase a domain name at a registrar. Obviously, we will choose a registrar that offers both DNS and DDNS services. This is because we may want to expose some services directly from our home address which is usually assigned dynamically. Finally, I would add that the power consumption of the Raspberry Pi is laughable. The cluster will not impact your electricity bill in any meaningful way.
- Yearly .com domain registration + DNS + DDNS – 30 € / year
- 4 core, 8GB VPS with network traffic – 5.99 € / month
Total monthly cost: 8.49 € per / month
Steps to set up our data center
- Install OS with HDD Boot
- Set up Networking and VPN to external VPS
- Install Docker, Nginx, Databases
- Set up monitoring and backup
As mentioned, the next posts will expand each of these steps into easy to follow guides. Stay tuned for more!
Related Posts:
Filed under: guides - @ 2022-12-21 11:33
Tags: docker, linux, nginx, raspberry-pi, servers