n8nGoogle Cloud PlatformSelf-HostingDockerAutomationCloud DeploymentDevOpsGCPn8n TutorialWorkflow Automation

How to Deploy n8n to Google Cloud in 5 Minutes | Complete 2025 Guide

Dmytro ChabanDmytro Chaban
November 2, 202512 min read
How to Deploy n8n to Google Cloud in 5 Minutes | Complete 2025 Guide

How to deploy n8n to Google Cloud: Run one command, answer 5 questions about your GCP project and domain, and you'll have a production-ready n8n instance with automatic HTTPS in 5 minutes. Total cost: $10-35/month for unlimited workflows and executions. No Docker or SSL knowledge required.

curl -fsSL https://raw.githubusercontent.com/llmx-de/n8n-cloud-deploy/main/install.sh | bash

This automated deployment script handles everything: Docker installation, Caddy reverse proxy setup, Let's Encrypt SSL certificates, GCP firewall configuration, and persistent storage volumes.

⭐ GitHub: llmx-de/n8n-cloud-deploy


Why Self-Host n8n? (And Why This Tool Exists)#

I've been using n8n for workflow automation for a while now, and honestly, the deployment options always felt like picking between three equally annoying choices:

  1. n8n Cloud - Easy setup, but you're paying $10-60/month with workflow execution limits (2,000-5,000 executions). Plus, your data sits on their servers.
  2. Manual Docker setup - Full control, but you're dealing with reverse proxies, SSL certificates, firewall rules, and a dozen things that can break.
  3. Other deployment platforms like Railway - Simple, but limited customization and can get expensive as you scale.

I wanted option 4: Quickly deploy to GCP, no SSH, no SSL, no hassle, no manual work, no problems.

So I built this automated n8n deployment tool. And I'm going to show you exactly how easy it is to self-host n8n on Google Cloud Platform.


What You're Actually Getting (n8n Production Setup)#

Let's be clear about what this n8n deployment creates:

This is a production-ready n8n installation on GCP. I'm running my own automation workflows on this exact configuration.


The 5-Minute n8n Deployment Tutorial#

I'm going to walk you through this step-by-step. Seriously, set a timer.

Prerequisites for Self-Hosting n8n (2 minutes)#

You need:

That's it. No Docker knowledge. No Kubernetes. No Terraform. Just basic terminal skills.

Step 1: Run The One-Liner Install Script (30 seconds)#

curl -fsSL https://raw.githubusercontent.com/llmx-de/n8n-cloud-deploy/main/install.sh | bash

This downloads all necessary files to ~/n8n-cloud-deploy and auto-starts deployment after a 3-second countdown. If you need to cancel, just hit Ctrl+C.

Step 2: Interactive n8n Setup - Answer 5 Questions (2 minutes)#

The script guides you through interactive menus with smart defaults:

Question 1: Which GCP project?

Available GCP Projects:
1) my-personal-project
2) my-work-project
#? 1

If you only have one project, it auto-selects it. Smart.

Question 2: Which GCP region?

Select a GCP Region (recommended: regions close to your users):
Tip: Europe regions start with 'europe-', US with 'us-', Asia with 'asia-'

 1) asia-east1          11) europe-west1       21) us-central1
 ...
#? 11

Pick the GCP region closest to you. I'm in Europe, so europe-west1.

Question 3: Which availability zone?

Select a Zone in europe-west1:
1) europe-west1-b
2) europe-west1-c
3) europe-west1-d
#? 1

Doesn't really matter for n8n. Pick any.

Question 4: What VM size for n8n?

Here's where it gets interesting. The script shows you all Google Cloud machine types with pricing:

Machine Type          vCPUs  Memory  Est. Cost/Month  Recommended For
--------------------------------------------------------------------------------
1) e2-micro            0.25   1 GB    ~$7-9           Testing only (may be slow)
2) e2-small            0.5    2 GB    ~$14-16         Light usage, few workflows
3) e2-medium           1      4 GB    ~$24-30         Recommended: Most users
4) e2-standard-2       2      8 GB    ~$49-60         Heavy usage, many workflows
5) e2-standard-4       4     16 GB    ~$97-120        Very heavy usage
6) n2-standard-2       2      8 GB    ~$73-90         Better performance than e2
7) n2-standard-4       4     16 GB    ~$146-180       High performance needs

Select machine type (1-7) [default=3]:

I always pick e2-medium (#3). It's the sweet spot for self-hosted n8n: enough power for real workflows, costs ~$25-30/month.

Want to save money on n8n hosting? Pick e2-small ($14-16/month) for light usage. Running heavy workflows? Pick e2-standard-2 ($49-60/month).

The script defaults to e2-medium if you just hit Enter.

Question 5: What's your n8n domain?

Enter the domain name for n8n (e.g., n8n.example.com): n8n.mywebsite.de

This needs to be a domain you control.

Step 3: Confirm n8n Deployment Configuration (30 seconds)#

The script shows you everything:

=========================================
Deployment Configuration:
=========================================
Project:       my-personal-project
Region:        europe-west1
Zone:          europe-west1-b
Machine Type:  e2-medium
Domain:        n8n.mywebsite.de
=========================================

Continue with this configuration? (y/N): y

Type y and hit Enter.

Step 4: Update DNS for n8n (1 minute)#

The script creates your VM and displays the static IP:

-----------------------------------------------------
Action Required:
Please create a DNS A record for 'n8n.mywebsite.de' pointing to the IP address: 34.116.123.123
-----------------------------------------------------
Press [Enter] to continue after updating the DNS record...

Go to your DNS provider (Cloudflare, Google Domains, whatever) and add:

  • Type: A
  • Name: n8n
  • Value: 34.116.123.123 (use the IP the script shows you)

Hit Enter in the terminal when done.

Step 5: Automatic n8n Installation & SSL Setup (2 minutes)#

The script now:

  1. ✅ Verifies DNS propagation (retries up to 10 times, 100 seconds total)
  2. ✅ Installs Docker on the VM
  3. ✅ Sets up Caddy + n8n containers
  4. ✅ Requests Let's Encrypt SSL certificate
  5. ✅ Starts everything
Checking DNS propagation for n8n.mywebsite.de...
Attempt 1/10: Checking if n8n.mywebsite.de resolves to 34.116.123.123...
✓ DNS propagation confirmed!

Installing Docker...
Starting n8n and Caddy...

-----------------------------------------------------
Deployment complete!
You can now access your n8n instance at: https://n8n.mywebsite.de
-----------------------------------------------------

That's it. Open https://n8n.mywebsite.de (your domain) in a browser.


First Login to Your Self-Hosted n8n#

You'll see the n8n setup screen. Create your admin account:

And you're done. You have a working self-hosted n8n instance with HTTPS.


The Hidden Magic Behind This n8n Deployment#

Here's what the script does behind the scenes that makes this "just work":

1. Automatic DNS Propagation Verification#

Most n8n deployment scripts tell you to update DNS and hope it propagated. This script actually checks:

Checking DNS propagation for n8n.mywebsite.de...
Attempt 1/10: Checking if n8n.mywebsite.de resolves to 34.116.123.123...

If DNS hasn't propagated, it retries automatically. If it still fails after 10 attempts, it warns you and lets you decide whether to continue or wait.

2. Smart Resource Detection for Google Cloud#

Running the script twice? No problem. It detects existing GCP resources:

Static IP 'n8n-static-ip' already exists. Using existing IP...
Firewall rule 'allow-web-traffic' already exists. Skipping creation...

No duplicate charges. No errors. It's idempotent.

3. Docker Permission Handling#

Setting up Docker in a remote script is annoying because group permissions don't apply immediately. The script uses sg docker -c to bypass this:

sg docker -c "docker compose up -d"

This is the kind of detail that makes or breaks a deployment script.

4. Let's Encrypt Auto-Renewal for n8n SSL#

Caddy handles SSL certificate renewal automatically. You'll never see:

Your certificate expired. Fix it manually.

It just renews ~30 days before expiry. No cron jobs. No manual intervention.


n8n Self-Hosting Cost Breakdown (2025)#

Let's talk money. Here's what you're actually paying for when self-hosting n8n on Google Cloud:

Default n8n Setup (e2-medium)#

  • VM: ~$24-30/month
  • Static IP: $0 (when attached to running instance)
  • Storage: ~$0.40/month (10GB disk)
  • Network: First 1GB free, then $0.12-0.23/GB

Total: ~$25-35/month for unlimited n8n workflows

n8n Self-Hosted vs. n8n Cloud Comparison#

FeatureSelf-Hosted n8nn8n Cloud
Monthly Cost$25-35$20-60
WorkflowsUnlimitedLimited by plan
ExecutionsUnlimited2,000-5,000/month
Data Control100% yoursHosted by n8n
Custom NodesYes, unlimitedLimited
VM ResourcesCustomizable (7 sizes)Fixed by plan
Setup Time5 minutes2 minutes

The math: If you're running >5,000 executions/month, need custom nodes, or want full control, self-hosting is cheaper and more flexible.

Budget n8n Hosting Options#

Use e2-small ($14-16/month) for:

  • Personal automation (≤5 workflows)
  • Low-frequency executions
  • Testing/development environments

It works fine for most n8n use cases.


Frequently Asked Questions#

Frequently Asked Questions


Final Thoughts#

I built this deployment tool because I got tired of the same old options: pay for cloud with limits, or spend an hour wrestling with Docker configs and SSL certificates.

The result? Deploy n8n in 5 minutes. Use it for a weekend project. Delete it. Pay $0.50. Or keep it running for $28/month with unlimited everything.

This setup works for:

  • Quick prototyping without commitment
  • Production workflows that need full control
  • Testing new automation ideas cheaply
  • Learning n8n without monthly subscriptions

I've been using this exact script for months. The selective cleanup feature alone has saved me hundreds in compute costs by letting me spin up temporary instances whenever I need them.

If you're looking for the fastest way to get n8n running on GCP with proper HTTPS and zero manual configuration, this is it.

Deploy now:

curl -fsSL https://raw.githubusercontent.com/llmx-de/n8n-cloud-deploy/main/install.sh | bash

Questions or issues? Open an issue on GitHub.