The goal of this project is to set up a minimalistic server running on a Raspberry Pi that will be fine-tuned to your needs and run headless – no peripherals are needed. I will walk you through every stage needed to accomplish that in a user-friendly way and try to explain everything as we go. There might, however, be parts that you will have to accept without a detailed explanation in the interest of being newbie friendly. You can research those topics on your own at a later time. A lot of system administration work is searching the internet and it is good to know how to do it. Sooner or later you will find a problem, specific only to your situation, that will require an extensive search with a solution on a very obscure website.
With a proper internet connection and a domain you will be able to substitute most commonly used services like website hosting, email, cloud storage, address books and many more. They might not be as sophisticated as commercial counterparts, but they will be entirely yours.
Purpose of this website
- To document everything I have learned
- To help you set up a similar server for your own needs
There are many guides on the internet, but most are not newbie friendly, complete and coherent, or they assume some level of knowledge. Other than that, it is just for my own benefit. If you happen to make use of it, great! Website is divided into sections so that you can pick and choose which services you want to run on your server.
Initial server setup
Your server will be ready after completing the following steps. It will not host any services just yet, but it will be a great foundation to build upon.
- Part 1 – Required hardware
- Part 2 – DNS configuration
- Part 3 – Installing a minimalistic server
- Part 4 – Basic security
- Part 5 – Port forwarding
- Part 6 – Booting RaspberryPi 4 from USB Drive
For use only on local area network (LAN), it is enough that you install RaspberryOS alone.
General purpose tutorials
This section has a few general Linux oriented tutorials to help you understand the operating system and provide some tips.
- Part 1 – Basic commands
- Part 2 – Useful tricks
- Part 3 – Running script
- Part 4 – Cron, task automation
- Part 5 – Partitioning and formatting your drives
- Part 6 – Mounting external storage
- Part 7 – Backup
- Part 8 – Shell alias, issue commands quicker
- Part 9 – Dynamic MOTD for SSH (in the making)
This section has a selection of services that you can set up on your server. A computer on its own does nothing, services make it useful.
- Part 1 – FTP server
- Part 2 – Web Server – Apache2
- Part 3 – PHP
- Part 4 – MySQL
- Part 5 – WordPress website
- Part 6 – SSL certificate with Certbot
- Part 7 – Samba server (Network Attached Storage)
- Part 8 – Nextcloud
- Part 9 – Email server
- Part 10 – Webmail, access your email from a browser
- Part 11 – Mumble, voice chat application
- Part 12 – Torrentbox
A word of caution
Bear in mind that using such a server for a company to store very sensitive data like payroll or invoices might not be the best idea – get yourself a professional who will do that for you, invest in your future.
Hackers exploiting vulnerabilities and bots can be a bit of a problem. I am talking about actual hackers to whom your server will be exposed and not that one person who posted “I eat farts!” on your Facebook wall when you forgot to log out in the library. Keep that in mind when storing sensitive data.
Expanding the knowledge
Remember that RaspberryOS is a fork of GNU/Linux Debian. If you are stuck, need help with a particular command or just want to expand your knowledge, a great place to start is The Debian Administrator’s Handbook by Raphaël Hertzog and Roland Mas.
The link will take you to handbook’s website where you can read it online. There are translations to various languages – some more complete than others. You can also download it for free as a pdf file or buy a physical copy if you wish to support authors. It is a great read and will greatly expand your knowledge. I cannot recommend it enough.
If I am talking about, for example, packages you can jump to the respective book chapter and learn more. Tutorials have practical knowledge, the book has theory. It does not have all the answers, you will still have to extensively search online for specific topics, but it will greatly expand on tutorials from this site.