A new version of this series has been published. Please refer to the new index for updated articles and ordering. This article is kept for historical reference, but should be considered out of date.
Note: This article is part of a series. See the Index for more information.
Self-promotion: I’ve recorded this series as a screencast for Pluralsight:
If you have a Pluralsight subscription, please consider watching it. Thanks!
Updates: Everything in this post seems to work just fine under Jessie, so there are no changes to report.
SSH is a simple way to remotely log in to your machine’s command-line interface, but that’s not always the most convenient way to work. There is a wonderful web administration system called Webmin that can handle a lot of the “magic” of system configuration. Webmin can take care of a lot of the tasks you’d normally do from the command line, but in a much friendlier way. In addition, you can add Webmin modules for many of the features we’ll be adding to the Raspberry Pi in this series.
It’s pretty easy to install, so let’s get started.
You can’t just install Webmin through apt-get like the other software packages so far because apt-get doesn’t know about Webmin, or at least it doesn’t know about it yet. There are several approaches to a Webmin installation, but I’ve found that the easiest is to simply tell apt-get where to get the packages it needs for Webmin. Edit apt-get’s list of sources like this:
sudo nano /etc/apt/sources.list
When the editor appears, add the following two lines to the end of the file:
deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Note: Your browser may wrap these lines, but make sure they go in the sources.list as two lines like this:
Press Ctrl-x,y,enter to exit nano, saving the file. Next you’ll need to import the signing key that verifies the packages coming from the new repository. These next few commands need to be run as the actual root user of the machine. This is the first time this series has done this, so I’ll break it down for you. Type the following to temporarily become the root user:
Your command prompt will change, losing all of its color, and becoming more sinister, dark, and dangerous looking like this:
You are now operating as the root user of the machine. The root user can do pretty much anything. Unlike the Windows world, Linux users try to spend as little time in “God-mode” as possible.
Type the following commands to import the Webmin repository’s signing key:
cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc exit
That last “exit” tells the system that you want to stop being the root user now, and go back to being “pi”. The final result should look like this:
Now that you’ve added Webmin’s repository to the list of places apt-get will look for stuff, update the list of available packages again.
sudo apt-get update
Note: You may or may not see an error during this process. I presume that’s why the Webmin folks had you add two repositories, in case one of them is down. If you get an error, try the next steps anyway. If it still fails, double-check that you got the repository addresses exactly right, and try again.
Now that apt-get knows where to get Webmin, you can install it just like you have everything else so far.
sudo apt-get install webmin
When the installation is complete, you can test it by opening a browser, and navigating to the IP address of your server, but specifying https and port 10000 rather than the default http port of 80. If you forget the “https” part, you’ll see a friendly page that offers to redirect you. Either way, you’ll probably also get a warning about the site not having a valid certificate, which it doesn’t. Proceed to the page anyway, and the result should look like this:
Log in as “pi”, and you’ll see the main Webmin interface, which looks like this:
Poke around a bit, and see what Webmin is all about. You can monitor storage and memory usage from here, be notified about updates, apply them, manage user accounts, and a lot more.
Look inside the “Un-used Modules” section to see all the things that Webmin could help you manage, if you had those packages installed. It’s a pretty impressive list.
You’ve reached another milestone, and I strongly recommend politely shutting down the Raspberry Pi (sudo shutdown –h now), and taking another backup of the SD card.
In the next post, we’ll add the ability to remote desktop into the Raspberry Pi.
Pingback: Raspberry Pi Home Server: Index | MelGrubb.ToBlog()
Pingback: Raspberry Pi Home Server: Part 3, Configuring the OS | MelGrubb.ToBlog()
Pingback: Raspberry Pi Home Server: Part 10, CrashPlan | MelGrubb.ToBlog()
Pingback: Raspberry Pi Home Server: Part 10, CrashPlan | MelGrubb.ToBlog()
Pingback: The Raspberry Pi Home Server – Part 1 | UnaX.dk
Had no problems with my RPi 2 + Jessie. Many thanks!
Is it also possible to download the minimal Webmin through `apt-get`?
That’s how it’s done in the article/screencast. You have to add the Webmin sources first, though. It’s not in the standard Raspbian repository.
During “sudo apt-get install webmin” the process seem to hang at the stage of
“unpacking webmin(1.770) over (1.770)”
It’s now more than an hour like this.
Any idea what is happening?
I’ve seen a delay during the installation, but certainly not an hour. Maybe the internets are clogged. You could try ctrl-C-Ing your easy out of it and starting the install again just to see if it behaves any differently. The text you included reads like it’s reinstalling a version that’s already present, though. I’m a little intrigued by that. I don’t have the normal text committed to memory, but the phrasing above seems to suggest that to me.
Well eventually the process completed – that was very long.
Actually I did a ctrl-c before posting this question. After that It refused to install again and I had to run “dpkg –configure -a” to fix it and run the installation again.
Hi, i’m facing the exact same issue as Gilad, had to dpkg ans trying to reinstall as I type this message
it has finally finished, after about 50minutes “idle”!
That’s weird. I wonder if something has changed with their installer lately. The last time I ran through this whole process, I certainly didn’t have a delay anything like that.
I can confirm that Webmin 1.810 takes forever (30-45 minutes) to install and will seem to hang up on several steps, as of 23 Aug 16.
Patience, Caterpillar. Install eventually it will.
Strange. I’ve never noticed it taking very long at all. Luck of the draw?
In my case, I cannot say for sure that it was not on my end, since my dsl connection is very bad and somewhat unstable!
Pingback: CrashPi – An off-Site backup for the whole family | MelGrubb.ToBlog()
Hi Mel, I did all the steps, but cannot login. I’m running OSMC – which is probably why it’s not working. When I SSH the username is: osmc, and the password is: osmc. Any ideas would be most welcome. Cheers, and have happy new year when it comes.
I can’t make any promises for any installation that didn’t start from a normal Raspbian image. I haven’t tried any other starting points myself. Different distros behave differently, though. What is the actual problem you’re having, though?
Thanks for getting back to me.
It’s the Webmin login page. Can’t figure out what login name/password to use to get in. In your example you used ‘Pi’ – which I’m guessing is the Raspbian default. I tried ‘osmc’ – the OSMC default(for user name and password), but it didn’t work. I’ve read that OSMC doesn’t allow root – you have to sudo everything. Maybe that’s the issue.
Just wondered if you had any ideas how to make it work. It’s no bother if you don’t, I’m quite enjoying the challenge – the more walls I hit, the more I learn.
Raspbian doesn’t allow root either, so you log in as the “pi” user. That sounds like the same thing as you’re seeing with OSMC. I would think you would log in with the “osmc” user, and whatever it’s default password is.
Hey, I don’t see any LAMP tutorial on this part, yet you mention it in part wordpress
Pingback: Sécuriser votre RPi | Ma Vie de Linuxien, dans les Nuages!
Webmin instructions update:
The entry for the mirror hosted at somersettechsolutions can be removed based on a posting at http://www.webmin.com indicating that the mirror is outdated.
Got this working.
It’s going to be a bit hard to use when connected to friends network.
Any chance you could do a section on ddclient & dyndns.
I tried to get it working but it seems a little flakey.
The way CrashPlan works, this shouldn’t be a problem as long as the friend’s router isn’t blocking ports. When you sign into your account on the CrashPi, it should take care of the “I’m over here” part itself. The account is what ties all of your different instances together. My own CrashPi lives in my detached garage, so it’s on my same network, but away from the house. It’s a just-barely-offsite backup, but it has worked well for me. I haven’t had to park one at someone else’s house yet, myself, but from my understanding of how CrashPlan works, you don’t need to be aware of its actual IP address.