Running Proxmox on a Raspberry Pi

Running Proxmox on a Raspberry Pi

Introduction

Running Proxmox on a Raspberry Pi is perfectly possible but why would you want to?

As you may already know, I run Proxmox on my servers, and I have quite a few of them. These servers are located in my Garden Room, which serves as my home office. Despite the heavy insulation, the office gets hot when the sun shines in the UK. The black rubber membrane roof and all-day sun exposure contribute to this heat buildup.

My servers are housed in a tall server rack with an extractor fan above it to remove most of the heat. However, on hot days, the temperature inside rises significantly, causing the server fans to run loudly. Anticipating a spell of good weather, I decided to turn off one of the two servers that run 24×7 and transfer all workloads to the other one. While this isn’t ideal for disaster recovery, it helps reduce heat generation and saves on electricity.

After transferring the workloads and shutting down the server, I thought the job was done. However, I quickly discovered that I couldn’t access the Proxmox Control panel. It turns out that both servers need to be running to access the control panel when they are in a cluster.

I considered running one of my smaller servers, but even they generate a considerable amount of heat. Then I had an idea: could I use a Raspberry Pi instead? I happened to have a spare one in a drawer, and after some research, I found out that you can indeed run Proxmox on a Raspberry Pi!

Proxmox on a Raspberry Pi

Normally, when I install Proxmox, I download the standard x86 installer, put in on a memory stick and install it from there. You obviously can’t do that on a Pi. You have to install a Raspberry Pi OS on to a memory card, boot that, and then install Proxmox from the command line.

These are the steps: –

Setup the Pi

My Pi was a Pi 4 with 4Gb of Ram. I also had a couple of PoE hats that I bought for another project. So, to reduce the number of cables and negate the need for a separate power supply I installed one on the Pi.

The I went through the normal process of creating a bootable memory card for the Pi. I installed the Raspberry Pi Lite 64-bit OS. This has everything needed for Proxmox. The first time I installed it I forgot to install SSH and set a user / password. So I did it all again. However, try as I might, I could log in. It looks like you have to have a lowercase password for SSH. Once I changed it to lowercase, it worked first time. I am not sure that this was really the cause but the only thing I did was change the password to be lower case and it worked – YMMV.

Once the Pi booted and I could SSH into it, I ran the following commands: –

sudo apt update
sudo apt upgrade

After answering ‘Y’ and allowing it to download and install updates, I rebooted and logged in again.

Installing CURL

The command line installer for Proxmox uses Curl to install, so first I have to install that with the following commands: –

sudo apt install curl

Static IP Address

Proxmox, like most server solutions, works best with a static IP. I did this by setting up a reservation in my router. You can also do this on the Linux OS too.

Proxmox expects your hostname to point to the IP address of the server – in this case the Pi. So, I then edited the hosts file using this command: –

sudo nano /etc/hosts

With the hosts file open in Nano, I changed it to look like this: –

192.168.1.142            proxmox

I then save the file using CTRL + X,Y

You can then verify it has been applied by using the following command: –

hostname --ip-address

If everything is working, you should get your ip address back, in my case 192.168.1.142.

Set password for ‘root’

The next thing we must do to use Proxmox on the Pi is set a password for the “root” user. If we don’t set a password for this user we will be unable to login through the Proxmox web interface.

You can set a password for the root user using the command below within the terminal.

sudo passwd root

I changed the password and carried on.

Adding the Proxmox Repo

There are a few Repos you can use where others have created Pi versions of Proxmox – I chose https://mirrors.apqa.cn/proxmox/debian/pveport.gpg

I issued the following commands to set this up: –

curl -L https://mirrors.apqa.cn/proxmox/debian/pveport.gpg | sudo tee /usr/share/keyrings/pveport.gpg >/dev/null

echo "deb [arch=arm64 signed-by=/usr/share/keyrings/pveport.gpg] https://mirrors.apqa.cn/proxmox/debian/pve bookworm port" | sudo tee  /etc/apt/sources.list.d/pveport.list

As this has added another repo to the Pi, you then need to update packages again with: –

sudo apt update

Before you can finally install Proxmox, you need one more package to be installed and that is ifupdown2. This allows Proxmox to control the network settings it needs. To do this I ran: –

sudo apt install ifupdown2

Installing Proxmox

Now for the best part – installing Proxmox. To do this, I ran: –

sudo apt install proxmox-ve postfix open-iscsi pve-edk2-firmware-aarch64

This part takes a little while but I was surprised how quick it was given it was running on a Pi 4.

During installation I was asked to configure something called Postfix which handles emails. I set this to ‘Local Only’ and set the name of the System Email name to ‘proxmox’.

That was it, Proxmox was installed.

I accessed it using the usual https://<ipaddress>:8006 url and it worked. I signed in using root and the password I set earlier and I was in.

For me, I wanted it as a low powered, low wattage member of my cluster, so I joined it to the cluster and everything worked flawlessly. I turned off the server without any workloads on it, the fans stopped, my office was quieter and cooler and I could still manage my Proxmox servers.

Conclusion

Reducing power consumption and heat generation is easy with Proxmox and a Raspberry Pi. Whenever I need the additional processing power of more servers, I can simply switch them on and move workloads about. If I only want thing ticking over, I can move them back to a single machine and turn them off. All without losing connectivity to the cluster.

Stephen

Hi, my name is Stephen Finchett. I have been a software engineer for over 30 years and worked on complex, business critical, multi-user systems for all of my career. For the last 15 years, I have been concentrating on web based solutions using the Microsoft Stack including ASP.Net, C#, TypeScript, SQL Server and running everything at scale within Kubernetes.