Build in Public

How I Got a Free 4-Core, 24 GB ARM Server on Oracle Cloud (Despite "Out of Capacity")

By Ankit (@ankitshx), who builds startups.townmy own Oracle Cloud account, limits, and billing pages checked

One evening I signed up for Oracle Cloud, tried to create one of its free ARM servers, and got the error almost everyone gets: "Out of capacity."

So I left a small bot running that asked Oracle again every 15 minutes. At 2:14 AM, on its 33rd attempt, it worked. By the next morning I had resized the server to 4 cores and 24 GB of RAM, running around the clock, for $0 a month.

This post is the whole process: why Oracle's free tier is worth the trouble, the capacity wall, the retry bot that got past it, the resize that doubled the server, how I check it really is free, and the rule that can take it away. Every script I used is included.

Why Oracle's free tier is worth the trouble

Most free hosting is built to get you to upgrade. Oracle's Always Free ARM allowance is the exception. Here is how it compares with other free and cheap options for running a web app:

HostCPURAMThe catch
Vercel Hobby4 hours of CPU a monthManagedProjects pause when you go over
Render freeAbout 0.1 of a core512 MBSleeps after 15 minutes idle
Render Starter ($7/mo)0.5 of a core512 MBPaid
Oracle Always Free (ARM)4 cores, all month24 GBHard to get, can be reclaimed if idle

Four full cores, all month, is about 2,900 core hours. That gap is why people put up with Oracle's console, and its capacity problem.

The full Always Free allowance, as of this writing:

  • ARM compute (A1): 4 cores and 24 GB RAM in total (3,000 core hours and 18,000 GB hours a month)
  • AMD Micro servers: 2 servers, each with a small slice of a core and 1 GB RAM
  • Disk (boot and block volumes): 200 GB in total
  • Outbound traffic: 10 TB a month

Signing up: the one choice you cannot undo

Sign-up is standard: email, password, and a card for identity verification. A free account is not charged. The decision that matters is the home region.

Free ARM servers can only be created in your home region, and you cannot change it later. Mine is Mumbai. My database, though, lives in Tokyo, which Oracle also offers. Every query from Mumbai to Tokyo takes roughly 120 ms there and back. If you already have a database, pick the region closest to it. Otherwise, pick the one closest to your users.

The wall: "Out of host capacity"

It is not a problem with your account. The free ARM servers are popular, and Oracle only keeps so much spare hardware in each region. When someone deletes a server or Oracle adds machines, a slot opens, and whoever asks first gets it. Clicking Create by hand every few hours is a losing game. A script that asks every few minutes, around the clock, is not.

The retry bot

The bot needs to run somewhere that stays on all night. Conveniently, Oracle's free tier also includes two small AMD Micro servers, and those are almost always available. I created one, named it retry-bot, and used it only for this.

For the script itself, I used the free one from the Oracle ARM guide on codewing.app. What I liked about it: it waits about 15 minutes between tries with a little randomness, never asks for more than the free limit, checks for an existing server before each try so it cannot create two, and tells an ordinary "out of capacity" apart from real errors like a wrong key.

Setting it up took four steps:

  1. Create an API key. In the Oracle console: profile icon, My profile, API keys, Add API key, Generate. Download the private key, then copy the configuration text Oracle shows into ~/.oci/config on the Micro server, pointing key_file at the key.
  2. Install Oracle's Python library in a virtual environment: python3 -m venv ~/oci-venv && ~/oci-venv/bin/pip install oci.
  3. Ask for less than the maximum. I asked for 2 cores and 12 GB instead of 4 and 24. Smaller requests fit into free slots far more often, and as you will see, you can grow it later.
  4. Run it inside tmux, so it keeps going after you disconnect.
tmux new -s oci
source ~/oci-venv/bin/activate
python3 oci_free_vps.py --ocpus 2 --memory 12
# Detach with Ctrl+B, then D. Reattach later with: tmux attach -t oci

Then I left it running. Here is how the night went (times in IST):

WhenWhat happened
Evening, Dec 4Signed up for Oracle Cloud, home region Mumbai. Tried to create an ARM server: "Out of capacity."
6:05 PMStarted a retry bot on a free AMD Micro server, asking for 2 cores and 12 GB every 15 minutes.
6:05 PM to 1:57 AMAttempts 1 to 32: "Host capacity currently exhausted."
2:14 AM, Dec 5Attempt 33: server created. 2 cores, 12 GB, Ubuntu 24.04, public IP assigned.
Next dayResized it to 4 cores and 24 GB. Oracle accepted on the first try.

And the real log from the bot (in UTC, IP hidden):

[2026-12-04 12:35:28] Current ARM A1 Usage: 0.0/4.0 OCPUs, 0.0/24.0 GB RAM
[2026-12-04 12:35:30] Selected OS Image: Canonical-Ubuntu-24.04-aarch64-2026.11.05-0
[2026-12-04 12:35:30] Target Instance     : oracle-arm-1 | Shape: VM.Standard.A1.Flex (2.0 OCPU, 12.0 GB RAM)
[2026-12-04 12:35:30] Retry Schedule      : ~15 mins (+/- 120s jitter, never under 60s)
[2026-12-04 12:35:30] [Attempt #1] Polling capacity for VM.Standard.A1.Flex in AP-MUMBAI-1-AD-1...
[2026-12-04 12:35:31] Host capacity currently exhausted in AP-MUMBAI-1-AD-1. (Normal for Always Free A1)
...
[2026-12-04 20:27:19] [Attempt #32] Polling capacity for VM.Standard.A1.Flex in AP-MUMBAI-1-AD-1...
[2026-12-04 20:27:20] Host capacity currently exhausted in AP-MUMBAI-1-AD-1. (Normal for Always Free A1)
[2026-12-04 20:44:19] [Attempt #33] Polling capacity for VM.Standard.A1.Flex in AP-MUMBAI-1-AD-1...
[2026-12-04 20:44:20] SUCCESS! Instance created with state: PROVISIONING
[2026-12-04 20:44:20] SUCCESS! Oracle Cloud Always Free VPS Successfully Created!
[2026-12-04 20:44:40] [+] Assigned Public IP : <hidden>

Thirty-two "capacity exhausted" replies, then one success, a little over 8 hours after I started it.

The resize: from 2 cores to 4

Two cores and 12 GB is already plenty for a small web app. But the free allowance is 4 and 24, and I wanted all of it.

Oracle Cloud instance list before the resize: oracle-arm-1 on VM.Standard.A1.Flex with 2 OCPUs and 12 GB of memory, and retry-bot on VM.Standard.E2.1.Micro with 1 OCPU and 1 GB.
Before: what the retry bot got. 2 cores, 12 GB. IPs hidden.

Oracle's ARM servers are "flexible": you can change the cores and memory of an existing server. Resizing still needs free capacity on Oracle's side, so I expected another long wait. Instead, Oracle accepted the change on the first request. The server stopped, came back a few minutes later, and showed the full allowance.

Oracle Cloud instance list after the resize: oracle-arm-1 now shows 4 OCPUs and 24 GB of memory, highlighted in yellow.
After: 4 cores, 24 GB, a few minutes later. IPs hidden.

You can do it from the console (Instance, Edit, Edit shape), but I used a small script with Oracle's Python library. It finds the server by name, asks for 4 cores and 24 GB, and waits until it is running again:

# resize_a1.py: grow an Always Free ARM server to the full 4 cores and 24 GB.
# Run anywhere your ~/.oci/config is set up:  python3 resize_a1.py oracle-arm-1
# The server restarts during the resize. Only use it when nothing important is running.
import sys
import time

import oci

NAME = sys.argv[1] if len(sys.argv) > 1 else "oracle-arm-1"
config = oci.config.from_file()
compute = oci.core.ComputeClient(config)

server = next(
    i for i in compute.list_instances(config["tenancy"]).data
    if i.display_name == NAME and i.lifecycle_state != "TERMINATED"
)
print("before:", server.shape_config.ocpus, "cores,", server.shape_config.memory_in_gbs, "GB")

try:
    compute.update_instance(
        server.id,
        oci.core.models.UpdateInstanceDetails(
            shape_config=oci.core.models.UpdateInstanceShapeConfigDetails(ocpus=4, memory_in_gbs=24)
        ),
    )
except oci.exceptions.ServiceError as e:
    # "Out of host capacity" here just means: try again later
    sys.exit(f"refused: {e.code}: {e.message}")

time.sleep(20)  # the server stops first, then starts again with the new size
server = oci.wait_until(
    compute, compute.get_instance(server.id), "lifecycle_state", "RUNNING", max_wait_seconds=900
).data
print("after:", server.shape_config.ocpus, "cores,", server.shape_config.memory_in_gbs, "GB")
before: 2.0 cores, 12.0 GB
after: 4.0 cores, 24.0 GB

Inside the server, nproc now says 4 and free -g shows 23 GB usable (the system keeps a little for itself). I cannot promise the resize will be that easy for you, but try it before you start another long retry run. Getting a small server first and growing it seems to be much easier than getting a big one outright.

One warning: 4 cores and 24 GB is the total for all your ARM servers. Do not create a second one, or grow this one further, or you are outside the free tier.

Making sure it really is free

"Free" with a card on file makes anyone nervous, so I check four things:

  • Account type: Billing, Upgrade and Manage Payment. My welcome email confirms a Free Trial account, which means Oracle cannot charge me at all. Anything over the limits simply cannot be created. When the trial ends, the account becomes Always Free.
  • Usage against the limits: the script below.
  • Cost Analysis: Billing, Cost Analysis, this month. It should say $0.00. Charges show up about a day after use, so check again the next day.
  • A $1 budget alert: Billing, Budgets, Create Budget, with an email alert at 1%. If anything ever starts costing money, I hear about it the same day.

The console spreads usage across several pages, so I wrote a short script that adds up everything that counts toward the free limits and prints it in one place:

# check_free_usage.py: compare what you run against Oracle's Always Free limits.
# Run anywhere your ~/.oci/config is set up:  python3 check_free_usage.py
import oci

config = oci.config.from_file()
tenancy = config["tenancy"]
compute = oci.core.ComputeClient(config)
storage = oci.core.BlockstorageClient(config)
identity = oci.identity.IdentityClient(config)

servers = [i for i in compute.list_instances(tenancy).data if i.lifecycle_state != "TERMINATED"]
arm = [i for i in servers if i.shape == "VM.Standard.A1.Flex"]
micro = [i for i in servers if i.shape == "VM.Standard.E2.1.Micro"]

disk = 0
for ad in identity.list_availability_domains(tenancy).data:
    boots = storage.list_boot_volumes(availability_domain=ad.name, compartment_id=tenancy).data
    disk += sum(b.size_in_gbs for b in boots if b.lifecycle_state != "TERMINATED")
disk += sum(v.size_in_gbs for v in storage.list_volumes(compartment_id=tenancy).data if v.lifecycle_state != "TERMINATED")


def row(name, used, limit):
    status = "OK" if used <= limit else "OVER THE FREE LIMIT: this costs money"
    print(f"{name:<15}{used:>6g} of {limit:<5g}{status}")


row("ARM cores", sum(i.shape_config.ocpus for i in arm), 4)
row("ARM RAM (GB)", sum(i.shape_config.memory_in_gbs for i in arm), 24)
row("Micro servers", len(micro), 2)
row("Disk (GB)", disk, 200)

This is what it prints for my account:

ARM cores           4 of 4    OK
ARM RAM (GB)       24 of 24   OK
Micro servers       1 of 2    OK
Disk (GB)          97 of 200  OK

Right at the limit on ARM, and comfortably under everywhere else. At the limit is fine. Over it is not.

You may notice the ARM server does not show the "Always Free" label in the instance list the way the Micro does. That is normal: the label goes on fixed-size machines, and ARM servers can be resized. What matters is staying within the total.

The catch: Oracle reclaims idle servers

There is one rule to know about. On free accounts, Oracle can stop a server that looks idle for 7 days straight. For ARM servers, "idle" means all three of these:

MeasureCounts as idle when
CPU (95th percentile)under 20%
Networkunder 20%
Memory (ARM servers only)under 20%

The server is stopped, not deleted, and you can start it again. The problem is that starting an ARM server needs free capacity, which is exactly what took 8 hours to get. A fresh server, or a small website on a 4-core, 24 GB machine, can easily sit under 20% on everything. Mine used 682 MB of memory and almost no CPU right after the resize.

There are two ways to deal with it.

The proper fix: upgrade to Pay As You Go. Paid accounts are not subject to idle reclaiming, and usage within the Always Free limits still costs nothing. Pair it with the $1 budget alert so you would know about any charge the same day.

The workaround: keep the server genuinely busy. This is what I run for now. It is a systemd service using stress-ng that keeps CPU around 30% and holds 5.5 GB of memory, just above the thresholds. It runs at the lowest possible priority, so it only uses CPU that nothing else wants, and if memory ever runs short it is the first thing the system kills.

# /etc/systemd/system/keep-busy.service
[Unit]
Description=Keep this Always Free server above Oracle idle-reclaim thresholds (CPU and memory over 20%)
After=network-online.target

[Service]
# 4 workers at 30% each = about 30% of the 4 cores; plus 5.5 GB of memory held (about 23% of 24 GB)
ExecStart=/usr/bin/stress-ng --cpu 4 --cpu-load 30 --vm 1 --vm-bytes 5500M --vm-hang 0 --timeout 0 --quiet
# Lowest priority: only uses CPU nothing else wants, so real work always comes first
CPUSchedulingPolicy=idle
Nice=19
IOSchedulingClass=idle
# If memory ever runs short, this is killed first, never your app
OOMScoreAdjust=1000
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target
sudo apt-get install -y stress-ng
sudo nano /etc/systemd/system/keep-busy.service   # paste the unit above
sudo systemctl daemon-reload
sudo systemctl enable --now keep-busy

# Check it, pause it, or remove it
systemctl status keep-busy
sudo systemctl stop keep-busy
sudo systemctl disable --now keep-busy

Right after starting it, the server showed 30% CPU and 26% memory. You can watch the same numbers in the console under the instance's Metrics tab. To be clear, this is a workaround, and Oracle can change its rules. If you can add a card, Pay As You Go is the better long-term answer, and then you can remove this service.

What is next

The server is ready and waiting. Next, I am moving Startups Town onto it: Node, a process manager, automatic HTTPS, opening the right ports (Oracle blocks them in two different places), and a one-command deploy. That will be its own post, with real before and after numbers.

If you are paying for hosting you barely use, or stuck on a free plan that sleeps, give Oracle a night. Start the bot before bed. You might wake up to a 4-core server.

Frequently asked questions

Is Oracle Cloud's Always Free ARM server really free forever?

Yes, within the limits: 4 ARM cores and 24 GB of RAM in total, 200 GB of disk, and 10 TB of outbound traffic a month. New accounts also get a 30 day trial with credits for paid services. When the trial ends, anything outside the Always Free limits is stopped, and Always Free resources keep running.

Why does Oracle say "Out of host capacity" when I create an ARM server?

The free ARM servers are popular and Oracle only has so much spare hardware in each region. When none is free, the request fails. Capacity frees up at random times, which is why a script that retries every few minutes usually succeeds within hours or days.

Should I ask for 4 cores and 24 GB straight away?

Asking for less, such as 2 cores and 12 GB or 1 core and 6 GB, fits into free slots far more often. ARM servers on Oracle can be resized later, and in my case going from 2 cores and 12 GB to 4 cores and 24 GB worked on the first try.

Do I need a credit card for Oracle Cloud's free tier?

Oracle asks for a card during sign-up to verify your identity. A free trial or Always Free account is not charged. You can only be billed if you upgrade to Pay As You Go and then use more than the free limits.

Can Oracle take my free server away?

Yes, if it looks idle. On free accounts, a server whose CPU, network, and (for ARM) memory all stay under 20% for 7 days can be stopped. You can start it again, but an ARM server needs free capacity to start, which is the hard part. Upgrading to Pay As You Go removes this rule and costs nothing within the free limits.

Which region should I pick when signing up?

Free ARM servers can only be created in your home region, and you cannot change it later. Pick the region closest to your users or, if you already have one, your database.

All guides →

Shipping on a $0 budget?

Launch your startup on Startups Town for free: a permanent profile page, a 3D building on the map, and a dofollow backlink.

Launch for free
A Founder Garage, the building a free listing gets on the startups.town map