Setting Up Free n8n with Unlimited Workflow on Google Cloud
In this tutorial, we will show you how to set up free n8n with unlimited workflow on Google Cloud. Whether you're a beginner or an advanced user, this guide will help you set up n8n, a powerful workflow automation tool, on Google Cloud Platform (GCP) without any cost.
Introduction to n8n and Google Cloud
Stop paying for AI automation. In this video, we will show you how to set up free n8n with unlimited workflow. We were using the paid version of n8n, but we needed more workflow executions, so we figured why not host it ourselves and save some money. Turns out, you can do it for free. If you're looking to use n8n without any cost, this video is for you. Let's get started and set up a free Google VM instance first.
Creating a Free Google VM Instance
Create a free Google VM instance and give your instance a name, we'll use N8n-demo, but you can choose any name you prefer
Next, select a region, any region works, but Iowa is the cheapest at the moment. Pick any zone within that region. For the machine type, this is one of the most important configurations, it's free for the first instance in your project. If you select a larger instance, you will be charged accordingly.
Configuring the OS and Storage
Now, let's configure the OS and storage. You can choose Debian or Ubuntu, but we will use Debian for this setup. For the boot disk, choose a standard persistent disk and set the size to 20 GB. 10 GB can be a bit limiting if you plan to do more, so 20 GB provides extra flexibility. In the networking section, allow HTTPS traffic and enable load balancer health checks. n8n only supports HTTPS, and it's more secure.
Setting Up the VM Instance
That's it for the configuration. Click create, go get a coffee, and wait a few minutes for the VM instance to be set up. We will speed this up. Now that your instance is set up, you can add a DNS record using your assigned IP address. I purchased my domain from Hostinger, so I'll use it as an example. Copy the IP address from Google VM, then navigate to DNS/name servers in Hostinger. Paste the IP address, enter the subdomain, in this case, n8n-demo, select the A record type, and click add record.
Installing n8n and Docker
Install n8n and Docker, first click on the SSH button to enter the Linux console
Once you're there, log in to authorize. This step is optional, but if you've had Docker installed before, running this command will clean up any previous installations. Next, we'll update the Linux system to make sure everything is up to date. Now, run this command to install essential tools that handle secure package management, HTTPS, and system identification.
Configuring Docker
Create a directory for storing GPG keys with the right permissions. This is needed for secure package installations. Then, download Docker's GPG key and save it in the keyrings directory. Let's change the permissions so that everyone can read the Docker GPG key. Now, we're going to add Docker's official Debian repository to our system's sources list for easy package installation. Let's update the package list once more to make sure the new repository is recognized.
Installing Docker and Docker Compose
Install Docker and Docker Compose, then create a Docker Compose YAML file
Here's where we'll define our services for Docker. Go ahead and paste the following content into the file. After that, press escape and type :wq to save and quit. Next, let's create an .env file, paste in the following content, and change it as needed for your setup. Your domain name is essentially your website's name. If your website serves multiple functions, you might want to add a subdomain for better organization.
Configuring n8n
Configure n8n, you can also set a time zone for your n8n to use for execution timestamps later
Lastly, include an SSL email so you can receive reminders for updates. Once you're done, press escape and type :wq to save and quit. Now, create a volume for the n8n data, which will store the SQLite database and encryption key. We'll call it n8n-core-data. Next, create a volume for trafic data called trafic-data.
Starting the n8n Container
Start the n8n container and get them running smoothly
Now, if you type LS or ls -a, you'll be able to see all the files, including the hidden ones you've created. Finally, let's start the n8n and Docker container and get them running smoothly. We will speed this up. n8n should be up and running now.
Accessing n8n
Access n8n, now your n8n will be reachable via your domain
n8n will only be reachable using HTTPS and not using HTTP. Don't panic if you see this, take note, it might not work immediately after the Docker container starts running. Go get a coffee and give it a 2 to 10 minute wait and refresh again, and there you go, you've successfully set up n8n with Docker.
Setting Up Your Owner Account
Set up your owner account, make sure to create a strong password and enable two-factor authentication for extra security
You'll also provide some additional info to personalize your n8n experience and get your license key. Once that's done, you're all set to create your own free AI automation. Let me know if you have any questions in the comments below, and don't forget to subscribe for more tutorials.