
How I Deployed n8n for Free Using Docker (and Connected It with Google Services)
Step-by-step guide to self-host n8n using Docker, configure Google OAuth, and expose webhooks using tunnel mode.
🚀 How I Deployed n8n for Free Using Docker (and Connected It with Google Services!)
If you’ve ever wanted to learn n8n, automate your tasks, and deploy it completely free, this post is for you.
I’ve been exploring n8n, the open-source alternative to Zapier and Make, and in this guide, I’ll show you how I deployed it for free, connected it with Google services like Gmail and Google Docs, and even handled tricky webhook connection issues using Docker’s tunnel feature.
Let’s dive in 👇
🧱 What is n8n?
n8n (short for “nodemation”) is a workflow automation tool that lets you connect apps and build powerful automations — with or without code.
You can self-host it, which means you’re not limited by pricing tiers. In this tutorial, I’ll show how I used Docker to self-host n8n on my machine — no paid server, no advanced setup.
🎥 Step 1: Deploying n8n for Free with Docker
To start, I followed this amazing video tutorial that explains how to deploy n8n locally using Docker.
You can watch it here:
Once Docker is installed, simply open your terminal and run the following command to start n8n:
docker run -it --rm --name n8n-container -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n✅ What this does:
-p 5678:5678→ Maps your local port to n8n’s web UI.-v n8n_data:/home/node/.n8n→ Persists your workflows and credentials.- You can now visit http://localhost:5678 in your browser to access n8n.
🔐 Step 2: Setting Up Google OAuth Credentials (Gmail, Docs, Sheets, etc.)
Once your n8n instance is running, you’ll likely want to connect Google services like Gmail or Google Docs.
To do this, you need to create Google OAuth credentials.
This video walks through every step perfectly 👇
🧩 Quick summary:
-
Go to Google Cloud Console.
-
Create a new project (name it something like
n8n-automation). -
Under APIs & Services → Credentials, create an OAuth 2.0 Client ID.
-
Choose Web application, and add your redirect URL:
http://localhost:5678/rest/oauth2-credential/callback -
Copy the Client ID and Client Secret and add them to your n8n Google credential node.
That’s it! You’ve now connected n8n to Google’s APIs — ready to automate Gmail, Docs, Sheets, Calendar, and more.
🌐 Step 3: Fixing Webhook Issues (HTTP / HTTPS) Using Docker Tunnel
When building automations involving webhooks (like Telegram, Slack, or APIs that require a public callback URL), your local machine’s localhost isn’t accessible to the internet.
This is where the tunnel mode comes in.
Instead of using localhost, you can use this Docker command:
docker run -it --rm --name n8n-container -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n start --tunnelThis creates a secure public tunnel (powered by n8n) that allows external services to reach your local n8n instance — perfect for testing webhooks.
🎯 Wrapping Up
I hope this guide helps you get started with n8n, whether you’re automating emails, syncing data, or building workflows with webhooks.
If you found this helpful, consider subscribing to my blog for more tutorials like this. Let me know in the comments if you’d like to see:
- A production-ready
docker-composesetup - More examples of n8n workflows
- Troubleshooting tips for common n8n issues
Happy automating! 🚀