Automate Your Home Lab on the Oracle Cloud

Deploy your home lab and max out the free tier on the Oracle Cloud with the Terraform automation tool.

Oracle Cloud Infrastructure (OCI) is a public cloud platform offering a generous amount of cloud resources for free. The free tier comes with a maximum of six VMs, 200 GB block storage, and 10 GB object storage services. The generous limits make the OCI platform ideal for hobby projects, but it can be tedious to launch the first virtual instances.

My new homelab-on-oracle-cloud IaC project helps you utilise the free tier to its full extent with merely a few clicks. The code automates the tedious deployment procedure of the complimentary OCI resources, and saves you time by not needing you to fiddle around with a clunky GUI dashboard.

About the Project

Among other services, the following resources are included in the OCI ‘always free’ tier:

  • 2x VM.Standard.E2.1.Micro instances (1 OCPU, 1 GB RAM, x86_64);
  • 1x VM.Standard.A1.Flex instance (4 OCPU, 24 GB RAM, aarch64);
  • An additional 59 GB volume that is attached to the VM.Standard.A1.Flex instance; and
  • A volume backup policy taking one automatic snapshot per week.

The homelab-on-oracle-cloud project is a Terraform plan capable of deploying all services from the list above.

Sample deployment of the free tier VMs with homelab-on-oracle-cloud.

Instead of you trying to figure everything out on the dashboard, Terraform takes care of everything for you. The IaC code was written with reasonably sane configuration settings in mind.

The Terraform plan of homelab-on-oracle-cloud can deploy:

  • Two x86_64 and one aarch64 virtual machines as above;
  • An additional volume attachment;
  • Volume backup policies with a five-week retention period;
  • An OCI compartment for all resources;
  • A virtual cloud network (VCN);
  • A public subnet with a locked-down network security group; and
  • DHCP options.

What is Terraform?

Terraform is an open-source infrastructure as a code tool allowing to deploy and manage cloud resources from the command line.

Terraform is similar to AWS CloudFormation and Azure/AWS CLI tools, but it is far more advanced. The tool can manage low-level components like compute, storage, and networking resources via the Oracle Cloud API, while it abstracts the complexity of the API with a simple, declarative language.

Self-hosting Project Ideas

As Oracle is providing a generous amount of free egress traffic (10 TB/month), it is reasonable to run the following services for the community and yourself on the freebie tier:

Refer to the project’s file on GitHub to get started.


Gabor Szathmari is a cybersecurity expert and digital privacy enthusiast. In his professional life, Gabor helps businesses, including many small and mid-size legal practices, with their cybersecurity challenges at Iron Bastion.