Install Webmin on Ubuntu 14.04 using the AWS EC2 Free Tier

If you haven't used Amazon's Web Services yet, you really should. They are currently hosting more of "the cloud" than their next ten competitors (Google, Microsoft, RackSpace, etc.) combined. And, they do everything in their power to make it easy for you. In addition to tons of pretty good documentation, they also offer a "Free Tier" for you to test the service out to see if it meets your needs. I'm currently running a couple services on mine and, once you get past the initial set-up, it starts to look and act pretty much like the server you have running down the hall.

It's pretty simple to get a "bare" server up and running, but it's a little harder to get Webmin working, primarily due to how the firewall works. Many of my terminal-loving IT brethren sneer at Webmin, but I find it to be the easiest way to manage files and edit configs. Luckily, enough people agree with me for Webmin to continue existing.

To get started using Amazon EC2, you should start off by checking out this page they wrote called, surprisingly, Getting Started with Amazon EC2. You'll find everything you need there to create your account, find the dashboard, create your first instance, and create the key pair your going to need to access the server.

When you get to the "Launch an Amazon EC2 Instance" part of your introduction, the process will work something like this:

  1. In the dashboard, look for "Instance" on left-hand menu. Click that, then click the big blue "Launch Instance" button.
  2. Depending upon how you get there, you might also go straight to the "Choose an Amazon Machine Image" page
  3. As of today, the option you want is "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type". Click the "Select" button.
  4. On the next page, you'll only have one option. Click "Review and Launch" and wait for a couple minutes. You can keep checking the instance page to see when it's ready.

The next step is to edit your firewall rules to allow access to the Webmin server. This is done through the dashboard, not from within the server itself.

While you are still looking at your instance, click whatever is listed under "Security Group" and make sure you are looking at the "Inbound" tab. Click Edit and enter in the following new rule:

Type: Custom TCP Rule
Protocol: TCP
Port Range: 10000
Source: (Select "My IP) - Makes it work only from your current location.

Note, you could also go some other "Custom" IP address here (in the form of youripaddress/32). "Any" would probably be a bad idea.

Click "Save".

When you complete your "Getting Started" introduction, you will have SSH access to your new server. Launch that for the next piece.

To install the Webmin software, make the following entries into the CLI:

ubuntu@ip:~$ wget http://prdownloads.sourceforge.net/webadmin/webmin_1.760_all.deb
ubuntu@ip:~$ apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
ubuntu@ip:~$ dpkg --install webmin_1.760_all.deb

Since your access to the server is through SSH, you don't actually have the password to the root account. However, you'll need one (an administrative account) to access Webmin, so you need to create one:

ubuntu@ip:~$ sudo adduser adminuser
ubuntu@ip:~$ sudo usermod -a -G sudo adminuser

Substitute whatever name you like for "adminuser".

At this point, you're done. If you did everything right, you should be able to launch the Webmin at "https://(your instance public IP):10000" and log in with your new administrative account.

If that doesn't work, go back and do everything right.