DEV Community

Adam Miedema
Adam Miedema

Posted on • Originally published at cleavr.io

How to set up a FREE Oracle Cloud VPS server with Cleavr

Are you looking for a free test server to host some smaller projects on or to use as a playground environment?

There aren't too many free VPS options out there unfortunately... And, often, if they are free, they may not even be worth the effort to set up.

Oracle provides a pretty decent cloud VPS server that I've been using as a test server for a couple of months now. I recommend you give it a try!

This guide walks you through how to set up an Oracle Cloud free server in their GUI and then how to connect to it with Cleavr as a 'Custom Server'.

Step 1: Create an Oracle Cloud account

Head over to Oracle Cloud and create a new account.

Expect to have to provide a Credit Card in order to create an account. As long as you stick to the free options they provide, you shouldn't need to worry
about your card getting charged. They do a good job at tagging which resources are free eligible.

One more thing to mention, expect to get contacted via email and phone by an Oracle rep. Believe me, they'll do their best to try to get in contact with you...

Step 2: Add a new VPS instance

Once signed up, on the getting started page, launch a new VM instance.

Add a new oracle vps instance

On the Image and shape card, click edit. You'll need to select the Canonical Ubuntu: 20.04 instance.

Edit the image

Edit the image

Add your SSH key (you'll need to SSH into the new server in the next steps).

Edit the image

Finally, click on Create. This will provision the server on Oracle's side.

Step 3: Connect Cleavr to the server

Once the Oracle server has an assigned Public IP Address, copy the IP to the clipboard and header over to Cleavr.

On the dashboard, click the Create button and select server.

For VPS Profile, select Custom Server.

Give the server a name and paste the IP Address into the corresponding field.

Copy the command to run as root on the server and open up your terminal and SSH into the server.

ssh ubunutu@<public ip>
Enter fullscreen mode Exit fullscreen mode

The default server user with Oracle Cloud is ubuntu. You cannot access as root at this point. Once you conenct to the server, you can switch to root using the following command.

sudo su root
Enter fullscreen mode Exit fullscreen mode

Now, paste in the command and run it.

Back in Cleavr, provision the server.

Cleavr will add further dependencies to the server and get it all ready to host your apps.

Step 4: Update Oracle firewall

We've seen some odd behavior that blocks port 80 connects, even when enabling it via the Oracle UI and in UFW. This often seems to really come into play after a server reboot.

Thanks to our community members, we've found that installing firewalld on the server and opening Port 80 works to resolve the issue.

On the server terminal via SSH, run the following commands one-by-one:

apt install firewalld
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --reload
Enter fullscreen mode Exit fullscreen mode

Step 5: Add sites and deploy

You're now all setup to use Cleavr to manage your free Oracle Cloud server and start adding sites and deploying web apps!

Discussion (0)