Infrastructure

Free VPS on Oracle Cloud: Complete Guide

By Olaleye Ibrahim Olanrewaju15 min read
What you get: Up to 4 ARM CPUs, 24 GB RAM, 200 GB storage, and 10 TB/month bandwidth at no cost.

1. What Is a VPS?

A VPS (Virtual Private Server) is a virtual computer you rent and access over the internet. Unlike shared hosting, you get dedicated resources and full root access, similar to a physical machine but hosted in the cloud.

Oracle's Always Free tier gives you generous compute, storage, and network resources at no cost.

ResourceFree Tier Allowance
Compute (ARM/Ampere)Up to 4 OCPUs, 24 GB RAM
Compute (AMD x86)1/8 OCPU, 1 GB RAM (2 instances)
Boot Volume Storage200 GB total
Network Bandwidth10 TB/month
Public IP Addresses2
💡 Tip

Choose ARM (Ampere) to get more capacity than AMD. Only pick AMD if you need x86/x64 compatibility for older applications.


2. Create Your Oracle Cloud Account

Sign Up

  1. Go to oracle.com/cloud/free and click Start for Free.
  2. Fill in your real details — real name, real email, real address.
⛔ Caution

Do NOT use a VPN, temporary email, or fake details. Oracle aggressively bans suspicious accounts, and getting locked into a failed-creation loop is very hard to recover from. Get it right the first time.

  1. Verify your email by clicking the link sent to you.
  2. Set a password and select Individual as your customer type.
  3. Set a Cloud Account Name — write this down, you'll need it to log in.

Choose Your Home Region (Important!)

Your home region determines where your free-tier resources live. You cannot change this later.

Good Picks (Multiple ADs)Regions to Avoid
UK South (London)UK West (Newport)
US East (Ashburn) — often full
US West (Phoenix) ✅
US Midwest (Chicago) ✅

Add Payment Method

  • Oracle requires a real credit or debit card to verify your identity.
  • They'll charge $1 and then reverse it immediately.
  • No virtual, prepaid, or single-use cards.
  • You will not be charged for free-tier usage.

Once complete, you'll receive an email with your account name and access details.

Log In & Set Up 2FA

  1. Go to cloud.oracle.comSign In.
  2. Enter your account name, username, and password.
  3. Set up two-factor authentication as prompted.

3. Set Up Networking (VCN)

⚠️ Important

Do this BEFORE creating your server instance. Setting up networking first avoids errors and headaches later.

Oracle requires a Virtual Cloud Network (VCN) for your server to communicate with the internet. The key components are:

  • Internet Gateway — lets your VCN talk to the internet
  • Subnets — connect to your server(s)
  • Security Lists (control which ports are open)

Create VCN Using the Wizard

  1. Go to ☰ Menu → Networking → Overview.
  2. Select "Create a VCN with Internet Connectivity".
  3. Give it any name, leave everything else as default.
  4. Click Next → Create.
  5. Once done, click View VCN to confirm it shows as Available.

4. Create Your Server Instance

  1. Go to ☰ Menu → Compute → Instances → Create Instance.
  2. Give it a name.

Configure Image (Operating System)

  • Change from Oracle Linux to Ubuntu (latest version).
  • Select a minimal build.
  • Select aarch64 architecture (for Ampere ARM processors).

Configure Shape (CPU & RAM)

Click Change Shape and select Ampere (A1.Flex).

How to allocate your 4 CPUs / 24 GB RAM:

OptionSetupUse Case
1 big server4 CPU / 24 GBMaximum power, single workload
4 small servers1 CPU / 6 GB eachMultiple lightweight services
2 medium servers ✅2 CPU / 12 GB eachProduction + sandbox (recommended)
💡 Tip

Option 3 is recommended: it provides 2 public IPs (Oracle's limit), enough power for intensive tasks, and a separation between production and experimentation.

Configure Networking

  • Select "Select existing virtual cloud network".
  • Choose the VCN you created in Step 3.
  • Ensure "Assign a public IPv4 address" is selected.

Download SSH Keys

⛔ Caution

Download SSH Keys: download both the private and public keys. Without these, you cannot access your server. Back them up securely.

Configure Boot Volume

  • Set custom boot volume size (e.g., 100 GB if splitting into 2 servers).

Review & Create

Review all settings, then click Create.


5. Dealing with "Out of Capacity" Errors

You will very likely see this error:

Out of capacity for shape VM.Standard.A1.Flex in availability domain...

This is normal; Oracle's free tier has limited capacity, and instances are only created when resources become available.

Method 1: Auto-Retry Script (Browser Console)

  1. On the instance creation page in Chrome, open Developer Tools (F12).
  2. Go to the Console tab.
  3. Where it says "top", switch to the Oracle sandbox context.
  4. If pasting is blocked, type allow pasting and press Enter.
  5. Paste and run an auto-retry script (search for "Oracle Cloud auto-retry script Reddit"), which clicks the Create button every ~30 seconds and cycles through availability domains.

Leave it running in the background until it succeeds.

📝 Note

If you get an instance this way, Oracle has an idle compute policy: make sure your CPU, network, or memory is being utilized to prevent Oracle from reclaiming your instance.

Method 2: Upgrade to Pay-As-You-Go (Recommended)

Upgrade to Pay-As-You-Go: this is the most reliable method:

  1. Go to ☰ Menu → Billing & Cost Management → Upgrade and Manage Payment.
  2. Add a payment method and click "Upgrade to Pay As You Go".
  3. Oracle will do a temporary $100 hold and then reverse it.
  4. Wait ~30 minutes for the upgrade to process.

Benefits of Pay-As-You-Go:

  • Create instances immediately without capacity issues
  • Stop and start instances freely without losing capacity
  • Free-tier resources remain free
💡 Tip

Worried about accidental charges? Go to Billing → Budgets and create a budget with a $1 limit. This prevents any charges beyond your set threshold.


6. Connect to Your Server via SSH

Find Your Connection Details

On your instance page under Instance Access, note:

  • Public IP Address
  • Username (default: ubuntu)

Connect from Terminal

Mac/Linux:

bash# 1. Set correct permissions on your private key
chmod 400 /path/to/your-private-key.key

# 2. Connect via SSH
ssh -i /path/to/your-private-key.key ubuntu@YOUR_PUBLIC_IP

Windows (PowerShell):

powershellssh -i C:\path\to\your-private-key.key ubuntu@YOUR_PUBLIC_IP

On first connection, type yes when prompted about the host fingerprint.

Alternative: Use XPipe (GUI)

Alternative: Use XPipe (GUI): if the terminal feels intimidating, install XPipe (free community edition):

  1. Add a new Remote Host → SSH Connection.
  2. Enter your server IP, username (ubuntu), and paste your private key content.
  3. Double-click to connect with no commands to remember.
  4. Bonus: XPipe includes a file browser for uploading/downloading files.

7. Secure & Update Your Server

Run these commands after your first login:

bash# Update the system
sudo apt update && sudo apt upgrade -y

# Install UFW firewall
sudo apt install ufw -y

# Allow essential ports BEFORE enabling the firewall
sudo ufw allow ssh        # Port 22 — SSH access
sudo ufw allow 80/tcp     # Port 80 — HTTP
sudo ufw allow 443/tcp    # Port 443 — HTTPS

# Enable the firewall
sudo ufw enable
# Type 'y' when prompted
⚠️ Warning

Always allow SSH (port 22) BEFORE enabling UFW, or you will lock yourself out of your server.

Install Common Utilities

bashsudo apt install -y curl git wget unzip

Root Access

bashsudo su          # Switch to root
exit             # Return to ubuntu user

Use root sparingly: stay as the ubuntu user for day-to-day tasks.


8. Install a Server Management UI

A management UI gives you a web dashboard to deploy applications, manage Docker containers, set up domains with SSL, and monitor your server without command-line juggling.

There are two great open-source options. Pick one:

Dokploy (Recommended)Coolify
Best forBeginners, clean UXPower users, more features
Reverse proxyTraefik (built-in)Traefik (built-in)
Web UI port30008000
One-click apps
Docker Compose
GitHub deploys✅ (public & private)✅ (public & private)
Min. requirements2 GB RAM, 30 GB disk2 GB RAM, 30 GB disk
Websitedokploy.comcoolify.io
💡 Tip

We recommend Dokploy: it is beginner-friendly, lightweight, and gets out of your way. Coolify is a great alternative if you want more features like built-in S3 backups and a terminal/file browser in the UI.

Option A: Install Dokploy (Recommended)

Dokploy is a free, open-source application deployment platform. It handles Docker, Traefik, SSL certificates, and other configurations through a clean web interface.

Prerequisites

Ensure ports 80, 443, and 3000 are free on your server before installing.

Install Dokploy

bashcurl -sSL https://dokploy.com/install.sh | sh

The script will install Docker (if not present) and set up Dokploy automatically.

Open Required Ports

On your server (UFW):

bashsudo ufw allow 80/tcp      # HTTP (Traefik)
sudo ufw allow 443/tcp     # HTTPS (Traefik)
sudo ufw allow 3000/tcp    # Dokploy web UI

On Oracle Cloud (VCN Security List):

  1. Go to your instance → Networking → click on your VCN.
  2. Click on the Public SubnetSecurity ListsDefault Security List.
  3. Click Add Ingress Rules and add these rules:
Source CIDRProtocolDest PortDescription
0.0.0.0/0TCP80HTTP (Traefik)
0.0.0.0/0TCP443HTTPS (Traefik)
0.0.0.0/0TCP3000Dokploy Web UI

Access Dokploy

Open http://YOUR_IP:3000 in your browser. You'll be directed to the initial setup page to create your admin account.

Secure Your Installation

After setting up your admin account:

  1. Set up a domain with HTTPS: go to Dokploy's domain settings and configure SSL via Let's Encrypt (free and automatic).
  2. Disable IP:port access (optional but recommended): once your domain with HTTPS is confirmed working, run:
bashdocker service update --publish-rm "published=3000,target=3000,mode=host" dokploy
⚠️ Warning

Only disable IP:port access AFTER confirming your domain + HTTPS works. Otherwise you'll lock yourself out of Dokploy.

What Can You Do with Dokploy?

  • Deploy apps from GitHub (public or private repos)
  • Deploy using Docker Compose or Dockerfiles
  • One-click deploy popular services (databases, WordPress, n8n, etc.)
  • Automatic SSL certificates via Traefik + Let's Encrypt
  • Built-in monitoring and log viewer

Updating Dokploy

bashcurl -sSL https://dokploy.com/install.sh | sh -s update

Option B: Install Coolify

Coolify is a free, open-source platform with a feature-rich web UI for managing your server and deploying applications.

Install Coolify

bashcurl -fsSL https://cdn.coolify.io/install.sh | sudo bash

Wait for the installation to complete. You'll see a message with your access URL: http://YOUR_IP:8000.

Open Required Ports

On your server (UFW):

bashsudo ufw allow 80/tcp      # HTTP
sudo ufw allow 443/tcp     # HTTPS
sudo ufw allow 8000/tcp    # Coolify web UI
sudo ufw allow 6001/tcp    # Coolify real-time
sudo ufw allow 6002/tcp    # Coolify real-time

On Oracle Cloud (VCN Security List):

  1. Go to your instance → Networking → click on your VCN.
  2. Click on the Public SubnetSecurity ListsDefault Security List.
  3. Click Add Ingress Rules and add these rules:
Source CIDRProtocolDest PortDescription
0.0.0.0/0TCP80HTTP
0.0.0.0/0TCP443HTTPS
0.0.0.0/0TCP8000Coolify UI
0.0.0.0/0TCP6001-6002Coolify Realtime

Access Coolify

Open http://YOUR_IP:8000 in your browser and create your admin account.

What Can You Do with Coolify?

  • Deploy apps from GitHub (public or private repos)
  • Deploy using Docker Compose
  • One-click deploy popular services:
    • Audiobookshelf, WordPress, PostgreSQL, n8n, and many more
  • Manage backups to S3 storage
  • Access terminal and file browser through the UI

9. Bonus: Self-Host N8N for Free

N8N is a workflow automation tool similar to Zapier. Here is how to self-host it on your Oracle VPS.

Prerequisites

  • Oracle Cloud instance running Ubuntu 22.04 (aarch64, Ampere A1.Flex)
  • A domain name with DNS access

Install Dependencies

bashsudo apt update && sudo apt upgrade -y
sudo apt install -y curl git

Install Node.js (via NVM)

bashcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install --lts

Install PM2 & N8N

bashnpm install -g pm2
npm install -g n8n

Start N8N with PM2

bashpm2 start n8n
pm2 save
pm2 startup
# Run the command PM2 outputs to enable auto-start on reboot

Install & Configure Nginx (Reverse Proxy)

bashsudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx

Point Your Domain

In your DNS provider, add an A record:

TypeHostValue
An8nYOUR_SERVER_IP

This creates n8n.yourdomain.com.

Create Nginx Configuration

bashsudo nano /etc/nginx/sites-available/n8n

Paste the following (replace n8n.yourdomain.com with your actual domain):

nginxserver {
    listen 80;
    server_name n8n.yourdomain.com;

    location / {
        proxy_pass http://localhost:5678;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Activate the configuration:

bashsudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Open Ports (Oracle + Server)

On your server:

bashsudo ufw allow 80/tcp
sudo ufw allow 443/tcp

On Oracle Cloud, also open iptables (often missed):

bashsudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save
⚠️ Warning

Don't forget the iptables rules! Oracle Ubuntu images have iptables rules that block traffic even if UFW and VCN security lists are open. This is the most commonly missed step.

On Oracle Cloud VCN — add ingress rules for ports 80 and 443 (same as in Section 8).

Install SSL Certificate (Free via Certbot)

bashsudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d n8n.yourdomain.com

Follow the prompts to complete SSL setup.

Access N8N

Visit https://n8n.yourdomain.com: sign up and start building workflows. 🎉


Quick Reference: Port Cheat Sheet

PortServiceWhere to Open
22SSHUFW ✅ VCN ✅ (default)
80HTTP / TraefikUFW ✅ VCN ✅ iptables ✅
443HTTPS / TraefikUFW ✅ VCN ✅ iptables ✅
3000Dokploy UIUFW ✅ VCN ✅
8000Coolify UIUFW ✅ VCN ✅
5678N8N (internal)Nginx proxies this (no external rule needed)
6001-6002Coolify RealtimeUFW ✅ VCN ✅

Key Reminders

⚠️ Important
  • Keep your SSH keys safe: without them you lose server access permanently.
  • Use real details during signup: fake info leads to an instant ban.
  • Choose your home region carefully because it cannot be changed later.
  • Open ports in three places: UFW, Oracle VCN security lists, and iptables.
  • Keep your instance active: Oracle can reclaim idle free-tier instances (unless you're on Pay-As-You-Go).
  • Set a $1 budget if on Pay-As-You-Go to prevent accidental charges.

Sources & Reference Materials:

Continue Reading

Related articles