This guide walks through deploying [n8n](https://n8n.io/) on Render using the official [n8n Docker image](https://hub.docker.com/r/n8nio/n8n).

Use n8n to intelligently automate sequences of tasks across a wide variety of applications: post Slack messages, trigger CI/CD pipelines, create support tickets, and much more.

## First, choose a storage method

Your n8n instance can use one of two methods to store workflow data on Render. The method you choose determines how you configure your deployment:

| Storage Method | Description |
| --- | --- |
| [**Render Postgres**](/content/docs/deploy-n8n#setup-render-postgres/index.html) (recommended) | Store workflow data in a PostgreSQL database separate from your n8n instance.<br>**We recommend this strategy for the following reasons:**<br>- You can get started for free (persistent disks require a paid service instance).<br>- You can redeploy your n8n instance with [zero downtime](/content/docs/deploys#zero-downtime-deploys/index.html) (a persistent disk prevents zero-downtime deploys).<br>- You can run multiple n8n instances that share workflow data, such as in [queue mode](https://docs.n8n.io/hosting/scaling/queue-mode/) (a persistent disk is accessible by only a single instance). |
| [**Persistent disk**](/content/docs/deploy-n8n#setup-persistent-disk/index.html) | Store workflow data in SQLite on a disk attached to your n8n instance.<br>This setup is more straightforward, because you don't need to connect your n8n instance to an external database. _However_, persistent disks require a paid service instance and prevent horizontal scaling.<br>See above for more details on why we recommend using Render Postgres instead. |

After you choose a storage method, follow the corresponding setup instructions below.

## Setup: Render Postgres

If you'll store workflow data in a Render Postgres database, your n8n deployment will consist of two Render resources:

- A [web service](/content/docs/web-services/index.html) that pulls and runs the n8n Docker image
- A [Render Postgres database](/content/docs/postgresql/index.html) that stores your n8n workflow data

**This setup uses [**free Render compute plans**](/content/docs/free/index.html).**

Free web services spin down after 15 minutes of inactivity, and free Render Postgres databases expire after 30 days.

After you get up and running with n8n, you can [upgrade your instances](/content/docs/deploy-n8n#4-upgrade-your-instances/index.html) to remove these limitations and improve performance.

### 1\. Sign up for Render

Signing up is fast and free:

[Sign up for Render](https://dashboard.render.com/register)

### 2\. Copy the example template

To simplify connecting your n8n instance to its database, we've created a template repo that enables you to deploy both resources together using a [Render Blueprint](/content/docs/infrastructure-as-code/index.html).

1. Open the [render-examples/n8n template](https://github.com/render-examples/n8n) on GitHub.
2. Click **Use this template > Create a new repository** in the top right.
3. In the form that appears, set configuration options for your new repo, then click **Create repository**.

### 3\. Create a Render Blueprint

Your newly created repo contains a `render.yaml` file that defines both your n8n web service and its database:

```yaml
# An excerpt from render.yaml
services:
  - type: web
    plan: free
    runtime: image
    name: n8n-service
    image:
      url: docker.io/n8nio/n8n:latest
    # …
```

The full file in your repo includes helpful comments describing the purpose of included fields.

By defining our two resources this way, we can configure and deploy them together using [Blueprints](/content/docs/infrastructure-as-code/index.html), Render's infrastructure-as-code model:

1. In the [Render Dashboard](https://dashboard.render.com/), click **New > Blueprint**:

2. If you haven't yet, connect your GitHub account to Render. This enables Render to fetch the `render.yaml` file from your new repo.

3. Under **Connect a repository**, click the **Connect** button for the repo you created earlier.

This opens a Blueprint creation form that lists the resources Render will create from your `render.yaml` file:

4. Provide a **Blueprint Name** and confirm that you're pulling the **Branch** you expect from your repo.

5. Click **Deploy Blueprint**.

Your Blueprint kicks off its first **sync**, which you can follow along with:

As each resource is created, a green checkmark appears next to it.

**\+ Database creation failed?**

Your workspace might already have a free Render Postgres database (each workspace is limited to one). If so, do one of the following:

- Delete your existing free database in the Render Dashboard, then retry syncing the Blueprint.
   - Update your `render.yaml` file to [use a paid compute plan](/content/docs/deploy-n8n#4-upgrade-your-instances/index.html) for the database, then push the update to your repo to trigger a new sync.

6. After both resources become available, navigate to your new web service's page in the Render Dashboard. Its `onrender.com` URL appears at the top:

Visit this URL to access your n8n instance:

You're up and running with n8n on Render! Before you get started creating workflows, we recommend the following:
- [Upgrade to paid instances](/content/docs/deploy-n8n#4-upgrade-your-instances/index.html) before your free Render Postgres database expires.
- Review the [additional configuration](/content/docs/deploy-n8n#additional-configuration/index.html) below.

### 4\. Upgrade your instances

As specified by default in `render.yaml`, both your n8n web service and Render Postgres database use [free compute plans](/content/docs/free/index.html), which have important limitations. **Most critically, your free database will expire after 30 days.**

After you're up and running with n8n, you can upgrade these services to use paid compute plans. Change the `plan` field for each service to the desired compute plan, then push your changes:

```yaml
# An excerpt from render.yaml
services:
  - type: web
    plan: 1c-2g
    # …
databases:
  - name: n8n-db
    plan: 0.1c-256mb

# Optionally increase database storage to any
  # multiple of 5 GB by setting diskSizeGB:
  # diskSizeGB: 5
```

- For n8n, we recommend running your web service on the **`1c-2g`** compute plan or larger.
  - Otherwise, n8n might encounter performance issues.
- The **`0.1c-256mb`** is the smallest paid Render Postgres compute plan and is usually sufficient for your n8n database.

See all supported `plan` values for [web services](/content/docs/blueprint-spec#plan/index.html) and [databases](/content/docs/blueprint-spec#plan-1/index.html).

## Setup: Persistent disk

If you'll store workflow data directly with your n8n instance, you create a Render [web service](/content/docs/web-services/index.html) and attach a [persistent disk](/content/docs/disks/index.html) to it.

Note that persistent disks require a paid service instance. To get started for free, you can use [Render Postgres](/content/docs/deploy-n8n#setup-render-postgres/index.html) instead.

**Why attach a persistent disk?**

By default, Render services have an [ephemeral filesystem](/content/docs/deploys#ephemeral-filesystem/index.html), which means that all changes to local files are lost whenever the instance is redeployed. A persistent disk enables you to retain filesystem changes across deploys.

### 1\. Sign up for Render

Signing up is fast and free:

[Sign up for Render](https://dashboard.render.com/register)

### 2\. Create your n8n web service

01. In the [Render Dashboard](https://dashboard.render.com/), click **New > Web Service**:

02. Under **Source Code**, click **Existing Image**:

03. Provide the following **Image URL** and click **Connect**:

```plaintext

docker.io/n8nio/n8n:latest
```

04. Provide a **Name** for your web service and specify which **Region** you'll deploy it to.

05. Select a **Compute Plan** for your web service. You can select any compute plan besides **Free** (which doesn't support persistent disks).

06. Under **Environment Variables**, add a `PORT` variable with a value of `5678`. This is the default port that n8n listens on.
    - This step isn't strictly necessary (Render can detect your service's HTTP port automatically), but it speeds up your first deploy.
07. Expand the **Advanced** dropdown at the bottom of the form and find the **Disk** section.

08. Click **Add disk**. The following fields appear:

09. Set your disk's **Mount path** to `/home/node`. By default, n8n will store its data in a `.n8n` directory under this path.
    - **Only data under the mount path is persisted across deploys!** Changes to other parts of the filesystem are lost when the service is redeployed.
    - You can store n8n data in a different directory by setting the [`N8N_USER_FOLDER` environment variable](https://docs.n8n.io/hosting/configuration/configuration-examples/user-folder/). If you do, modify your disk's mount path to match.
10. Set the disk's **Size** to 1 GB for now. You can increase this size later as needed.

11. Click **Deploy Web Service**.

12. After the deploy completes, navigate to your new web service's page in the Render Dashboard. Its `onrender.com` URL appears at the top:

Visit this URL to access your n8n instance:

You're up and running with n8n on Render! Before you get started creating workflows, we recommend reviewing the [additional configuration](/content/docs/deploy-n8n#additional-configuration/index.html) below.

## Additional configuration

Complete the following steps as needed after you complete the initial setup of your n8n instance.

### Set your webhook URL

If any of your n8n workflows will listen for incoming webhook notifications, you need to set the root URL for all webhook endpoints by adding an [environment variable](/content/docs/configure-environment-variables/index.html) to your web service:

1. From your n8n web service's page in the [Render Dashboard](https://dashboard.render.com/), click **Environment** in the left pane.
   - If you're using Render Postgres, here you'll see all of the existing environment variables that were added as part of the Blueprint deployment (`DB_POSTGRESDB_DATABASE`, `DB_POSTGRESDB_PASSWORD`, and so on).
2. Under **Environment Variables**, click **Edit**, then **Add > New variable**.

3. Set the new variable's **Key** to `WEBHOOK_URL`.

4. Set the variable's **Value** to the service's `onrender.com` URL (e.g., `https://n8n-service-q975.onrender.com/`).

5. Click **Save and deploy**.
