How to get a free VPS in Oracle Cloud

How to get a free VPS in Oracle Cloud with 4 cores, 24 GB of memory and 200 GB of capacity.

I'll describe how to set up a free virtual server using Oracle Cloud in this post; you may choose to use these machines to test web applications that require a lot more power than shared hosting, or even to mount your own server, to deploy services using docker or Kubernetes. 

First, you will need to create an account at https://www.oracle.com/cloud/sign-in.html with an email address and bank card number (don't worry, it's just to check if your account is real, this is still free, they will charge you around 1$ and then they will give it back to you).

You must enter the administration console and select the option "Create a VM instance":

Pick that one.

Set the instance name next:

Now, placement:

Leave it as it is

The following part is important:

Click in "Change image"
Select "Canonical Ubuntu"
Click on "Select image" at the bottom of the screen.
Click on "Change shape"
Click on "Ampere" option
Set it to the maximum "4 cores, 24 GB memory"
Then, once again, click on "Select shape"

Now, generate a SSH key pair. If you do not know how to do it, go to my post about SSH and learn how to do it.

Once you have your SSH key pair fresh, regardless of the operating system you are using, check this option and upload your public key:

Click on "Upload public key files (.pub)"

Location of your SSH keys in different OS:

  • Windows: Should be in %userprofile%\.ssh
  • Linux: ~/.ssh 
  • MacOS: ~/.ssh 

Upload the file named id_rsa.pub (this is the default name, if you haven't changed it).

Click on "Specify a custom boot volume size" and then set that to 200 GB.

Once the instance configuration is finished, you should see something like this:

Now that your instance is up and running, it is time to connect via SSH.
Use your public IP to connect to your server.

If you don't know how to use SSH:

On Linux and MacOS, you should use open-ssh (it is pre-installed in most cases).

ssh ubuntu@<your-ip>

On Windows, use Powershell (Powershell has open-ssh pre-installed, or at least that's the case on my machine. Use something like Putty if you get lost following this step).

ssh ubuntu@<your-ip> # same as Linux and MacOS

And that's it, folks! Now you have a free vps with 4 cores, 24 GB of memory, 200 GB of capacity in like 5 minutes more or less. Ease peasy.