Create Linux VM with Alibaba Cloud (Free for 12 months)
This post explains how to create an instance (virtual machine) in Alibaba Cloud platform for free( for 12 months). Alibaba Cloud is relatively new on the market and it’s logical that they offer a free trial for one of the basic instances. If you need a virtual machine for some project or education and want to save money, then it’s a good opportunity.
Before we continue it’s good to get familiar with basic building pieces of the cloud infrastructure. When dealing with Alibaba Cloud you will deal with the following entities:
Instance – just a virtual machine.
Security Group – access list, defining IP and port access per instance. For example, if you want to allow HTTPS access to the instance from the Internet, you have to add allow rule to the Security Group and assign that Security Group to the instance.
VPC – stands for Virtual Private Cloud. Defines the network in general and contains subnets, routing tables, vSwitches and other network related entities.
Step 1. Register on Alibaba Cloud.
Go to Alibaba Cloud website and click on Sign Up. You will see an image like this, where you need to provide some basic info:
Then you will need to confirm your email address, phone number and credit card information. You don’t need to spend any money, but Alibaba will charge you 1 USD and immediately send it back to you.
Step 2. Choose a Free Trial instance.
Once you have successfully created your account you can go ahead and select the Free Trial instance. Click on orange Free Trial button as shown on the image below:
You will be taken to the page where you can select your Free Trial instance. There are two options at the moment of writing this article:
1 vCPU + 1GB RAM for 12 months or 2 vCPU + 2GB RAM for 3 months.
Choose the one you like and click Try Now. You will see some options, where you can select OS and Data Center region:
I’ve chosen Frankfurt for Data Center region and Ubuntu 18.04 for OS.
As you can see, the instance will have 1Mbps of Internet connection included in this trial package. Click Try Now again and the instance will be created.
Step 3. Management Console
When you are on the main Alibaba Cloud website, click on the Console button in the upper-right corner to navigate to the management console of your cloud infrastructure:
The first you will see is a dashboard on the main page of console, which contains some useful links and information about your expenses.
Hover over the hamburger style button in the upper-left corner and click on the Elastic Compute Service, as shown on the image below:
On the Elastic Compute Service page you can see the basic information about your instances. Now you should have 1 instance running:
Step 4. Instance overview.
Click on the Instances button on the left screen of the page to see the list of your instances.
I currently have only one instance as shown below. There’s also a warning saying that we use the default security group and therefore we might experience connection issues. In our case we will be OK, because the default security group allows ports 22 and 3389, by default. If you require any other ports of your instance, you will have to allow them in the Security Group.
You can also find the IP address information on that page and the subscription expiration date for the instance.
Step 5. Set password and connect
Before you can access the instance you should set the password for it.
Click More -> Password/Key Pair -> Reset Password on the Instances page and define a new password.
Now click More-> Instance Status -> Restart to restart the virtual machine, otherwise the new password won’t be activated.
After the instance is up you can connect to it via SSH: username is root and the password is what you’ve just set up.
Step 6. Review Security Groups (optional).
You can navigate to Security Groups in Network & Security section to review the Security Groups you currently have:
You can click Add rules in the rightmost column to view the access rules of the Default Security Group. As you can see it’s just an access list:
All outbound traffic is allowed by default. If you want to allow additional inbound access, just add the corresponding rule.
Now you can use your free instance for 12 months. This will be enough to see if you like the platform and want to extend the subscription. Thank you for reading.