Hosting a Blog for Free on Oracle Cloud: The Real Setup

Share

This blog costs me about ₹70 a month to run — and that's entirely the domain name. The hosting is genuinely free, running on an Oracle Cloud Always Free VM, and the setup took an evening because I didn't follow a tutorial: I described what I wanted to Claude Code and let it do the server work. Here's the full picture, including the parts that trip people up.

Why Oracle Cloud's free tier is the sleeper option

Most "free hosting" is a trial that expires or a plan crippled enough to force an upgrade. Oracle Cloud's Always Free tier is neither — it includes VM instances that stay free indefinitely, with enough compute and memory to run a real production blog with room to spare. Ghost plus MySQL in Docker sits comfortably within it. The trade-off is that OCI's console is built for enterprises, not hobbyists — the learning curve is the price of admission, and it's also why the tier remains underused while everyone fights over cheaper-looking options that cost more.

The stack, and why each piece

Ghost over WordPress because for a writing-focused blog with a newsletter, Ghost ships with memberships, subscriptions, and a clean editor built in — no plugin archaeology. It's fully open source, so self-hosting it costs nothing and gives you every feature the hosted Pro version charges for.

Docker because Ghost's official installer only supports Ubuntu, and my VM runs Oracle Linux. Containers sidestep the OS compatibility question entirely — and made adding a second blog on the same infrastructure later a copy-paste job rather than a second evening.

Nginx + Let's Encrypt in front, because Ghost should never face the internet directly. Nginx terminates HTTPS with a free auto-renewing certificate and proxies traffic to the container, which listens only on localhost.

The one genuinely optional cost besides the domain: email delivery for the newsletter needs a service like Mailgun, whose free tier covers a new blog's volume comfortably.

The Claude Code twist

The unusual part of my setup wasn't the stack — it was the method. Instead of working through documentation, I wrote a detailed prompt describing the end state (Ghost in Docker, Nginx reverse proxy, SSL, firewall rules, verification checks) and pasted it into Claude Code running on the VM itself. It surveyed the server, installed what was missing, wrote the configs, obtained the certificate, and verified the result — pausing where human judgment or console access was needed.

That last clause matters. The approach isn't "AI does everything" — it's that a well-written prompt turns eight hours of tutorial-following into one hour of supervision. You still need to know enough to review what it's doing, which brings me to the failure points.

The three things that actually go wrong

OCI's second firewall. This catches nearly everyone: opening ports with firewalld on the VM is not enough. OCI has its own network-level Security List in the cloud console, and until ports 80 and 443 are opened there too, your server is unreachable and your SSL certificate issuance fails with unhelpful errors. If your fresh setup times out, check the Security List before touching the server.

DNS before SSL. Let's Encrypt verifies you control the domain by reaching it over HTTP. If your domain's A record hasn't propagated to the VM's public IP yet, certificate issuance fails. Run dig +short yourdomain.com and confirm it returns your server's IP before attempting anything SSL-related.

SELinux silently blocking the proxy. Oracle Linux ships with SELinux enforcing, which by default stops Nginx from connecting to the Docker container's port — producing a mysterious 502 error on an otherwise perfect setup. One command fixes it: setsebool -P httpd_can_network_connect 1. Knowing this exists saves an hour of confusion.

What "free" honestly costs

The money is nearly nothing: a domain (₹800–1,200 a year) and zero hosting. The real cost is operational: you are now the person who applies updates, keeps backups, and notices if the site goes down. For me that's fine — I run Linux servers professionally anyway. If you don't, and the ₹1,000-odd a month for managed hosting buys you peace of mind, that's not a bad trade; it's just a different one.

But if you're a developer who wants a real blog with full ownership, zero monthly hosting cost, and a weekend project that teaches you Docker, Nginx, and cloud networking along the way — this is the best free lunch in hosting right now. And with an AI agent doing the tedious parts, the barrier has never been lower.

Read more