Setting up VirtualMin/WebMin on Ubuntu AWS


So you finally caved and decided to move to Amazon’s AWS service, this is will guide you through the basic setup steps to get you up and running in no time. I know there is some existing tutorials out there, but I wasn’t able to find anything that had all the steps in once place.

Just FYI, VirtualMin/WebMin is a way to manage your server online easily with a UI, you can manage it just with the commands but this gives you a nicer experience for beginners. Also you can potentially expand your own hosting service through this as its open source in contrast to cPanel.

This is an overall run through of the guide,

  1. Create an Amazon AWS Account
  2. Obtain an Elastic IP
  3. Get your SSHing mode on!
  4. Install any packages, and update the server
  5. Install VirtualMin
  6. Donee!

Create an Amazon AWS Account

This is the easiest step on this guide, go to Amazon AWS and create an account, easy link. All the accounts come with a Free EC2 solution, this will be enough for majority though. I’d say start off with the free solution and move up as you may need more. EC2 is their cloud hosting solution.

  1. Create the account
  2. Create an EC2 instance, Ubuntu 18.04 LTS Free Tier Eligible x84.
  3. Select the free resource (t2.small)
  4. Setup the rest as you usually would with your information, stop at the security page.
  5. Create a new security group and add the following rule, Custom TCP Rule: TCP Protocol, Port 10000 and Source This rule is added to access the VirtualMin dashboard as you can access it only through this port.
  6. Add the ports for HTTP, Port 80 and source Also HTTP, Port 80 and ::/0. All this to enable accessing it through the web. Make sure the SSH rule Port 22 and for TCP is also there.
  7. Download the SSH keys and off you go to the next stage.

Obtain your Elastic IP

Remember the usual networking jargon? Elastic IP is your static IP to the instance you running from the previous stage. Setting this up is easy, go to the AWS Console ->Network & Security (on the sidebar) -> Elastic IPs -> Allocate a new address. Select an IPv4 from Amazon Pool and associate with your Instance. Note down this IP.

Get your SSHing Hat on!

This can be somewhat of a confusing thing, but its easy when you get the hang of it. If you are using a Mac or Linux the terminal would work just fine and for Windows you’ll need Putty. I’ll leave you with this link.

I personally use this call Terminus on my Mac. It is a fully fledged client for all these things and the free version is enough for most of the things.

Now, to login to the instance via SSH, use the Elastic IP from above and the SSH Key you got when setting up the instance, login with the username ubuntu. Why ubuntu? I have no clue, Amazon sets to it as default. Logged in? Move on to the next stage!

Update the server

This is a fun thing to do, updates. Even though you install the latest version, you’ll need to update your server. It’s simple, type in to check for updates,

sudo apt-get update

Then use the following command to update everything, (No, its no the same command, the word changes)

sudo apt-get upgrade

press Y to confirm and let it do its thing.

Install VirtualMin

Now the fun stuff begins, however before you do this, you need to create a user account for you in the server. Why can’t you use the ubuntu account? Well we used a SSH key to login to it and we do not use the password, so to use VirtualMin and manage you need an account.

Replace yourusername with any username you pick and type in,

sudo useradd -g sudo yourusername

Set a password type in, and you’ll be prompted for the new password (note this down).

sudo passwd yourusername

Now for the fun stuff, installing virtualMin. Downloading the script,

sudo wget

Then run the script,

sudo /bin/sh

Press Y throughout and you’d be good to go. The system will say memory is not enough, but it’ll be just enough to get you running, and you can expand later if you need more power.

Now once everything is done, visit your elastic IP:10000, to get through the rest of the stages of VirtualMin. Remember to use the username from previous step and password to login.

Something to keep in mind, Amazon charges you to keep the Elastic IP even on the Free Tier so every month you may have to pay some cents since you have the IP. You pay more if its not in use.

Leave a Reply