by Shubham Sachdeva
1. Create a Google Cloud Project
- Go to Google Cloud Console.
- Click the project dropdown (top-left) → New Project.
- Name:
n8n-project
(or any name you like).
- Click Create.
2. Enable Required APIs
- In the Cloud Console, click the ≡ menu (top-left) → APIs & Services → Library.
- Search for Compute Engine API → Click Enable.
- Search for Cloud SQL API → Click Enable.
3. Create a VM Instance (Virtual Machine)
- Go to Compute Engine → VM Instances → Create Instance.
- Name:
n8n-server
.
- Region: Choose a location close to you (e.g., "us-central1").
- Machine Type:
e2-small
(cheapest option for testing).
- Boot Disk: Click Change → Choose Ubuntu 22.04 LTS → Keep the default disk size (10 GB).
- Firewall: Check Allow HTTP traffic and Allow HTTPS traffic.
- Click Create.
- Setup a static IP (Optional)
- Edit your VM after stopping it
- CLick on Network interface, after scroliing down a bit
- Then go to external ipv4 address
- Click on Reserve Static IP Address
- Give it a name and click on reserve
- Save VM
- Start VM Again
4. Open Ports for n8n
n8n uses ports 5678
(HTTP) and 5679
(HTTPS). Think of ports as doors—we need to open them so n8n can communicate with the internet.
- Go to VPC Network → Firewall → Create Firewall Rule.
- Name:
allow-n8n
.
- Targets: All instances in the network.
- Source IP ranges:
0.0.0.0/0
(this allows access from anywhere; you can restrict this later).
- Protocols and Ports: Select TCP, then enter
5678,5679
.
- Click Create.
5. Connect to Your VM via SSH
- Go back to Compute Engine → VM Instances.
- Find your
n8n-server
instance → Click the SSH button (a black terminal window will open in your browser).
6. Install Docker
In the SSH terminal, run these commands one by one.