Installing Proxmox

Kyle Prince - - 10 mins read

Hardware Choice

I have purchased a used Lenovo M715q workstaion computer to use for running my homelab. I chose this computer since…

  1. it was cheap
  2. it is small
  3. it will use very little power
  4. it was right in front of me.

I am truly an opportunist and I wasn’t looking for anything in particular. For anyone who is new to homelabbing and just wants to start learning I would advise getting something cheap. Unless you already have a specific purpose in mind, that has very specific hardware requirements, use what is available. If you have a computer that was built in the last 15 years, chances are, it will be adequate for running proxmox or another hypervisor, use it. If you need to purchase something, new hardware will be faster, but more costly. For most self hosted software, harware requirements are minimal and can run on a potato. Used server hardware is a tempting option, since it can be similar in price to new hardware, but I would advise against it. The power draw of this equipment is immense, it is noisy (ask me how I know), and newer consumer hardware at similar prices will outperform the older equipment. The real advantage of older server equipment is failure redundancy. ECC ram, dual power supplies, SAS hard drives are all great features of server hardware. In my opinion, they are not worth the trade off in power usage and noise since modern consumer grade hardware is quite reliable. If you want performance, I recommend new consumer grade hardware. After saying all that, I opted for wallet freindly. You do you.

Install Media

For this install, I downloaded the ISO from the Proxmox website. I connected a PiKVM (I put this together with a raspberry pi 4 and HDMI capture device) to a USB port and HDMI port, for a remote install. The PiKVM offers a virtual drive that I can boot from by uploading the ISO file that I downloaded from Proxmox. If you don’t have a PiKVM, you will need to use a USB drive. A flash drive can be used by writing the ISO file to it with a program like Belena Etcher or rufus, or installing Ventoy (love it!!) and dropping the ISO file onto the stick.

Install Preparation on PC

With these things done, there are a couple of things to look at on the computer itself. There are typically some virtalization setting in the bios. Accessing the bios is different for all computers. While the computer boots there is typically a “Splash Screen” for the motherboard manufacturer that you will have to smash one of the F keys or del or even tab. It is typically shown on the bottom of the splash screen. Since the bios is different for all boards you will have to navigate to find the virtualization settings for your own system. For mine, I have to ensure that SVM mode is enabled, since I have an AMD CPU. If you have an intel processor, you will likely be looking for VT-x to be enabled. If you are planning to have proxmox use Wake-On-Lan you should also make sure that wake on lan is enabled in the bios. Those are the only setting in the bios that are required for Proxmox, however, while you are in the bios settings it is an opportune time to set the boot order to boot from USB first.

Installation

I booted into the install media from my virtual CD/DVD drive on PiKVM but if you have a USB drive inserted the install process is the same. Once booted into the installer you will have to accept the license agreement, just like any other software. If you’ve only got one drive, I recommend using a simple ext4 file system on the drive. I’m not going to cover the other options in this article since I could easily get side tracked and ramble on. You will have to enter your country and time zone. Thankfully the installer makes this really easy with an autofill for your country and a drop down menu for the timezone. Then you need to create a password for the root user account on the proxmox host. Make sure this is a really strong password (passphrase), since the root user is required for proxmox. You are required to enter an email address but since this is not used to contact you, you can fudge this one. I have always used my legitimate email, except in the video and I have never received any mail. The next screen is going to ask you to choose a management interface. If you have multiple NICs you will want to choose the one that you will manage proxmox from. I only have one so I don’t have an option. On this screen you will NEED to enter an ip address for your proxmox server. If you don’t have this configured you will not be able to remotely access proxmox. It can be configured later but it’s so much easier to enter it now. If you want to have access to updates, make sure you enter in the ip address of your router as the gateway. If you don’t have your own DNS server, you can use a public dns server like 8.8.8.8 from google, or typically your router will have a dns resolver. You will also need to give proxmox a fully qualified domain name. That is a name in the format “hostname.domainname.topleveldomain”. I recommend purchasing a domain if you can. They are relatively cheap and allow the use of ssl/tls ecryption, but that’s for another article. If you don’t have one just use “home.local” with the hostname of your choice. I chose to get extremely creative and called mine homelab. I hope I can remember what it’s for( I hope the sarcasm wasn’t too subtle here ). After entering those setting there will be a summary page to confirm your settings and a promt to install. I couldn’t hit install fast enough. Watch the magic happen and the server will reboot when done.

Post Install

No-Subscription Repository

If you purchased a license from proxmox, which I would recommend if only to support the proxmox team, then you can use the licensed repositories. For us poor people that cannot afford the license, proxmox has not left us out in the cold. We will have to enable the No-Subscription repositories in the updates section of the web interface. After clicking on repositories in the center menu you will see the current active repositories listed on the right hand pane. I clicked “add” and was greeted with a pop up window announcing that I did not have a subscription. Get used to this, because you will see it everytime you log into the server. There are ways to disable this pop up but I think it’s a small price for all the work that went into this project, so I leave it as is. After you aknowledge that you haven’t bought a license, select No-Subscription from the drop down menu and then add. You will have to disable the enterprise repositories or the updates will fail without connection to the repositories. To do that I clicked on the enterprise repository in the list and clicked disable. Easy peasy.

Non-Root User

In the video I created a non-root user. I don’t necessarily think that is something that most should do. The reason that I did it was to have an admin user with an SSH key authentication and to disable the root user for ssh, since the root user is required for proxmox. My Homelab should be a safe space, but I dislike having the root user on any system to be accessible. WARNING: disabling root access through SSH can break proxmox cluster functionality. If you have more than one server you may want to leave SSH settings alone For this reason I will not be showing how to disable root SSH. To allow access to a non-root user, I first had to create the user on the proxmox host.

adduser username

Then create a password for the user. You do not have to enter any of the personal detail for the user that is asked, but you can enter it if you want. To leave blank just hit enter. To git my new user admin privileges I need to add the account to sudo. Since proxmox is inteded to be administered from the root account, sudo is not installed. You need to install it.

apt install sudo

Then add the admin user to the sudo group

usermod -aG sudo username

Now you have a non-root user that can access and administer this proxmox server remotely. I will recommend generating an ssh key and installing it to your users home directory. This process will vary depending on the OS running on the device that you are using for remote access.

Wake-On-LAN

This was the hardest thing for me to find and implement. If you are close to your server it may not be worth the hassel to set up. You can physically turn on the system with the push of a button if you are in the same room. If you have your proxmox server in a remote location and you are energy consious enough to turn off your server when you are not using it, then WOL is useful. You will need to have a way to send a “Magic Packet” to your server to turn it on. I have used phone apps for this, the PFsense router built in WOL service and I’ve even programmed a raspberry Pi pico w for this(comment in the video if you wanna see this project). The first thing you need to find out is the name of your NIC on the proxmox install.

ip a

In the output that follows you should look for something that starts with “eno” or “enp”. From my server I’ve taken this from the output

2: enp1s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP>
    link/ether 6c:4b:90:6c:3d:63 brd ff:ff:ff:ff:ff:ff

From this, I can see that enp1s0f0 is the name of my NIC. With the name of your nic you can use ethtool to see if your NIC has WOL capability.

ethtool enp1s0f0 | grep Wake-on

This should give you a line like Supports Wake-on: pumbg in the output. If the output shows :none then your nic doesn’t support WOL. Even if your card does support it, by default in proxmox the WOL is disabled. I won’t be getting into the different types of WOL, but if you see a g in the list of supported WOL types then you can follow along with what I’ve done here. I have followed several guides to get WOL enabled in the config files and the GUI but all of them only worked once. This is the only way I have found to keep WOL persistant. To do that, I created a systemd service file.

vi /etc/systemd/system/wol.service

Change the name to your NIC if it is different and add this to the file:

[Unit]
Description=Wake-on-Lan for enp1s0f0
Requires=network.target
After=network.target

[Service]
ExecStart=/usr/sbin/ethtool -s enp1s0f0 wol g
ExecStop=/usr/sbin/ethtool -s enp1s0f0 wol g

[Install]
WantedBy=multi-user.target

And then you need to enable the new service.

systemctl daemon-reload
systemct enable wol.service --now

Enjoy the Server

So that’s it. Proxmox is installed and ready to use. You can now start creating Virtual Machines and LXC containers for all your self hosted fun. It’s time to break and rebuild anything you can think of. Happy labbing!!