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:
π₯οΈ 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.
Top comments (0)