Skip to content

llmx-tech/n8n-cloud-deploy

Repository files navigation

🚀 Deploy n8n to Google Cloud in 5 Minutes

Production-ready n8n with automatic HTTPS. No Docker knowledge required.

License: MIT Platform: GCP n8n Shell Script

Automated deployment tool for running self-hosted n8n on Google Cloud Platform with Caddy reverse proxy, automatic HTTPS via Let's Encrypt, and interactive setup.

Currently supports: Google Cloud Platform (GCP) Coming soon: AWS, Azure, DigitalOcean, and more! See Roadmap


⚡ Quick Start

Deploy n8n with one command:

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

That's it! The script will:

  1. ✅ Download all necessary files
  2. ✅ Guide you through interactive setup
  3. ✅ Deploy n8n with automatic HTTPS
  4. ✅ Verify DNS propagation
  5. ✅ Give you a working n8n instance at https://your-domain.com

Time to deploy: ~5 minutes Estimated cost: $25-35/month (customizable)


✨ Why Use This Tool?

Feature What You Get
🔒 Automatic HTTPS Let's Encrypt SSL certificates, auto-renewal every 60 days
🎯 Interactive Setup No config files to edit - just answer simple questions
💰 Cost Transparency Choose from 7 VM sizes with upfront pricing ($8-$185/month)
🛡️ Production Ready Caddy reverse proxy, proper firewall rules, persistent volumes
🔄 DNS Verification Auto-checks DNS propagation before proceeding
🧹 Selective Cleanup Choose what to keep (keep IP, delete instance, etc.)
📊 Resource Detection Smart detection of existing resources to prevent duplicates

📦 What Gets Deployed?

┌─────────────────────────────────────────┐
│   Your Domain (https://n8n.example.com) │
└────────────────┬────────────────────────┘
                 │
         ┌───────▼────────┐
         │  Caddy Proxy   │  ← Automatic HTTPS
         │  (Port 80/443) │     Let's Encrypt
         └───────┬────────┘
                 │
         ┌───────▼────────┐
         │   n8n Server   │  ← Workflow Automation
         │  (Port 5678)   │
         └────────────────┘

GCP Resources:
  • Compute Engine VM (Ubuntu 22.04)
  • Static IP Address
  • Firewall Rules (80, 443, 22)
  • Persistent Volumes (Docker)

💵 Pricing

Choose your instance size during setup:

Machine Type vCPUs Memory Monthly Cost* Best For
e2-micro 0.25 1 GB $8-10 Testing only
e2-small 0.5 2 GB $14-16 Light usage, few workflows
e2-medium 1 4 GB $25-35 Recommended for most users
e2-standard-2 2 8 GB $50-65 Heavy usage, many workflows
e2-standard-4 4 16 GB $97-120 Very heavy usage
n2-standard-2 2 8 GB $73-90 Better performance than e2
n2-standard-4 4 16 GB $147-185 High performance needs

*Prices include VM + Static IP + Storage. Actual costs vary by region.

💡 Tip: You can upgrade/downgrade anytime by redeploying!

vs. n8n Cloud Pricing

Feature This Tool (Self-Hosted) n8n Cloud
Cost $25-35/month Starts at $20/month (limited)
Workflows Unlimited Limited by plan
Executions Unlimited Limited by plan
Data Control 100% yours Hosted by n8n
Customization Full access Limited

📋 Prerequisites

Before starting, you need:

  • Google Cloud SDK (install here)
  • GCP Account with billing enabled
  • Domain Name you can manage (for DNS A record)
  • 5 minutes of your time

Permissions needed: Compute Admin, Service Account User


🎯 How It Works

Step 1: Install & Run

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

Step 2: Answer Questions

The script guides you through:

  • Select your GCP project
  • Pick a region (auto-detected list)
  • Choose VM size (with pricing)
  • Enter your domain name

Step 3: Update DNS

Script shows your static IP → Update your DNS A record → Press Enter

Step 4: Done! 🎉

Access your n8n instance at https://your-domain.com


🔧 Advanced Usage

Manual Installation

# Clone repository
git clone https://github.com/llmx-de/n8n-cloud-deploy.git
cd n8n-cloud-deploy

# Run deployment
bash provision-cloud.sh

Cleanup Options

# Interactive cleanup - choose what to delete
bash cleanup.sh

# Options:
# ✓ Delete instance, keep IP (reuse later)
# ✓ Delete everything (stop all charges)
# ✓ Keep firewall for faster redeployment

SSH Access

gcloud compute ssh n8n-instance --zone=<your-zone>

Update n8n

cd /opt/n8n
sg docker -c "docker compose pull n8n"
sg docker -c "docker compose up -d --force-recreate n8n"

🛡️ Security

  • 🔒 HTTPS by default via Let's Encrypt
  • 🔑 SSH access (restrict to your IP - see SECURITY.md)
  • 🔐 Firewall rules for ports 22, 80, 443
  • 📝 Security guide with best practices

⚠️ After deployment: Restrict SSH access to your IP! See SECURITY.md for details.


📚 Documentation


🗺️ Roadmap

We're actively working on expanding this tool to support more cloud providers and features!

Planned Cloud Providers

  • ☁️ AWS - Amazon Web Services support (coming soon!)
  • 🔷 Azure - Microsoft Azure support
  • 🌊 DigitalOcean - Simple cloud deployment
  • 🚀 Linode/Akamai - Alternative cloud hosting
  • 🌐 Hetzner - European cloud provider

Upcoming Features

  • 📊 Monitoring & Alerts - Built-in monitoring setup
  • 💾 Automated Backups - Scheduled backup configurations
  • 🐘 PostgreSQL Support - Database backend option
  • 🔄 Queue Mode - n8n queue mode for scaling
  • 🏗️ Terraform Option - Infrastructure as Code alternative

Want to help? Check out CONTRIBUTING.md to get started!


❓ FAQ

How much does this cost per month?

Default setup (e2-medium): $25-35/month

This includes:

  • VM instance: ~$24-30
  • Static IP: $0 (when attached to running instance)
  • Storage: ~$0.40
  • Network: First 1GB free

You can choose smaller instances (from $8/month) or larger ones (up to $185/month).

Can I upgrade/downgrade the VM later?

Yes! Just delete the instance (keep the static IP) and redeploy with a different machine type. Your DNS won't need updating.

How do SSL certificates renew?

Automatically! Caddy handles Let's Encrypt certificate renewal ~30 days before expiry. No manual action needed.

What if I want to stop paying but keep my setup?

Delete the instance but keep the static IP using the cleanup script. You'll pay only ~$7/month for the IP. Redeploy anytime!

How do I backup my data?
cd /opt/n8n
sg docker -c "docker compose stop n8n"
sudo tar -czvf backup.tar.gz /var/lib/docker/volumes/n8n-cloud-deploy_n8n_data/_data
sg docker -c "docker compose start n8n"

See INSTALL.md for full backup/restore guide.

Can I use this in production?

Yes! This creates a production-ready setup with:

  • Automatic HTTPS
  • Reverse proxy (Caddy)
  • Persistent volumes
  • Proper firewall rules
  • Auto-renewing SSL certificates

Just make sure to follow security best practices in SECURITY.md.


🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

Quick Contribution Guide

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments


📧 Support


Made with ❤️ for the n8n community

⭐ Star this repo if you found it helpful!

About

Automated deployment tool for running self-hosted n8n on Google Cloud Platform with Caddy reverse proxy, automatic HTTPS via Let's Encrypt, and interactive setup.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages