Menu Close

Install Webmin on Raspberry Pi

Install webmin on Raspberry pi

This post may contain affiliate links.  If you make a purchase I may get a commission at no cost to you.  Please see the Disclaimer for additional information.

Installing Webmin on your Raspberry Pi provides an excellent web-based system administration for an headless installation. It removes the need to edit configuration files and make the whole role of administrating your Raspberry Pi a lot easier.
Using Webmin on your Raspberry Pi makes it easy to setup, control and modify application such as a Samba Server, SQL, Apache server, DHCP, PHP or a plethora of software package.

There are 2 different ways to install Webmin on Raspberry Pi, manually and using the apt package manager

Before beginning

Equipment

Raspberry Pi 2 or Newer (2, 3, 3B+ or 4)
32GB MicroSD card (if you don’t buy a Raspberry Pi kit)
USB Keyboard (if not using SSH)
USB mouse (if not using SSH)
USB Keyboard and mouse combo (if not using SSH)
HDMI Cable (if not using SSH, Raspberry Pi 3B+ and lower)
HDMI Adapter (if not using SSH, Raspberry Pi 3B+ and lower)
Mini HDMI Cable (if not using SSH, Raspberry Pi 4)
Mini HDMI Adapter (if not using SSH, Raspberry Pi 4)
Ethernet Cable (if no Wi-Fi is availlable)
Wi-Fi Dongle (optional)
Raspberry Pi Case (optional)

Install an OS on your Raspberry Pi

If that is not already done, you need to install an OS on your Raspberry Pi. Just follow this great and easy guide on How to Install an OS on a Raspberry Pi and you will be good to go.

Update the Raspberry Pi

A good habit when installing new packages is to make sure that the package list and the installed packages are all up to date. This ensure a good working environment and reduces the amount of potential problems. Simply run the following command:

sudo apt-get update 
sudo apt-get upgrade

Installing Webmin on Raspberry Pi – Manually

Installing Webmin is quite easy even if it’s not installed througth the package manager and only requires 2 steps *Downloading the latest package; *Installing the package.

Ok… 3 steps… You also need to install Webmin dependencies. Let’s start with that.

Webmin dependencies

Install the dependencies with the following command:

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Download the Webmin package

Once the dependencies installation is complete, you can download the latest webmin deb package. First, verify the latest package version number and update the command with the correct version.

Sudo wget http://prdownloads.sourceforge.net/webadmin/webmin_1.955_all.deb

Install the Webmin deb package

Once the package download is complete, which shouldn’t be too long, depending on your Internet speed, you can use the dpkg command to install the package:

Sudo dpkg --install webmin_1.955_all.deb

The command will run automatically and may take some time.
Don’t touch anything until everything is complete!

Installing Webmin on Raspberry Pi – Using APT Repository

Also, you can install the package using the package repository, to get automatic updates. The process is longer to setup but once done it integrate completely with the apt package manager.

Add the Webmin repository

The first step is to add the Webmin repository to the apt package manager source list /etc/apt/sources.list file on your Raspberry Pi. You simply need to add the repository line at the end of file

Sudo nano /etc/apt/sources.list
deb https://download.webmin.com/download/repository sarge contrib

Close and save the file using ctrl+x and y followed by enter.

Add the GPG key

Once the file update is complete, you need to download and add the key to the apt package manager. Simply use those commands as the root user:

cd /root
wget https://download.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc 

Once this step is complete, you have everything set up correctly to install Webmin on your Raspberry Pi with the apt-get command :

apt-get install apt-transport-https
apt-get update
apt-get install webmin 

The package manager will install webmin ou your Raspberry Pi with all the dependencies automatically.

Accessing Webmin on your Raspberry Pi

Now that Webmin installation on your Raspberry Pi is complete, it’s not good at anything if you can’t access it. Webmin serves a webeserver on port 10000 of your Pi. As such, you can access it with your Pi’s ip address or it’s hostname followed by the port number 10000.
As an example, if you want to access the Webmin on your Raspberry Pi named “OpenHabServer” at 192.168.3.34, you can use: https://192.168.3.34:10000 Or
https://OpenHabServer.local:10000

As you connect to your Webmin instance, you will get a Warning about invalid SSL certificate. This warning comes from the fact that the Webmin server as created a Self Signed ssl certificate. You still can procede, it’s your Webmin installation.

You will get to a login screen in which you should use the credential for your user, the same as for an SSH connexion or login to your Pi’s desktop. If you didn’t change them, they should be:

  • User: raspberry
  • Password: pi
Webmin login screen

Congratulation! You are in and you can start managing your Raspberry Pi with Webmin!


Install Webmin on Raspberry Pi

Configuring your Webmin for Raspberry Pi

 

You are now ready to start configuring your Webmin installation.
The first thing you should do, if it’s not done already, is to change your current user password.

Webmin change password

Once this is done, you can use Webmin to install and configure a lot of usefull package, such as a Samba server and it’s share.

Updating Packages

Additionally, you can easily update all of your packages through the Webmin user interface. As such, to update all of your packages, you first, need to click the Dashboard button just above the left-hand sidebar.
Once you are in the Dashboard, you need to locate the Package updates field. Also, if there are any updates available, you’ll see a link that states the number of available updates.

webmin update package

Clicking on the link will bring you to tue Update page where you can simply press the Update selected package to start the update. You can visually see the update as you would if you had an SSH connection.

Webmin update selected package
webmin package updating

Once the update is complete, there is a good chance that Webmin will ask you to reboot the server. Rebooting the server is another task you can easily do through the Webmin interface.

Conclusion

You now have a secured working instance of Webmin and you have been able to use the interface to update your packages.
Also, Webmin gives you access to many things you would normally need to access through the console. And, it organizes them in an intuitive way. As an example, if you have a Samba server installed, you would find the configuration page for it under Servers, and then Samba. I suggest that you explore the interface, and/or read the Official Webmin wiki to learn more about managing your Raspberry Pi with Webmin.

Enjoyed this post?

Follow us on Pinterest for additional awesome ideas!​

Some posts on this blog contain affiliate links.
At no additional charge to you, I receive a small commission whenever a product is purchased through these links. The Dreaming Dad is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.