How to Set Up a Self-Hosted Server on Oracle Cloud Free Tier in 30 Minutes

How to Set Up a Self-Hosted Server on Oracle Cloud Free Tier in 30 Minutes

A step‑by‑step guide that lets you launch, configure, and secure your own server on Oracle Cloud’s free tier—no credit card required

Before We Start: What You’ll Walk Away With

By the end of this guide you’ll have a fully functional Oracle Cloud free tier server that you can log into from any terminal, just like you’d pick up a coffee after ordering it online.

First you’ll spin up a Compute instance and establish an SSH session, the same way you’d unlock a door with a key you already have.

Next you’ll set up DNS entries, open the right ports, and install a LAMP stack, which is essentially packing a suitcase with everything you need for a web app before a trip.

Finally you’ll harden the machine with basic security tweaks, giving you a production‑ready environment you can redeploy for any personal project, side‑hustle, or testing scenario.

  • Create a free Oracle Cloud Compute instance and connect via SSH.

  • Configure DNS, firewall rules, and install a LAMP stack.

  • Apply security hardening to make the server ready for production use.

  • SSH access: Think of it as a private tunnel that lets you control your server from anywhere.

  • DNS setup: Like assigning a memorable street address to a house you just built.

  • Firewall rules: Comparable to setting up a bouncer at the door, only letting the right traffic in.

  • LAMP stack: The kitchen of your server – Linux provides the floor, Apache serves the meals, MySQL stores the recipes, and PHP does the cooking.

With these steps completed, you’ll own a reliable, cost‑free server that’s ready for the real world.

What a Self‑Hosted Server on Oracle Cloud Actually Is (No Jargon)

Think of a self‑hosted server on Oracle Cloud as a completely private computer that lives inside Oracle’s huge data centre, but you are the one who decides what runs on it.

It’s a virtual machine – essentially a software‑defined PC – that Oracle spins up for you on demand. You get root access, can install any Linux distro, and configure networking exactly how you need it, just like you would on a physical box.

Picture renting an apartment in a massive skyscraper you don’t own. The apartment (the VM) is yours alone; you bring in the furniture (your web server, database, or whatever you’re testing) and you lock the door (firewall rules) so only the people you invite can walk in. The building (Oracle Cloud) takes care of electricity, water, and security, while you focus on living there the way you want.

  • Full control: install, update, or remove software at will.

  • Isolation: your VM doesn’t share resources with other users’ workloads.

  • Always‑on: as long as the free tier limits aren’t exceeded, it runs 24/7 without you paying a cent.

This simple model lets developers, hobbyists, and small‑business owners treat the cloud like a personal server rack, but without the hardware bill.

The 4 Mistakes Everyone Makes With Oracle Cloud Free Tier

Here’s where most people trip up when they first play with the Oracle Cloud free tier.

Skipping the “Always Free” eligibility check – It’s like ordering a meal without confirming it’s on the lunch special; you end up with a surprise bill. Before you launch anything, verify that your account is marked Always Free in the console. If the check is missed, you’ll hit quota limits the moment you spin up a second VM.

Leaving the default security list wide open – Imagine leaving every door and window of your house unlocked because the lock came pre‑installed. The default security list permits SSH, HTTP, and many other ports to the world. Tighten it down to only the ports you actually need (typically 22 for SSH and 80/443 for web traffic).

Choosing the wrong image – Selecting a Windows image for a tiny test app is like ordering a full banquet when all you wanted was a sandwich. A lightweight Linux distro (Ubuntu 22.04 or Oracle Linux 8) boots faster, costs fewer resources, and plays nicer with the free tier limits.

Forgetting a static IP or DNS – It’s the same as packing a suitcase without writing your destination on the tag; you’ll waste time hunting down the right address each time you reconnect. Reserve the free‑tier public IP and point a simple DNS record at it so you always know where to reach your server.

  • Cheat sheet: Always Free ✅ → Check quota, tighten security, pick Linux, pin a static IP.

Fix these four slips and your Oracle Cloud free tier server will stay up and running without surprise roadblocks.

How to Set Up a Self‑Hosted Server: Step‑by‑Step

  • Sign up and verify. Create your Oracle Cloud Free Tier account, then confirm the email and phone number. Think of it like ordering a coffee – you give your details, they send a receipt, and you’re ready to brew.

  • Open the console. In the dashboard go to Compute → Instances and hit “Create Instance.” This is the “new order” button you click after picking a drink.

  • Select the free shape and OS. Choose the Always Free shape — VM.Standard.E2.1.Micro — and pick the Ubuntu 22.04 image. It’s like selecting a small cup size that won’t cost extra.

  • Reserve a public IP and add SSH key. Click “Assign a reserved public IP” and paste your SSH public key. This gives you a permanent “phone number” for the server and a secure way to call it.

Build the network. Create a Virtual Cloud Network (VCN) with:

- a subnet (your kitchen counter space),

- an internet gateway (the doorway to the street),

- a route table linking the two (the path you walk).
  • Lock down the security list. Edit it to allow only ports 22, 80, and 443. It’s like setting a bouncer to check IDs for only the front door, the coffee bar, and the pastry case.

  • Launch and SSH. Hit “Create” and wait a minute. Then connect with: ssh -i ~/.ssh/id_rsa ubuntu@.

Install LAMP. Run:

- sudo apt update && sudo apt install apache2 mysql-server php

This stacks the web server, database, and PHP just like adding toppings to a pizza.

  • Harden the server. Enable UFW (sudo ufw enable), disable root SSH login (PermitRootLogin no in /etc/ssh/sshd_config), and turn on unattended upgrades (sudo dpkg-reconfigure –priority=low unattended-upgrades).

  • Optional: point a domain. In your registrar’s DNS, create an A record pointing to the reserved IP. Think of it as handing out your new address to friends.

Now your Oracle Cloud free tier server is live, secure, and ready for whatever you want to host.

A Real Example: Deploying a Personal Blog for Maya, the Freelance Designer

Maya signs up for Oracle Cloud, picks Ubuntu 22.04, and names the VM “maya‑blog.”

  • Create the SSH keys. On her Mac she runs ssh-keygen -t ed25519 -C maya@blog, saves the pair, then copies ~/.ssh/id_ed25519.pub into the “Add SSH Keys” field in the console. The private key stays in ~/.ssh for later logins.

  • Launch and bind a static IP. After the instance boots, Maya clicks “Assign Public IP” and gets, for example, 138.1.2.3. She heads to GoDaddy, opens the DNS zone for maya‑design.com, and creates an A‑record pointing blog.maya‑design.com to that IP – like putting a permanent address on a mailbox.

  • Install LAMP. She SSHs in with ssh -i ~/.ssh/id_ed25519 [email protected] and runs:

  • sudo apt update && sudo apt upgrade -y

  • sudo apt install -y apache2 mysql-server php php-mysql

  • sudo systemctl enable –now apache2

Visiting http://138.1.2.3 now shows the default Apache page – the test drive is complete.

  • Lock down the firewall. Maya thinks of it like only letting the delivery driver in:

  • sudo ufw allow OpenSSH

  • sudo ufw enable

Then she edits /etc/ssh/sshd_config to set PasswordAuthentication no and restarts SSH.

  • Automate updates. A daily cron entry keeps the server fresh without manual effort:

  • 0 3 * * * root apt update && apt -y upgrade

With the stack running, Maya uploads her static site files to /var/www/html and the blog is live at https://blog.maya‑design.com. The Oracle Cloud free tier server setup is now a reliable home base for her design portfolio.

The Tools That Make This Easier

Grab these five utilities and the rest of the setup feels like ordering a coffee you already know you love.

  • Oracle Cloud Console – the web UI where you click to spin up an instance, just like picking a seat on a restaurant floor plan. Everything from shapes to storage lives here, so you never have to hunt across tabs.

  • Oracle Cloud CLI (v3.2) – think of it as Google Maps for your infrastructure. A single command can launch a VM, attach a VCN, or tag resources, making repeatable builds as easy as copying a route.

  • PuTTY / OpenSSH – your trusted SSH client. On Windows, PuTTY is the familiar key‑card; on macOS and Linux, OpenSSH is the built‑in door opener. Either lets you walk straight into your server without a lobby.

  • UFW (Uncomplicated Firewall) – the minimalist security guard for Ubuntu. A few lines (“allow 22/tcp”, “deny 0.0.0.0/0”) lock down the perimeter like a suitcase zip that only opens for the right combination.

  • Let’s Encrypt Certbot (v2.11) – the automatic SSL baker. Run one command and it hands you a fresh certificate, renewing every 90 days without you lifting a finger, just like a subscription that never expires.

These tools cover the whole lifecycle: visual provisioning, scriptable automation, secure access, firewall hardening, and HTTPS setup—all under the Oracle Cloud free tier server setup umbrella.

Keep them handy; the next section shows how they fit together step by step.

Quick Reference: Self‑Hosted Server Cheat Sheet

Here’s the whole Oracle Cloud free tier server setup compressed into a coffee‑break cheat sheet.

  • ✅ Sign up → Verify → Free Tier eligibility. Think of it like creating a loyalty card before you can order a free coffee.

  • ✅ Create instance: Ubuntu 22.04 on an E2.1.Micro. It’s the “small sedan” that fits city parking and never asks for extra fees.

  • ✅ Reserve static IP & attach SSH key. Like reserving a permanent locker and handing over a unique key so only you can open it.

  • ✅ VCN setup: add a subnet, an Internet Gateway, and a Route Table. This is your Google Maps – you’re telling traffic where it can go.

  • ✅ Security List: open ports 22, 80, 443 only. Example: Maya, a freelance dev, keeps her door cracked just enough for the delivery guy (SSH) and guests (HTTP/HTTPS) – everything else stays shut.

  • ✅ SSH in → install LAMP: sudo apt update && sudo apt install lamp-server^. It’s like ordering a combo meal – you get Apache, MySQL, PHP in one bite.

  • ✅ Harden the box: enable UFW, disable root/password login, turn on automatic updates. Think of it as adding a deadbolt, a security camera, and a scheduled cleaning service.

  • ✅ (Optional) DNS A‑record → static IP. Point your domain to the IP just like writing a home address on a return envelope.

  • ✅ Verify: browse to http://your‑ip or your domain and you should see the Apache default page. If it loads, you’ve got a production‑ready Oracle Cloud free tier server setup.

Keep this list handy; it’s the cheat sheet you’ll return to whenever you spin up another instance.

What to Do Next

Pick one of these upgrades and watch your free Oracle Cloud server feel like a real production box.

  • Add HTTPS with Certbot – Think of it like putting a lock on your front door. Run sudo apt install certbot python3-certbot-apache then sudo certbot –apache. The wizard will ask for a domain, confirm you own it, and spin up a free SSL certificate. Your site goes from “http://” to the secure “https://” version in seconds.

  • Spin up Docker – Imagine ordering a pizza and having every topping pre‑packed in its own box. Install Docker with sudo apt install docker.io, enable it, and pull an image: docker run -d -p 80:80 nginx. Now any app you build can live in its own container, isolated from the host, and you can start, stop, or upgrade it with a single command.

  • Automate deployments with CI/CD – This is the GPS that drives you straight from code to live server without manual detours. Create a GitHub Actions workflow that uses the Oracle Cloud CLI (oci) to upload your Docker image and restart the container. A push to main triggers the whole chain, giving you zero‑touch releases.

Cheat sheet:

  • Certbot: sudo certbot –apache -d yourdomain.com

  • Docker install: sudo apt install docker.io && sudo systemctl enable –now docker

  • GitHub Actions snippet: use oracle/actions-setup-oci then oci compute instance update

Which of these steps are you tackling next?

About the Author

Abdullah Sheikh is the Founder & CEO at Exteed, where he leads a team of skilled developers specializing in Web2 and Web3 applications, Custom Smart Contracts, and Blockchain solutions.

With 6+ years of experience, Abdullah has built CRMs, Crypto Wallets, DeFi Exchanges, E-Commerce Stores, HIPAA Compliant EMR Systems, and AI-powered systems that drive business efficiency and innovation.

His expertise spans Blockchain, Crypto & Tokenomics, Artificial Intelligence, and Web Applications — delivering scalable, secure, and high-performance solutions tailored to each client’s unique needs.

📧 [email protected] · 🔗 LinkedIn · 🌐 abdullah-sheikh.com