I run n8n on Google Cloud. It’s my personal automation setup - I use it to schedule a few tasks and experiment with AI workflows. I set it up using Cloud Run and Cloud SQL, pointed it at a PostgreSQL 13 database, and mostly forgot about it.
Then in June I checked my billing and saw £16.46 for May.
For something I barely use, that felt wrong. I opened the GCP console and used the Gemini AI assistant built into it, which I’d never tried before, and just typed: “why is this project incurring costs?”
What came back was clearer than I expected. The database was the problem. Cloud SQL had billed £13.17, and most of that was an “Extended Support” charge for running PostgreSQL 13, which is past its standard support window. That surcharge alone was £7.98. The rest was the instance itself and a bit of storage. Cloud Run added another £3.29, partly because I’d had it configured with “CPU is always allocated”, which means you pay even when nothing is happening.
I’d assumed Google had a generous free tier across its services. Most of the developer-facing content you come across gives that impression. It turns out Cloud SQL has no permanent free tier at all. It was free during my initial $300 trial credit, and once that ran out, so did the free part. Nobody sent me an email.
Gemini suggested two fixes: upgrade the PostgreSQL version to eliminate the Extended Support fee, or move off Cloud SQL entirely. n8n supports SQLite natively, which stores everything in a single file rather than a managed database. For a single-user personal setup, that’s fine. And Google does offer one e2-micro virtual machine for free indefinitely in specific US regions. Moving to that would bring the bill to near zero.
I picked the VM route.
Setting up the VM
The original suggestion involved something called the App Design Center, which would have let me deploy a pre-configured setup in a few clicks. That didn’t work. There was no deploy button visible, and it turned out I hadn’t enabled ADC on the project. I enabled it. The button still wasn’t there. I moved on and used gcloud commands directly instead.
Creating the VM was a single command: an e2-micro instance in us-central1-a with a 30GB standard disk, which qualifies for the Always Free tier.
From there I SSHed into the VM and tried to pull the n8n Docker image.
It failed. Twice.
The error was invalid tar header, which happens when a Docker image layer gets corrupted mid-download. I cleared the partial images, tried again, got the same error. Gemini suggested the problem was with the version of Docker that ships with Debian by default, so I removed it and installed the official Docker engine from Docker’s own repository. Third attempt worked.
Then the extraction step stalled. Not crashed, just very, very slow.
That slowness is just what the e2-micro is. It runs on 0.25 vCPU most of the time. The n8n image is over 300MB compressed and more than 1GB once unpacked. On a quarter of a core with a slow standard persistent disk, that’s a patient ten minutes of watching a progress bar crawl. Gemini told me not to cancel it mid-extraction, which was the right call. Cancel it and you’re back to the tar header error.
Once the container was up, I opened a firewall rule to allow traffic on port 5678, found the VM’s external IP in the console, and typed the address into a browser. n8n loaded.
Cleaning up
I exported my workflows from the old Cloud Run instance, imported them into the new one, then deleted the Cloud SQL database and the Cloud Run service. Those delete commands are the ones you have to remember. Closing the SSH window doesn’t stop anything from billing.
The browser still shows “Not Secure” because I’m on HTTP over a bare IP address with no domain and no SSL certificate. That’s a trade-off I’m accepting for now. It’s for personal use and I access it from home. The bigger trade-off is that the free VM is in us-central1, in the US, not the UK. There’s a noticeable lag when using the interface. For a tool I mostly use to trigger background automations, it’s fine.
One thing worth saying about the Gemini side of this: I wasn’t expecting much from an AI embedded in a billing console. It turned out to be genuinely useful for exactly this kind of problem, where you know something is wrong but don’t know enough about the service architecture to know where to look. I gave it a vague question and got a specific cost breakdown with a clear recommendation. The bit where it explained that Cloud SQL has no free tier was the moment I actually understood what I’d set up.
My May bill was £16.46. June should be close to zero.