For an index to all my stories click this text.
I am building several systems for self hosting all kinds of services. That is because I am fed up with a lot of cloud services that just suddenly stop or move away from being a free service and start charging fees. Read my rant about this here : https://lucstechblog.blogspot.com/2026/04/my-rant-against-some-cloud-services.html
The solution is to self-host services. And I am using multiple Raspberry Pi's for that.
And I must say that that feels really satisfying.
USB devices
I use usb memory sticks for storage of some of the files. There is a reason for that: It is easy and quick to remove the usb drive for updating the files on a different machine.
Now if you are running your Pi's with a Desktop mounting USB sticks and drives is painless.
I am running these Raspberry Pi's headless. Mounting and unmounting USB sticks or drives is a tedious task and I forget it sometimes. When that happens my server obviously doesn't work.
So I was looking for an easy way to mount and unmount USB sticks/drives. And of course there is a great solution available.
pi-usb-automount
pi-usb-automount is simple to use.
Just plug the USB stick or drive in the USB port of your computer and it is automatically mounted as USB0. Add another stick or drive and that will automatically become USB1 etc. The maximum amount of usb devices you can use is 8 (USB0 - USB7).
Installing pi-usb-automount
Before using it we have to install it.
pi-usb-automount is hosted on Github and can be found (inclusive the documentation) here:
https://github.com/fasteddy516/pi-usb-automount
We can download the repositry when GIT is installed on the Raspberry PI. And that is unfortunately standard not the case. So we have to install that first:
sudo apt install git
It does not take long and takes only about 53 MB. So that is no threat for your storage capacity.
When GIT is installed we can download the repositry.
wget https://github.com/fasteddy516/pi-usb-automount/releases/latest/download/pi-usb-automount.deb
And then we can install it with:
sudo dpkg -i pi-usb-automount.deb
That is all.
The USB drives will be mounted on /media/usb0/ /media/usb1/ etc.
Success ????
Let's see if it works.
First let's see what happens if no USB drive is plugged in.
First we point to the USB0 directory with cd /media/USB0/
And then we list the content with LS
AS you can see there is nothing there.
Now plug in a USB stick or drive.
And there it is !!!!!
I used an empty USB stick with just one file on it with the name testfile.txt.
Reboot
Now what happens if we leave the USB stick in the Pi and reboot the system.
And there it already is !!!
This is really the easiest way to mount USB sticks and drives.
Till next time
have fun
Luc Volders