Journey of Self-Hosting (3): Get your cloud server, for free

Journey of Self-Hosting (3): Get your cloud server, for free
Photo by Annie Spratt / Unsplash

Yes you hear me right. You can get a free (and pretty powerful) cloud compute instance (and also some free storage).

Though at the end of last post (Journey of Self-Hosting (2): Starting with Virtual Machine) I mentioned that I would talk about the network tricks needed to expose your home lab machine (which can be a VM) to the Internet, I feel more tempted to introduce you earlier to how to get your hands dirty in an even more painless way so that you can get started in no time.

It's common that one would be reluctant to invest too much, if any, money into buying hardware before they are very sure about self-hosting is their thing. Therefore, it's important for us to know what are the free lunches out there that we can take to get our hands dirty.

Below is a pretty comprehensive list of the free-tier of different cloud service providers:

GitHub - cloudcommunity/Cloud-Free-Tier-Comparison: Comparing the free tier offers of the major cloud providers like AWS, Azure, GCP, Oracle etc.
Comparing the free tier offers of the major cloud providers like AWS, Azure, GCP, Oracle etc. - cloudcommunity/Cloud-Free-Tier-Comparison

One offering that immediately stands out is what OCI (Oracle Cloud Infrastructure) has to offer.

OCI Free Tier Breakdown

Always Free Resources
Learn what Always Free resources are available to all Oracle Cloud Infrastructure users.
Micro instances (AMD processor): All tenancies get up to two Always Free VM instances using the VM.Standard.E2.1.Micro shape, which has an AMD processor.
Ampere A1 Compute instances (Arm processor): All tenancies get the first 3,000 OCPU hours and 18,000 GB hours per month for free for VM instances using the VM.Standard.A1.Flex shape, which has an Arm processor. For Always Free tenancies, this is equivalent to 4 OCPUs and 24 GB of memory.

What this says is, you can have a compute instance that has 4 OCPUs (whatever it is defined by Oracle, just think of it as CPU cores) and 24 GB of memory running 24/7, for free!

All tenancies receive a total of 200 GB of Block Volume storage, and five volume backups included in the Always Free resources. These amounts apply to both boot volumes and block volumes combined. When you provision a compute instance, the instance automatically receives a 50 GB boot volume for storage.

Block volume is basically the equivalent of disk (HDD or SSD) in your laptop. 200 GB for free!

How to apply for an OCI account

It's likely that you will be encountering some problems when signing up for OCI. For example, some unable to complete your sign up error shows up after you input your credit card information and try to complete the last step of registration. I have the same issue too back then, and after following this video, the problem got solved:

Basically what it says is, OCI has a very strict (and strange) checking process for your address. And you'd better have your address be identical to what the bank (which issued the credit card you just inputted) has on file. For me, I literally just downloaded a statement from my bank, and copy-paste the exact mailing address from that statement.

Of course, if that still does not work for you, you can try to reach out to their customer support:

sign-up problem
by u/matejmajny273 in oraclecloud

Spin up your free ARM VM

Since there are a lot of people signing up for OCI because of the free ARM-based VM, OCI seems to be treating users differently: for those users whose accounts are on an "always-free" mode, it's very, very hard to spin up your VM as OCI will constantly tell you they are Out of Host Capacity.

To get over with this, you have two options.

Option 1. Use a script to periodically try for you

Yet Another Script to help with ARM "Out of Host Capacity" Issue - Python
by u/trixter127 in oraclecloud

I personally had tried this codebase, and it was indeed doing its job. However, I was not patient enough after two days of waiting, so I went with another option.

Option 2. Upgrade your account to "pay-as-you-go"

Managing Account Upgrades and Payment Method
This topic describes how to upgrade to a paid account, or change your payment method. This topic also describes how to terminate your paid subscription.

It does not mean you will be charged for anything immediately (or ever). It just means that you, from now on, are fully responsible for whatever cost might incur based on your usage and authorize OCI to take money from your credit card based on that. So, as long as your usage is still within the free tier we discussed above, your cost will remain $0.

Conclusion

And that's it! Now you have a VM that runs 24/7, with pretty solid power and resources to get started on your self-hosting journey!