Install Webmin on Raspberry Pi is easy. Before we start, let me introduce Webmin. Webmin is a software that allows you to manage your Unix or Linux machine (e.g., Raspberry Pi) or server (e.g., Ubuntu server) through a web interface. This way, you can manage your machine on any browser remotely without having an SSH client: you can manage user accounts without editing /etc/passwd
, Apache servers, DNS servers, Samba share, and a lot of system administration. Here is a list of standard modules that Webmin support and they come with the Webmin installation so you don’t have to manually install them.
Here you will learn how to install Webmin through the command line or terminal on Raspbian (the Raspberry Pi OS) through its official Debian repository, the easiest way and the most worry-less because you don’t need to download Webmin every time a new version come out and can just use apt update
to update Webmin like other packages on you OS later.
Note that the instructions should also apply to other Debian-based Linux distributions like Ubuntu 20.04, 18.04, and Debian 10, 9.
Contents
Before installing Webmin on Raspberry Pi
You should have access to the terminal or can ssh
into your machine. This won’t affect the installation process but the URL used to access Webmin will change, as you see later.
The user you used to log in should have root access. This is needed to install Webmin system-wide.
Set up Webmin Debian repo
First, we switch to the root user to avoid using sudo
every time. After you run the following command, you will be prompted to enter your password. Then you will see you shell prompt change from $ to #.
sudo su
Next, we will append the official Webmin Debian repository to /etc/apt/sources.list. Use any editor, nano or vim, to open it and append this line https://download.webmin.com/download/repository sarge contrib
. Save and quit your editor.
vim /etc/apt/sources.list
![image 30 Add webmin debian repo to /etc/apt/sources.list](https://i0.wp.com/varhowto.com/wp-content/uploads/2020/05/image-30.png?resize=580%2C261&ssl=1)
Next, we will need to get the package information from the Webmin Debian repository using apt update
.
apt update
Now we’ll add the Webmin key to avoid the packages change over the network. As you may know, this is to avoid a man-in-middle attack. In the following, we switch to /tmp
directory so we won’t need to delete the key we will download.
cd /tmp
wget https://download.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
![image 31 add webmin key](https://i0.wp.com/varhowto.com/wp-content/uploads/2020/05/image-31.png?resize=580%2C332&ssl=1)
Install Webmin on Raspberry Pi
Finally, we install Webmin through apt-get install webmin
. You won’t succeed immediately as the package does not specify the dependencies it needed. But after you run it, you can use apt --fix-broken install
to install the missing dependencies. It requires an extra step but it is not a hard one, fortunately. After apt --fix-broken
installed all the dependencies, run apt-get install webmin
again and this time it will succeed.
apt-get install webmin
apt --fix-broken install
apt-get install webmin
For your reference, the following are the dependencies (you can also install them by apt install apt-show-versions libauthen-pam-perl libio-pty-perl libnet-ssleay-perl perl-openssl-defaults
beforehand but it is not needed):
- apt-show-versions
- libauthen-pam-perl
- libio-pty-perl
- libnet-ssleay-perl
- perl-openssl-defaults
Now, you can access Webmin by entering localhost:10000
. the default port Webmin runs on is 10,000. If you ssh into the machine, you can use yourhostname:10000
to access Webmin. If you haven’t changed the hostname, you can access Webmin by raspberrypi:10000
where raspberrypi
is the default hostname. In the following screenshot, because I have changed my machine hostname to rpi
to allow easy access by just typing 3 letters, so I entered rpi:10000
.
![crop 0 0 1254 1377 0 2020 05 09 The login page you will see after you install Webmin](https://i0.wp.com/varhowto.com/wp-content/uploads/2020/05/crop-0-0-1254-1377-0-2020-05-09-933x1024.png?resize=580%2C637&ssl=1)
You can use your OS username and password to log in. The default login information for Raspbian on a Raspberry Pi is pi as username, and raspberry as password. After logged in, you will see the following web page, the home page of Webmin.
![2020 05 09 1 The front page of Webmin after you install Webmin](https://i0.wp.com/varhowto.com/wp-content/uploads/2020/05/2020-05-09-1.png?resize=580%2C313&ssl=1)
Congratulations! Now you have Webmin installed can can manage your Linux/Unix machine from a browser.
In A Nutshell
Time Needed : 5 minutes
- Add Webmin Debian repository
Run the following command to append
https://download.webmin.com/download/repository sarge contrib
to thesources.list
file:sudo su
vim /etc/apt/sources.list
apt update - Add repo key
We will download the key to
/tmp
and use apt-key to add it.cd /tmp
wget https://download.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
- Install Webmin package
We install Webmin and use
apt
to install the dependencies for us automatically.apt-get install webmin
apt --fix-broken install
apt-get install webmin
- Open Webmin
Open http://localhost:10000 if you install on your Raspberry Pi directly.
Open http://raspberrypi:10000 if you have not changed your hostname.
Replace localhost with the hostname if you chose one. Mine is http://rpi:10000. - Log in Webmin
You don't need to register an account, and can just use your Linux username and password to login.
Tools
- Terminal
- SSH Client
- wget
Materials
- Linux
Reference: http://www.webmin.com/deb.html
4 replies on “How to install Webmin on Raspberry Pi 4”
Final thing:
sudo rm -R /tmp/.webmin
Current repository did not work for me. Needed to add
deb http://webmin.com/download/repository sarge contrib
Nice, thanks a bunch, made me finally install it! 😀
Expcet one small detail – when adding the source to sources.lis, the line to be added is
deb https://download.webmin.com/download/repository sarge contrib
– a small ommission of the “deb”.Good day.
Very good article.
Minor error:
Change “Expcet” By “Except”.
Bye.