Skip to main content
Steven Cramer

My free VPS on Oracle Cloud (tech tutorial)

Because it's only for publishing, my blog is hosted on Cloudflare Pages. However, I found myself wanting to do host some dynamic applications on my domain (to start with, I wanted to share a PHP project). I know forgetting about subscriptions can be expensive, so I saught a crazy price: free. I found one in Oracle Cloud! The process was more complicated than I expected, so here is a tutorial-ish about how you can get one, too.

This guide is written for people who know what a VPS is, have worked with one before, and simply need a free cloud computer for home.

Step 1: Setting up the Oracle account

A quick Google for "oracle cloud free" takes you to https://www.oracle.com/cloud/free/.

Click the "Start for free" button and get going. It's pretty self explanitory, except:

One trick:

(optional) Step 2: Upgrade to Pay As You Go

Once you get into your Oracle account, you'll see a banner that invites you to upgrade your account.

It's useful because Oracle will care about your workload more. I had a painful experience before I upgraded, but you can skip this if you want.

The tricks:

Step 3: Set up your VPS

I wanted a basic PHP host. I went with a 3-core, 18gb RAM ARM VPS which I then configured as a PHP host.

Oracle has two guides which are pretty solid:

Some tricks:

Step 4: Move into your VPS

My PHP application used some PHP functions that evidently aren't included by default on all PHP installations. I also had to run:

sudo apt install php-pdo
sudo apt install php-xml
sudo apt install php-json
sudo apt install sqlite3 
sudo apt install php-sqlite3

Step 5: Configure domain

At this point I had a working PHP server! But I wanted to point a subdomain to it (cloud.srcramer.com).

ChatGPT suggested:

  1. Log in to Cloudflare and select your domain (srcramer.com).
  2. Go to the DNS section.
  3. Click Add Record and configure it as follows:
    • Type: A
    • Name: cloud (this sets up cloud.srcramer.com)
    • IPv4 address: your Oracle Cloud server’s public IPv4 address
    • Click Save.

It turns out it was this simple!

ChatGPT also suggested disabling proxy because it would avoid Cloudflare interfering with non-HTTP traffic. I decided to keep the proxy enabled and as a bonus it serves the page via HTTPS!

I was also concerned about what would happen if I changed the IP address of my Oracle Cloud VPS. When the DNS is configured like this changes to subdomain IP addresses are instantious, so changing the IP address in the future should result in minimal downtime.

Step 6: Configure a budget

Oracle can email when you've spent $0.50 or $1. Idea Spot on YouTube has a nice tutorial.

One trick: