*not* just another blog ;)

Remove a node from Proxmox 5

- Posted in Quick Tip by with comments

I have a Proxmox cluster set up using a few dedicated servers on the same network. I have decided to downsize my cluster and remove 2 of the nodes, leaving only 2 behind.

Normally, to remove a node from Proxmox it's a simple matter of shutting down the node to be removed and then on one of the Proxmox cluster members, removing it like this:

pvecm nodes

That will list the nodes in the cluster

pvecm delnode <nodename>

Which will remove it from the cluster.

However, when I went to do that I was given an error:

cluster not ready - no quorum?

Ruh roh! A simple fix is to let Proxmox know that there are only 2 servers left in the cluster, therefore the number of "votes" the quorum needs to do things will be set.

pvecm expected 2

Then try pvecm delnode again:

pvecm delnode testnode3

The output you will see if succesful will be similar to this:

Killing node 3

To remove them from the web UI, we need to delete the folders like this:

rm -rf /etc/pve/nodes/nodename

And we're done :)

I have a solution for the annoying issue you may encounter when using a Raspberry Pi with a USB mouse (both wired and wireless) where the mouse movement seems either jerky, laggy, erratic, slow, laggy etc.

What you need to do is take the SD card out of the Pi and put it into your main computer, and then open the BOOT partition, then look for a file named:


You will see a line in that file, what we need to do is add the following to the END of that line. NOT on a new line. It must be at the end of the line:


Save, and safely unmount or eject the SD card. Pop that back into the Pi and boot up, you should have nice mouse movement now :)

A quick tip so that I don't forget this again. By default, VestaCP will set directories to disallow listings, for example, example.com/files would show a 403 error instead of listing the contents.

Sometimes, though, it's desirable to have a list shown to the user, so all we need to do is create or modify the .htaccess file in the top level folder.

For example, in /home/user/web/example.com/public_html/files/

nano .htaccess

Add the following to ALLOW listing:

Options +Indexes   


Options -Indexes   

Hopefully this also helps someone :)

Today I will be setting up SSL certificates for Proxmox 5 so that when you go to the web UI, it will be HTTPS and not using the self-signed cert that comes with Proxmox, which is rather insecure.

I will be doing this with Certbot.

First, we need to install Certbot:

apt install certbot -y 

Now, we need to set up the domain we're using for PVE and obtain a certificate:

certbot certonly

I will be using option 2, to spin up a temporary webserver so that certbot can verify that the domain points to the IP of the Proxmox server.

Now, we need to copy the cert files into the Proxmox directory like this:

cp /etc/letsencrypt/live/**yourdomain.com**/fullchain.pem /etc/pve/local/pveproxy-ssl.pem
cp /etc/letsencrypt/live/**yourdomain.com**/privkey.pem /etc/pve/local/pveproxy-ssl.key

And when that's done, we need to refresh Proxmox so it can be aware of the changes:

systemctl restart pveproxy

You should be able to see that it's now accessing through HTTPS and with a valid certificate - no more warnings :)

We need to make this permanent, so we'll create a cron job to keep it updated and renew the cert as needed:

crontab -e

Then paste the following on a new line:

30 6 1,15 * * root /usr/bin/certbot renew --quiet --post-hook /usr/local/bin/renew-pve-certs.sh

Control-X to exit, Y to save and press Enter to save the file with the original name.

And we're done :)

I'm going to add something extra here because it might apply to you too, but if you're also running VestaCP on your Proxmox server with port 80 and 443 forwarding to your VestaCP server, the certbot method shown will fail - what we need to do is set up the PVE domain in VestaCP first, which will work, then copy the files from VestaCP to Proxmox and then follow the steps. I'll clarify this if someone comments requesting more details.

Note to self: Only use LTS releases

- Posted in Quick Tip by with comments

I, for some reason, had a VM running Ubuntu 17.04 which is not an LTS release. To be honest, I never knew what all the fuss about LTS was anyway.

As it turns out, unsupported means apt doesn't work!

Upgrade to the next distro by doing:


And let it rip. In my case, I was trying to install an FTP server on a VM that was running Ubuntu 17.04 and apt kept saying that there was no release file, also giving me an error about not being able to securely download a list when trying to update.

Setting up FTP backups for VestaCP

- Posted in Quick Tip by with comments

By default, VestaCP will do a daily backup and store it on the same file system that VestaCP is installed on, which isn't great if something happened to that and that was our reason for wanting to restore!

What we're going to do is set VestaCP to backup to the local storage and also an FTP server.

I've already set up my FTP server, so all I need to do next is change the VestaCP config. First, we need to create the config file:

sudo nano /usr/local/vesta/conf/ftp.backup.conf

And then paste the following into it, keeping in mind that you will need to change the options to match your FTP server:

PASSWORD='[email protected]'

Once you've got that done, it's time to let VestaCP know about this, so we're going to edit the config file an add ftp to the list of backup targets:

sudo nano /usr/local/vesta/conf/vesta.conf

Find the line that looks like this:


And change it to this:


Now when VestaCP does its daily backup, it will save it to the FTP server too.

Installing youtube-dl on Linux

- Posted in Quick Tip by with comments

I want to install the latest version of youtube-dl for Linux, the one that comes in the apt repository is horribly outdated and often doesn't work, so here's how you do it:

This will download the files needed..

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

And this will set it up so it can be executed..

sudo chmod a+rx /usr/local/bin/youtube-dl

Now we can run it:


We can update it also if there are some videos that give errors, which is a pretty common cause for an update:

youtube-dl -U

And we're done :)

I'm setting up my elementary OS 0.4 installation, and I am trying to use the terminal, which is very nice by the way - however there are no options available. I can't change the font sizes or colours, etc. What I need to do is install something called elementary tweaks.

First, we need to install the things we need to add a ppa repository:

sudo apt update && sudo apt install software-properties-common -y

Now, we can add the PPA for elementary tweaks:

sudo add-apt-repository ppa:philip.scott/elementary-tweaks && sudo apt-get update

Then finally, we can install elementary tweaks:

sudo apt install elementary-tweaks

And if you go into the System Settings (Applications -> System Settings) you will see "Tweaks" installed.

And we're done :) Now I can change the terminal font plus a lot more!

I've just installed a fresh copy of elementary OS and I have noticed that out of the box, the AppCenter is empty - says there is nothing to display, which isn't right!

I opened the terminal and did an apt update:

sudo apt update

And then rebooted:

sudo reboot

And now when I open AppCenter everything shows up :) It's a nice simple fix for what could have otherwise been a headache.

This is how you install VirtualBox 5.2 in Ubuntu 17.10

First, we'll add the repository to /etc/apt/sources.list

sudo nano /etc/apt/sources.list

Then at the bottom, we need to add the following line for Ubuntu 17.10 - Note that if you're using a different distro, replace "artful" with whatever the other entries in your sources.list say.

deb https://download.virtualbox.org/virtualbox/debian artful contrib

Once you've done that, control-x to exit, y and then to save.

We need to add the security key for that repository, we do that in one line:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Once that's done, we need to update the apt lists:

sudo apt update

Now we need to install dkms which is some kernel drivers that let VirtualBox do what it does best, it's important we install this first as there can be some issues otherwise:

sudo apt-get install dkms

Once that's installed, we can install VirtualBox:

sudo apt-get install virtualbox-5.2

And now it's ready to use!

Just open virtualbox from the terminal to make sure it's all fine, it will let you know if you need to download an update or extra files at this stage:


And we're done!