How to create free tier VPS on Oracle Cloud

Jeff posted on  (updated on )

Contents

Intro

This article will show you how to take advantage of the "Always Free" VPS offering from Oracle cloud, by creating a VPS with public IP.

Image 1

Create Oracle Cloud Account

Go to https://cloud.oracle.com/ and create the account.

Create Resources

Do not create VM first, as we need to setup the Virtual Networks first to make things easier later.

Create Virtual Cloud Network

Go to the Virtual Cloud Network management page:

Image 2

Click "Create VCN"

Image 3

  1. Give it a name
  2. For "IPv4 CIDR Blocks", its ok to fill in the example here 10.0.0.0/16
  3. Disable "Use DNS hostnames in this VCN"

Then create the VCN.

Create Subnet

Now let's create 1 subnet inside this VCN.

Go to the VCN resource you just created, click "Subnets" tab:

Image 4

  1. Click "Create Subnet"
  2. In the creation page
    1. Give it a name
    2. For Subnet Type, Select "Regional"
    3. For "IPv4 CIDR Block", use example value 10.0.0.0/24
    4. For Subnet Access, select "Public Subnet"
    5. For Security Lists, select "Default Security List for <your vcn>"

Then create subnet.

Create Internet Gateway

Now that we've created Subnet, go back to VCN management page and click "Gateways" tab.

Image 5

Find and click "Create Internet Gateway"

  1. Give it a name
  2. DO NOT, DO NOT modify other sets like "Route Table Association"
    1. Setting the routing table here will break the setup, for god knows why.

Click "Create Internet Gateway"

Modify Routing Table

Now let's modify the routing table to use the Internet Gateway we created.

Go back to VCN management page and click "Routing" tab:

Image 6

Click the "Default Route Table for xxx". Click "Route Rules" tab.

Image 7

Click "Add Route Rules".

  1. Target Type: "Internet Gateway"
  2. Destination CIDR Block: 0.0.0.0/0
  3. Target Internet Gateway: select the one you just created

Click "Add Route Rules"

Create VPS/VM

Now that we have setup the network, we can create VM now.

Go to Compute/Instances page:

Image 8

Click "Create Instance"

  1. Basic information section
    1. Give the VM a name
    2. Modify Image to Ubuntu or any Linux distro you like.
      1. DO NOT USE Oracle Linux 9 as it's quite memory heavy for our free tier spec.
  2. Networking section
    1. Give VNIC a name
    2. Select "Select existing virtual cloud network" + "Select existing subnet"
    3. Select the VCN and Subnet we created

Image 9

For IPv4 section, select "Auto assign private IPv4 address" and "Auto assign public IPv4 address"

Image 10

Then scroll down to "Add SSH Keys", select "Generate a key pair for me", then click "Download Private Key". This will be your credential for VM login.

Image 11

Leave rest of options default, create VM.

Config Firewall / SSH port

By default the Port 22 is allowed so you could SSH into the created VM.

If you want to modify it for any reason, find the security rules under Subnet "Security" tab -> Click the security list.

Image 12

Then modify the rules as your wish:

Image 13

Login

To log into your VM, first find its Public IP, and use the downloaded private key to ssh into it.