Looking to install n8n on Google Cloud but not sure where to begin? You're not alone. n8n—a powerful, open-source workflow automation tool—has gained popularity among developers, marketers, and small businesses for its flexibility and no-code/low-code approach. Deploying it on Google Cloud helps you harness the power of automation at scale with reliable performance, security, and global access. This beginner-friendly guide walks you through every step required to install n8n on Google Cloud, even if you're new to cloud platforms.
Whether you want to automate email campaigns, connect your favorite APIs, or streamline task management, setting up n8n on Google Cloud gives you full control over your workflows without third-party limitations.
Why Install n8n on Google Cloud?
Google Cloud offers a robust infrastructure that allows you to run containerized applications with minimal hassle. By deploying n8n on Google Cloud, you benefit from:
- High availability with global regions and zones
- Cost efficiency, as you can use smaller VM instances for lightweight use cases
- Tight integration with other Google services like Sheets, Gmail, BigQuery, or Firebase
- Scalability, should your automation needs grow
Plus, by self-hosting n8n, you maintain privacy and control over your data—something not guaranteed by third-party automation platforms.
What You’ll Need
Before we begin, make sure you have the following:
- A Google Cloud Platform (GCP) account
- Basic familiarity with Linux command line and SSH
- A billing-enabled Google project
- A registered domain name (optional, but recommended for SSL)
If you don’t have a GCP account yet, you can sign up here.
Step 1: Create a Virtual Machine on Google Compute Engine
Let’s spin up a virtual machine (VM) to host your n8n instance.
Create a VM Instance
-
Head over to the Google Cloud Console
-
Navigate to Compute Engine > VM Instances and click “Create Instance”
-
Configure the following:
- Name:
n8n-vm
- Region/Zone: Choose based on your target audience (e.g.,
us-central1
) - Machine Series: E2
- Machine Type: e2-small (or even e2-micro for light use)
- Name:
-
Under Boot Disk:
- OS: Ubuntu 22.04 LTS
- Change disk size to 20GB or more if needed
-
Enable HTTP and HTTPS traffic under Firewall
-
Click Create
SSH Into the VM
Once the VM is created:
- Click SSH from the VM overview page to launch a terminal window directly in your browser.
Step 2: Install Docker and Docker Compose
n8n is easily deployed using Docker, so let’s set that up.
sudo apt update && sudo apt upgrade -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
Next, install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Verify:
docker --version
docker-compose --version
Step 3: Deploy n8n with Docker Compose
Now it’s time to create the Docker setup for n8n.
Create Project Directory
mkdir n8n && cd n8n
Create a docker-compose.yml
File
Use the following configuration (edit credentials and domains as needed):
version: "3"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- GENERIC_TIMEZONE=America/New_York
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=securepassword
- N8N_HOST=your-server-ip
- N8N_PORT=5678
volumes:
- ~/.n8n:/home/node/.n8n
🔒 Tip: Replace
securepassword
with a strong password and consider setting up a custom domain with SSL (using Let’s Encrypt + NGINX) for production environments.
Start n8n
docker-compose up -d
Your n8n instance should now be running at http://your-server-ip:5678
Step 4: Use and Secure Your n8n Instance
Open your server’s IP in a browser, e.g., http://34.123.45.67:5678
, and log in using the username and password defined in your Docker Compose file.
Best Practices
- Change default creds after initial setup
- Use a reverse proxy like NGINX for domain + SSL (Let’s Encrypt)
- Regularly update the Docker image
- Set up persistent volumes to prevent data loss
- Use GCP’s firewall rules to limit access if necessary
Example Use Case: Automate Google Sheets to Gmail Workflow
Let’s say you're tracking customer leads in a Google Sheet and want to send a welcome email automatically via Gmail.
With n8n, you can create a workflow like:
- Trigger: Google Sheets “New Row”
- Action: Send Email via Gmail
Here’s how it flows:
- A new lead is added to a sheet
- n8n reads the row via Google Sheets API
- A welcome message is sent using authenticated Gmail credentials
You can add filters, delays, or connect CRMs like HubSpot or Notion to enrich the automation pipeline.
Optional: Set Up Custom Domain and SSL with NGINX
If you prefer to use your own domain (e.g., automation.yourdomain.com
), you can set up NGINX with Let’s Encrypt for security.
Basic Setup Steps:
-
Point A record of domain to your server’s IP
-
Install NGINX:
sudo apt install nginx -y
-
Use Certbot to configure HTTPS:
sudo snap install core; sudo snap refresh core sudo snap install --classic certbot sudo certbot --nginx
-
Update the
docker-compose.yml
with:N8N_HOST=automation.yourdomain.com
VUE_APP_URL_BASE_API=https://automation.yourdomain.com
This secures your data and looks much more professional.
## Recap: Key Components
Step | Key Action | Tools/Commands Used |
---|---|---|
1 | Create Google Cloud VM | Compute Engine |
2 | Install Docker & Docker Compose | Linux CLI |
3 | Deploy n8n | docker-compose |
4 | Secure n8n Instance | Basic Auth, NGINX, SSL |
FAQ
What is n8n?
n8n is an open-source workflow automation tool that lets you connect various apps, APIs, and services—like a self-hostable Zapier alternative. You can use it to automate tasks, transform data, or build internal tools.
Is it free to install n8n on Google Cloud?
Yes, if you have a Google Cloud Free Tier account, you can use an e2-micro VM which offers limited resources but is good for testing or small automations. You only pay for usage beyond the free tier.
Can I use n8n to automate Google Workspace tools?
Absolutely. n8n has native nodes for Google Sheets, Gmail, and Google Drive, allowing seamless workflows inside your G Suite.
How do I update n8n once it’s installed?
You can update to the latest n8n version by running:
docker-compose pull
docker-compose up -d
This pulls the latest image and restarts the container.
Is Docker the only way to install n8n?
No, n8n can also be installed using npm, on bare metal, or via other platforms like Heroku, AWS, or DigitalOcean. However, Docker on Google Cloud provides a balanced mix of control and manageability.
By following this guide, you now have a fully operational instance of n8n running on Google Cloud. Start building powerful automation and streamline your workflows today. If you run into issues, the n8n community is a great place to get help.