I’m a curious sort and I love learning. I’ve been playing around with computers as a hobby for 40 years; ever since the first MSX arrived in our house, I’ve been curious to try out new things in the world of computing. I’m entirely self-taught, and it’s one of the few hobbies that still keeps me up at night. As part of this ongoing curiosity, I’d been reading about containers for a while – LXC, Docker, Proxmox, Kubernetes and so on – and I started looking into how I could use this technology to breathe new life into my old Raspberry Pi 3b+.
In my spare time – which isn’t much – I started tinkering with OpenMediaVault and CasaOS, two operating systems that look the part and promise a gentle learning curve, but on the Pi 3B+ they fell short in terms of capabilities. With the Pi3b+, you can containerise many services, but the moment you need a bit of performance, it freezes up; it’s limited in terms of RAM and processor power, and this becomes noticeable with services that require more ‘power’. The first thing I wanted to use it for was managing this website; I’d had it hosted with a hosting provider, but they’d restricted half of WordPress’s features, so I installed the WordPress container on the Pi3b+ and cloned the theme from the hosting provider. The main problem, as I’ve mentioned before, was performance, because WordPress alone uses up all the RAM just to handle a simple image change, so I had to consider upgrading my hardware (at that point, I wasn’t yet familiar with the CMS I use now, Grav, or the other alternative I’ve tried, Hugo – two CMSs that use very few resources).
HARDWARE
I was just browsing Chollometro when I came across an Aliexpress offer for a MiniPC BMax B4Plus, which is currently powering this website, amongst many other services. I should point out that there are hundreds of options for setting up a home server: you can use an old desktop computer, an old laptop, an old server, an SBC (Raspberry Pi or equivalent), or go for a new PC, a new laptop or a MiniPC, as I did. There’s something for everyone, and I won’t lie to you; I initially looked for the latest Raspberry model, but the recent price rises have made these SBCs quite an expensive option. After ruling out the Raspberry, I considered a MiniPC for the following reasons:
- Very low power consumption.
- Compact size. I’ve got it next to the router and no visitor has even noticed it.
- They’re silent. At least this BMax model. I know it’s on because of the front light, but it doesn’t make a sound.
- Power. They’re small, but the Intel/AMD processors they’re fitted with outperform any SBC.
The model I’m currently using has an Intel N100 processor, which I think is the minimum you should consider when setting up a home server. Can I use an N95? Of course, the difference isn’t huge, but prices have levelled out quite a bit, so it’s better to go for the higher-end model. Can I use an N150? You’d certainly gain about 10 per cent in performance, but the price far exceeds that 10 per cent. Then there are the MiniPCs fitted with AMD processors, which are just as good a choice as the Intel ones – possibly even better – but I’m not going to get into that here. Although, if I’d found a Ryzen MiniPC on offer for the same price as this BMax cost me, I’d have jumped at the chance...
SOFTWARE
This is where you can get as creative as you like – there are endless options when it comes to setting up a server. The MiniPC came with Windows 11 pre-installed and you can install Docker Desktop, but given my view on these things, relying on Microsoft ‘bothers’ me a bit; I prefer to go for Linux or equivalents for the sake of open-source software – I suppose it’s just my age… There are also operating systems already designed for this sort of task:
- Proxmox is a system designed for virtualisation and Linux containers. It’s highly professional, with loads of options and configurations, and it’s easy to find help online.
- Unraid is another system aimed more at home users, with a huge community. It’s a system with a very gentle learning curve.
- TrueNAS has some very advanced features but you need high-end hardware; it’s advisable to use a PC to run it smoothly.
- OpenMediaVault is another straightforward option, but it is more focused on NAS management. Although it supports containers, this is not its primary purpose.
But I knew I was looking for something simpler and easier to set up; Docker fits the bill perfectly, I just needed a base system. For work, I have a Windows PC, and for personal use I use a PC running both Windows and Linux Mint. I’m not afraid of Linux, so I chose Debian as the base for my server. Debian is one of the cornerstones of Linux, and it’s a system that prioritises stability, so I installed the latest version (Trixie) without a graphical interface to save resources and configured the SSH protocol so I could access it remotely. I won’t go into too much detail here, but if you need help, here you’ll find the official installation guide.
INSTALL DOCKER
Once the operating system is up and running, it’s time to install the platform that will manage the services to be installed on the server. I opted for Docker, which is an application packaging system that includes everything needed for it to run.
Tip
The Docker logo explains how it works very well:
Imagine a cargo ship. Before containers, loading goods of different shapes and sizes onto the ship was chaotic; some items got damaged or simply wouldn’t fit. With standard metal containers, it doesn’t matter whether you’re carrying clothes, food or televisions – everything goes inside its own sealed box. The ship only transports boxes. Docker does exactly the same with software. It puts a programme, along with its exact versions of libraries and code, inside a container.
A Docker container is much lighter; it shares the essential resources of the server’s operating system where it is installed, but keeps the application isolated. That’s why it starts up in seconds and takes up very little space.
Let’s install Docker on the server running Debian:
- Update the Debian operating system
sudo apt update
sudo apt upgrade
- Create a directory for the containers
mkdir docker
- Dpwnload and install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
- Add user to group Docker
sudo usermod -a -G docker $USER
- Reboot system
sudo reboot
- Check the installation
docker --version
docker run hello-world
docker compose --versión
After checking the Docker version, confirming that “hello-world” is working and checking the active version of Docker Compose (the tool that will allow us to create the configuration files for each container), we are going to install a graphical Docker management panel. This web-based management panel is called “Portainer” and its purpose is to facilitate the management of containers via a graphical interface.
To install Portainer, we will follow these instructions:
- Create the data volume for Portainer
docker volume create portainer_data
- Run Portainer
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Web access to Portainer
https://server_ip:9443
Once Portainer is installed, log in to its web platform, create a user account, and you will see that the “hello-world” container is still running. You can now stop and delete it; it is a test container and is no longer needed.
Before concluding this article, two further notes.
Note
- Update Portainer
docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:latest
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Update docker containers from your own folder
docker compose pull
docker compose up -d