The list of required hardware to set up a server is not that extensive. First of all, in order to set up a server you have to have a machine on which it will run. Raspberry Pi is a perfect candidate to be it! Moreover you do not need much to start your journey. Take a look at how short is the list of things we will need
- Raspberry Pi
- Power supply
- Ethernet cable
- SD Card
- Internet access
For having email capability you will also need
- Raspberry Pi case
- Additional HDD storage (powered case recommended)
When it comes to the total cost of required hardware, you should be fine with just $50–$60. Raspberry Pi 4B costs around $35 for the 2GB version, power supply is between $5–$10, ethernet cable in your local market should be around a $1 and a decent SD Card will cost about $10.
Raspberry Pi model
Get one with an ethernet port, this is the most important part. Ethernet port will allow a cable connection to your router and in turn will provide a more stable connection than Wi-Fi. If you do not know how ethernet port looks, it is the first port on the right in the picture above, right next to USB ports. Largest thingy on the Raspberry board.
If you are looking for performance get the newest Pi4B with 4GB RAM ($55). If you do not plan to have a server with many users and many services you can get a cheaper version (2GB for $35) or even a previous model.
If you have no idea if running a server is for you, then get Pi Zero W for just $10. It has no internet port, but it does have Wi-Fi, which means that you can still test everything on it. When, and if, you are sure that you actually want to host a server you can drop $55 for the newest model. Pi Zero, that you will be left with, will enable you to mirror your main server and test new features before uploading them to your production server – neat! Or you can make a retro gaming console out of it, or learn Linux – possibilities are endless.
Grab an OTG USB cable as well, it costs a $1 and allows the use of USB hubs, as Pi 0 has but one micro USB OTG port. Don’t complain, the idea was to make a REALLY small and cheap computer.
CAUTION there are three models of Pi Zero! The basic Pi Zero has no GPIO headers and no Wi-Fi, and in turn is of no use to us here as we are looking for a cheap and out-of-box solution! Pi Zero W has no GPIO headers but has Wi-Fi, we do not care about GPIO, but we do want out-of-box internet connectivity. Get this model! There is also Pi Zero WH, exactly as Pi Zero W, but is has pre-soldered GPIO headers. If you want you can get this one for use in DIY projects. If you are not into DIY and prefer software side of things then skip the WH version. Cost goes as follows $5/$10/$15 for Pi 0/Pi 0W/Pi 0WH respectively
You can find a local authorized reseller on the official Raspberry Pi Foundation website
Choosing model based on operating system
Raspbian – The official Raspberry Pi OS will run on any Pi. SD Cards with Raspbian installed are generally interchangeable between models, unless you install something model-specific that changes the standard functionality
Debian GNU/LINUX – It is also possible to run a Debian distribution on Raspberry. Unfortunately it does not run on RPi4, more information can be found on debian.org
Tutorials on this page will focus on Raspbian as I am using RPi4B. Everything will be applicable to any Raspberry Pi model, provided you are running Raspbian. Debian GNU/LINUX and Ubuntu servers might require some modification of commands and/or packages that are being installed but you should be able to follow on those systems as well without much difficulty.
When it comes to required hardware you need to have a way of powering up your Pi!
CAUTION when using Pi4 it is advised to use the official power supply unit. Due to some mishaps in engineering department Pi can throttle itself due to lack of power, not power up properly or not supply enough power to peripherals with a third party power supply unit! With RPi4 use the official power supply unit!
Other Pi versions can be powered with your nearest mobile phone charger. Make sure that the charger is of good quality and outputs 5V and at least 1A.
It is also important to invest in a good case for your Raspberry. Get one with cooling – either active in form of a fan, or passive in form of a case like FLIRC shown above. You will get away with a case without cooling as well, but bear in mind that your server might get hot. But unless you exceed 85 Celsius you are good.
Active cooling means fan noise, but the case should be very cheap. Passive cooling is a bit more expensive but you have an absolutely silent server. Performance-wise there will not be any difference. The choice is yours.
My Pi currently runs enclosed in the FLIRC case. At idle, the CPU temperature is around 41°C. According to some testers, on full CPU load the temperature should not exceed 60°C. Which is nice. Take a look below at temperature comparison chart to see the difference.
The spike between 5:00am and 5:30am is caused by antivirus scan.
With the FLIRC case the average temperature dropped 10°C, that is a 20% drop! Moreover, the maximum temperature in FLIRC case is the same as the lowest recorded without any cooling.
It might seem like I am advertising here, but I want to show you how important, in the long run, a good case actually is. Get a different one if you can find a cheaper or a better one.
Word on cases to avoid
Do not buy a case that encloses the Pi, does not let it breathe and has no passive cooling! It will constantly overheat and throttle. No holes, no ventilation – no use to us. Do not buy an oven for your RPi.
Another thing to consider are cases that are too fancy for their own good. Check out the access to all ports on Pi. How easy it is to take out the SD card. Will you be able to easily take out the Pi out of it without demolishing the case? I bought a $5 iron case for Pi Zero and that is money I am never getting back. I could have powered my server for the whole year with that!
If you are in a hurry get the cheapest case that looks like it will be ‘accessible’ enough. You can buy a proper case once you familiarize yourself with the Pi and you will know what do you actually need. Maybe the Pi will sit next to your TV in a fancy box to be displayed? Maybe you will decide to keep your Pi on the wall and you will need a case with a wall mount? Get it? Pi on the wall? Yeah… Sorry about that…
Any ethernet cable like the one shown in the picture above will do. You can grab one from your local supermarket. Make sure it is long enough to connect your Raspberry to your router and that is it.
Required hardware list just would not be complete witout an SD card. You need at least 4GB one. Furthermore, it should be UHS-1 Class or above as well. Do not get one that is larger than 32GB, in theory you can do it, but it will complicate the setup process. If you want to use a larger card, research the topic once you setup your server and you are comfortable enough around it.
CAUTION do not get an RPi card with NOOBS pre-installed. Those cards are usually overpriced, low on GB (like 8, or 16 tops) and we will still install a minimal Raspbian over them. Those cards are for people who are 6 or 60.
If you want to have email capability, proper website name and encryption certificate get a domain. In order to receive an email to firstname.lastname@example.org you have to have control over domain called mydomain.com
Before you buy a domain you can get a free one and use it for the testing period. They are usually free for a month or two, after which you have to pay to continue using it. For testing purposes it is totally fine to get a free domain that you will discard later on.
A good source of free domains is freenom.com. They will give you a domain in a strange country on the other side of the globe totally for free for three months. That is more than enough time to learn how to set up everything.
You can decide if you want to buy an address later, but bear in mind that if you are planning a website that is supposed to have actual reach it is unwise to change the name every three months. You will lose your readers and your rank in Google search results. Use those three months from Freenom to think of a good domain name and use domain hacks for more pizzazz!
Bonus: PoE Hat
If you have a router that supports PoE (Power over Ethernet) you can buy a PoE Hat for your Pi. It is an accessory that allows foregoing the power supply! You can power your Pi directly from your router. This device does require a router supporting PoE and some knowledge though. Hold off with PoE until you know why you should get it.
You can also get a UPS (Uninterruptible Power Supply) Hat for your Pi. This is an accessory that will protect your Pi against a power outage. Depending on the UPS you get, your Raspberry might survive even a full day without any power coming from your wall!
Why is that of interest to us? SD card errors. Unfortunately your SD card might easily get corrupted if you lose power and do not shut down the Pi before that happens. There is nothing you can do to prevent accidental corruption with an abrupt power outage, but you can prevent the power outage. Mind you that your server will still be unreachable, as your router will most likely go down with the rest of your home appliances, but at least when the power comes back your Pi will not have a corrupt card! Neat!
This is not considered to be required hardware, but a highly recommended one when running a server. You can also get a standalone UPS that will be plugged between your main power supply and your Pi.
Word of caution with UPS hats
This is an accessory that will draw power 24/7 and direct it either to a battery or to your Pi. Get something that actually is trustworthy. UPS hat is not something you want to get from Aliexpress. Get it from a trusted source! Same goes for the battery. I had one dying on me right in my bedroom due to a chip failure. Not a pretty smell, not to mention the danger of fire or explosion.
Required hardware list for a Raspberry Pi powered server is short, cheap and also a good way to start learning about self-hosting or working with web in general.
The total cost of required hardware can be as low as $20 if you buy everything brand new. The only recurring charge is the domain, but if you look around, you might just find a provider that will set you up with a cheap one. I paid $15 to get mine for 10 years.
You will also have to pay for internet and electricity, but you have internet anyways and that $5 for powering the Pi is just negligible.
Bonus: my setup
I run a pretty basic setup as the main server
- RPi 4B 4GB
- SanDisk Ultra 32GB
- FLIRC case (grey/black version)
- Official RPi power supply (black)
- Cheapest 30 cm ethernet cable I could find ($1.5)
- ICY BOX dual bay 3.5″ RAID1 enclosure
- 2x WD Blue 2TB HDD
- Total price: US$230
I also have a backup Pi for testing purposes.
- Pi Zero W
- Nearest phone charger with 5V 1A
- Cheapest aluminium case on the market I could find
- SanDisk Ultra 32 GB
- Total price: US$25
It is unwise to test services on a live production server. Get yourself a cheap Pi0 for testing!