How to Self-Host N8N for Free on Render

How to Self-Host N8N for Free on Render

January 30, 2024ArticFlow Team

If you've been following along with our N8N tutorial series, you've already set up N8N on your local machine. While this works great for personal projects and small-scale automation, deploying N8N to the cloud unlocks even more possibilities.

Why Deploy N8N to the Cloud?

With a cloud-hosted instance, you can:

  • Trigger workflows from external applications, such as automating tasks when you receive an email
  • Access N8N from anywhere
  • Eliminate the need to keep your local machine running

While N8N offers a paid cloud service at around €20 per month, we'll show you how to self-host it for free using Render. If you need more reliability, you can upgrade to a paid plan for just $7/month—still cheaper than the official cloud service and great for client projects or boosting your own productivity.

Step-by-Step Deployment Guide

1. Understanding N8N Self-Hosting Options

Before diving into deployment, let's take a quick look at N8N's official self-hosting documentation. From the N8N website, navigate to Docs > Self-host N8N. Here, you'll find various deployment methods, but in this tutorial, we'll use a different and easier option—Render.

2. Creating a Render Account

Render is a cloud platform that simplifies deployment. To get started:

  1. Visit render.com and click Get Started
  2. Sign up using an email or one of the supported authentication providers
  3. Once logged in, you'll see the Render dashboard. Click New > Web Service

3. Connecting to GitHub

Since N8N's code is stored in a GitHub repository, we need to connect Render to GitHub:

  1. If you don't have a GitHub account, create one at GitHub.com
  2. In GitHub, search for N8N and click on the N8N repository
  3. Click Fork to create your own copy of the N8N repository
  4. Back in Render, click GitHub and authorize Render to access your repositories
  5. Select the N8N forked repository and click Connect

While it's possible to directly use the public GitHub repository, forking ensures you can easily update your instance later.

4. Deploying N8N on Render

  1. Give your project a name (e.g., N8N)
  2. Leave the language as Node.js and the branch as Master
  3. Choose the Free Plan (or Starter Plan for $7/month if you want persistent storage)
  4. Scroll down and click Deploy Web Service
  5. Render will now build your project—this takes a few minutes

Once deployment is complete, Render will provide a URL where your N8N instance is accessible. Click on it to set up your owner account by entering your email, name, and password.

Additional Configuration

Custom Domain (Optional)

To use a custom domain instead of Render's default URL:

  1. In Render, go to Settings > Custom Domains
  2. Register and configure your preferred domain

Free Plan Limitations

While the free plan is great for testing and learning, it has a major drawback: data loss upon restart. This means:

  • If your server restarts (due to maintenance or updates), all workflows will be lost
  • The instance may take a few seconds to start after inactivity

If you want persistent storage, consider upgrading to the Starter Plan for $7/month.

Upgrading to Starter Plan

To retain workflows after restarts:

  1. In Render, click Upgrade Instance and add a payment method
  2. Select Starter Plan and save changes
  3. Go to Disks and click Add Disk
  4. Set the mount path to /opt/render/.n8n and allocate at least 1GB
  5. Click Add Disk

Next, add the following environment variables under Environment > Add Environment Variable:

N8N_EDITOR_BASE_URL=Your Render URL N8N_HOST=Your Render URL without https:// N8N_PORT=443 N8N_PROTOCOL=HTTPS N8N_USER_FOLDER=/opt/render/.n8n

Maintenance

Keeping N8N Up to Date

To update your N8N instance:

  1. Go to your forked GitHub repository
  2. If updates are available, click Sync Fork to pull the latest changes
  3. Back in Render, trigger a manual deploy to apply updates

Conclusion

Congratulations! You've successfully self-hosted N8N for free on Render. Whether you're using the free plan for testing or the starter plan for real-world automation, this setup gives you a powerful cloud-based workflow automation tool.

Want more N8N tutorials? Hit the like button and subscribe to our content for more automation insights!