Hey DEV community! 👋

I'm a DevOps Engineer obsessed with automation, cloud efficiency, and squeezing every drop out of free tiers. Recently, I deployed n8n, the powerful open-source workflow automation tool, on a GCP e2-micro instance (aka Free Tier heaven) — and it’s running securely, persistently, and flawlessly.

Let me show you how I did it — step-by-step, script-included, and cloud-cost-friendly. 💸☁️


💡 Why n8n?

If Zapier and Node-RED had a baby, it would be n8n. You can automate everything — from APIs to Slack workflows — and run it self-hosted for full control and zero SaaS limits.


🧰 Stack & Setup

  • 🧱 Google Cloud Platform Free Tier (e2-micro VM)
  • 🐳 Docker + Docker Compose
  • 🔐 Basic Auth + Secured SSH
  • 📁 Persistent storage via Docker volumes
  • ⚙️ Automated install via shell script

🔧 Full Guide on Medium

I documented everything — provisioning the VM, opening the right ports, installing Docker, configuring .env, securing the VM, and even automating it all via a deploy script.

👉 Read the full tutorial here:

📖 https://medium.com/@gupta.surender.1990/how-to-deploy-a-self-hosted-n8n-instance-on-google-cloud-free-tier-with-docker-compose-63f7fa1a40db


🖥️ TL;DR — The Highlights

✅ Create an Ubuntu 22.04 e2-micro instance
✅ Install Docker + Compose
✅ Setup .env with Basic Auth
✅ Mount persistent volume
✅ Open only ports 22 and 5678
✅ Secure SSH (no root login, key-based access only)
✅ Hit your instance on http://:5678 and start building!


🧪 Bonus: One-Command Deploy Script

Want it automated? I built a deploy script that:

  • Installs Docker & Compose
  • Sets up environment variables
  • Builds your docker-compose.yml
  • Starts the n8n container — ready to go!

Just run:

chmod +x n8n-deploy-gcp.sh
./n8n-deploy-gcp.sh

And boom 💥, you’ve got a self-hosted automation engine for free.


🔒 Security Reminder

Please don’t forget to:

  • Use strong Basic Auth credentials
  • Restrict open ports in your GCP firewall
  • Disable password-based SSH login Secure automation is happy automation. 😄

🤝 Let’s Connect

If you:

  • ❤️ n8n
  • 💻 Love DevOps
  • 🧠 Automate all the things

Let’s chat! Drop your feedback, questions, or improvements in the comments.


🚀 Go Read It & Deploy Your Own for FREE!

👉 https://medium.com/@gupta.surender.1990/how-to-deploy-a-self-hosted-n8n-instance-on-google-cloud-free-tier-with-docker-compose-63f7fa1a40db