Background Gradient for Hero Section

Deploying n8n on Render (With Auto-Restart and Persistent Storage)

When I first tried deploying n8n in the cloud, Render stood out as one of the most developer-friendly platforms out there with easy Docker support, auto HTTPS, simple disk provisioning, and a clean interface. But the real challenge was setting up n8n properly so workflows actually persist and survive restarts.

So if you’re tired of setting up n8n, only to find everything wiped out after a reboot or deployment then this guide is for you. I’ll walk you through exactly how I deploy n8n on Render with:

  • Auto-restart support
  • Persistent storage (so workflows don’t vanish)
  • Basic auth for protection
  • A clear YAML setup you can reuse

Let’s dive into this article.

Why use Render for hosting n8n?

What is Render?

There are dozens of ways to self-host n8n from VPS and Docker Compose to Kubernetes and DigitalOcean Droplets. But if you’re looking for something that just works, without needing to configure every last line of NGINX or Docker networking, Render hits a sweet spot.

Here’s why I personally think Render is one of the best options for solo developers, automation tinkerers, and even small teams who want to take n8n to the cloud:

1. Dead-Simple Deployment Workflow

With Render, you can go from a GitHub repo to a live n8n instance in just a few clicks. Their infrastructure-as-code support with render.yaml lets you automate the full deployment process.

  • No SSH logins.
  • No server patching.
  • No forgetting to restart services.

It’s CI/CD for people who want speed without the sysadmin overhead.

2. Built-In Persistent Disk Support

One of the biggest issues people run into when self-hosting n8n is losing workflows after restarts. That’s because n8n stores everything (by default) in local SQLite files and if you don’t persist that volume, it’s gone.

Render gives you a super simple way to attach a disk to your service. You can literally just define the mount path in render.yaml, and it works. No Docker volumes or bind mounts needed.

This means:

  • Your workflows persist
  • Your credentials are safe
  • You don’t have to mess with external storage unless you want to

3. Free SSL, Domains, and Auto-Restart

The minute you deploy on Render, your app is:

  • Live on HTTPS with a Render subdomain
  • Secure by default
  • Monitored for downtime
  • Restarted automatically if anything crashes

No Certbot. No reverse proxy configs. No cronjobs to reboot your app.

Render handles all of this for you behind the scenes.

4. Free PostgreSQL Add-on (For Production-Grade Hosting)

If you’re planning to scale, SQLite won’t cut it. Render provides a free managed Postgres instance that integrates beautifully with Docker-based deployments.

This means you can host a full n8n + Postgres stack entirely on Render using the free tier for testing and light usage, and upgrading as your automations grow.

5. Clean Developer Experience

From their dashboard UX to their logging tools, Render feels like a platform built for developers. It’s fast, intuitive, and transparent.

Compared to platforms that are either too abstract (like Heroku) or too manual (like raw VPS), Render sits right in the middle. It’s one of the rare tools that doesn’t get in your way.

6. Perfect for Automation Builders

If you’re working with n8n, chances are you’re building things like:

  • Notification workflows
  • Scheduled tasks
  • API automations
  • Webhooks from WordPress or Stripe

Render gives you everything you need to host this reliably without worrying about ops, downtime, or filesystem headaches.

Prerequisites

Here’s what you’ll need:

  • Render account
  • GitHub repository (we’ll deploy from here)
  • Dockerfile and render.yaml
  • Basic understanding of n8n and environment variables

👉 If you haven’t setup n8n locally yet, I recommend reading my article: How to Install n8n Locally

Option 1: Deploy n8n Using Persistent Disk (SQLite)

This is by far the simplest and fastest way to deploy n8n on Render. It uses SQLite, the default database that comes baked into n8n, along with a Render-managed persistent disk to ensure your workflows don’t vanish every time you redeploy or restart the service.

This option is perfect if:

  • You’re just getting started with n8n
  • You want a low-maintenance setup
  • You’re running solo workflows
  • You don’t need team-level concurrency or horizontal scaling yet

Let’s walk through the process from start to finish.

Step 1: Set Up Your GitHub Repo

You’ll need a repository with two files:

Dockerfile

This defines what Render will run. Here’s the basic version:

FROM n8nio/n8n:latest

# Optional: Enable basic authentication
ENV N8N_BASIC_AUTH_ACTIVE=true
ENV N8N_BASIC_AUTH_USER=admin
ENV N8N_BASIC_AUTH_PASSWORD=supersecurepassword

💡 Pro Tip: Keep sensitive values (like passwords) out of the Dockerfile and instead define them as environment variables in the Render dashboard.

render.yaml

This is where the magic happens. Render uses this file to understand how to provision your app.

services:
- type: web
name: n8n
env: docker
plan: starter
autoDeploy: true
healthCheckPath: /
disk:
name: n8n-data
mountPath: /home/node/.n8n
sizeGB: 1

Let’s break it down:

  • type: web – You’re deploying a web-accessible service
  • env: docker – This uses your Dockerfile
  • plan: starter – This needs to be a paid plan to use persistent disks
  • disk section – This is what saves your workflows between deploys.
    • The mountPath MUST be /home/node/.n8n – this is where n8n expects to find its SQLite database, credential store, and workflow files.

If you get this path wrong, your instance will reset on every deploy. Trust me, I learned this the hard way.

Step 2: Deploy on Render

  1. Push your code (Dockerfile + render.yaml) to GitHub
  2. Go to Render.com
  3. Click “New +” → “Web Service”
  4. Connect your GitHub account and select the repo
  5. In the setup screen:
    • Set the name (e.g., n8n)
    • Choose “Docker” for environment
    • Pick the Starter Plan or higher (you need this for disk support)
  6. Click “Add Disk”
    • Name it something like n8n-data
    • Mount path: /home/node/.n8n
    • Size: 1GB is fine for most users

Step 3: Add Environment Variables

In the Render dashboard (under “Environment”), set:

KeyValue
N8N_BASIC_AUTH_ACTIVEtrue
N8N_BASIC_AUTH_USERadmin
N8N_BASIC_AUTH_PASSWORDyour strong password
GENERIC_TIMEZONE(Optional) e.g., Asia/Kolkata
WEBHOOK_TUNNEL_URL(Optional) Useful for webhooks
N8N_HOST(Optional) Only if setting a custom domain

Environment variables are safer than hardcoding values in your Dockerfile and can be updated without triggering redeploys.

Step 4: Deploy & Verify Persistence

Once deployed, open your live Render URL (e.g. https://n8n-yourname.onrender.com) and log in using the credentials you set.

Try this test:

  1. Create a new dummy workflow
  2. Add a webhook trigger and a response node
  3. Deploy the workflow
  4. Restart your Render service
  5. Return to the UI and check if your workflow is still there

If yes, your persistent disk is configured correctly or if not, double-check your mountPath

Limitations to Keep in Mind

  • SQLite doesn’t scale well for heavy loads or team collaboration
  • 1GB disk can fill up fast if you store lots of files or logs
  • You’ll need to manually back up your .n8n directory (unless you switch to Postgres)

If you plan to run production-grade automations, I recommend eventually switching to Render’s Postgres-backed setup.

Option 2: Deploy n8n With Postgres on Render

If you’re planning to use n8n in production, collaborate with a team, or simply want peace of mind with better performance and scale using PostgreSQL instead of the default SQLite backend is a no-brainer.

This approach gives you:

  • Data persistence across deployments and restarts
  • Stronger performance under load
  • Proper backup and replication support
  • Scalability if your workflows or team grow

Let’s walk through how to set it up, step by step, using Render’s free Postgres service and a custom render.yaml.

Why Postgres?

n8n uses SQLite by default, which is great for getting started but has real limitations:

SQLitePostgreSQL
File-basedNetworked and multi-user
Hard to scaleBuilt for scaling
No native backup strategyBuilt-in backups on Render
Shared by the appCan be used across multiple containers or teams

In short: if you’re serious about automation, go Postgres from day one.

Step-by-Step Setup Instructions

I will help you through with step by step instructions to deploy n8n with postgres on render:

Step 1: Create a GitHub Repo with Dockerfile & render.yaml

Dockerfile

This can be minimal, as n8n’s official image works out-of-the-box.

FROM n8nio/n8n:latest

render.yaml: With PostgreSQL Integration

Here’s a full example that:

  • Provisions the n8n service
  • Links it to a new Postgres database
  • Injects all required environment variables automatically
services:
- type: web
name: n8n-service
env: docker
plan: starter
autoDeploy: true
healthCheckPath: /
envVars:
- key: DB_TYPE
value: postgresdb
- key: DB_POSTGRESDB_DATABASE
value: n8n
- key: DB_POSTGRESDB_SCHEMA
value: public
- key: N8N_BASIC_AUTH_ACTIVE
value: "true"
- key: N8N_BASIC_AUTH_USER
value: admin
- key: N8N_BASIC_AUTH_PASSWORD
value: supersecurepassword
- key: DB_POSTGRESDB_HOST
fromService:
type: postgres
name: n8n-db
property: host
- key: DB_POSTGRESDB_PORT
fromService:
type: postgres
name: n8n-db
property: port
- key: DB_POSTGRESDB_USER
fromService:
type: postgres
name: n8n-db
property: user
- key: DB_POSTGRESDB_PASSWORD
fromService:
type: postgres
name: n8n-db
property: password
- type: postgres
name: n8n-db
plan: free
databaseName: n8n

Step 2: Deploy on Render

  1. Push this repo to GitHub
  2. Go to Render.com
  3. Click New → Blueprint Deploy
  4. Select your repo and let Render detect the render.yaml

Render will:

  • Provision both the n8n web service and the database
  • Inject all DB credentials automatically
  • Handle auto-restarts, HTTPS, and scaling

Step 3: Add Additional Environment Variables (Optional)

You can improve production reliability with a few extras:

KeyPurpose
N8N_EDITOR_BASE_URLUsed for links in email triggers, workflows
WEBHOOK_URLImportant if you’re using webhooks from outside
N8N_HOSTSet this if using a custom domain
GENERIC_TIMEZONEEnsures workflows run in your local time

Step 4: Test That Workflows Persist

  1. Create a new test workflow
  2. Add a webhook + response node
  3. Save + deploy
  4. Restart the service
  5. Check if workflow is still there

Postgres stores all your workflows, executions, credentials, settings and keeps them safe across deploys, restarts, or scaling.

Backups

Render automatically backs up their managed Postgres databases.
You can access backups or restore from the “Databases” → “Backups” section inside the Render Dashboard.

Security Tips

  • Always use basic auth for your instance
  • Set a strong password using N8N_BASIC_AUTH_PASSWORD
  • Restrict usage to your domain via custom headers (optional advanced tip)

Frequently Asked Questions

Do I need a paid Render plan to use persistent storage with n8n?

Yes. Persistent disks are only available on the Starter plan and above. The free plan does not support disks, so you’ll lose your workflows on every redeploy or crash if using SQLite without disk storage.

Can I deploy n8n on Render using only the free plan?

Yes, but with limitations. If you deploy with PostgreSQL as the backend instead of SQLite, you can use Render’s free Postgres plan along with a free web service plan. Just don’t use the persistent disk method on the free plan, it won’t retain data.

How do I know if my n8n instance is using persistent storage correctly?

Create a test workflow after deployment. Then restart the service manually from Render dashboard. If your workflow is still there after the restart, persistent storage is working as expected. If not, check your mountPath, it must be /home/node/.n8n.

Which is better for long-term usage: SQLite or Postgres?

PostgreSQL is better for scaling and reliability. SQLite is file-based and fine for small personal setups. But for real workflows, multiple users, or backup needs, Postgres is the way to go. Render’s Postgres service integrates easily and works great even on the free tier.

Can I set up auto-deploy on code push to GitHub?

Yes. If your service is connected to a GitHub repo, Render can automatically redeploy whenever you push new code. You can configure this in your Render dashboard under the Auto Deploy setting.

What happens if n8n crashes or times out?

Render automatically detects failures and restarts the container. You don’t need to manually intervene. You can also set up health checks and use tools like UptimeRobot or BetterUptime to monitor your n8n instance.

Can I use a custom domain with Render?

Yes. Render supports custom domains with free SSL certificates via Let’s Encrypt. You can configure it under your Web Service → Settings → Custom Domains.

Final Thoughts

Deploying n8n on Render is one of the easiest ways to go live with your automations, especially with their built-in persistent disks or Postgres support.

If you’re starting small, persistent disk will work just fine and If you’re planning bigger, set it up with Postgres from the start.

And if you get stuck or want help customizing your n8n workflows, feel free to reach out, I’m happy to help.

Mehul Gohil
Mehul Gohil

Mehul Gohil is a Full Stack WordPress developer and an active member of the local WordPress community. For the last 13+ years, he has been developing custom WordPress plugins, custom WordPress themes, third-party API integrations, performance optimization, and custom WordPress websites tailored to the client's business needs and goals.

Articles: 164

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Mehul Gohil

Subscribe now to keep reading and get access to the full archive.

Continue reading