---
title: "n8n template"
description: "Workflow automation with its own PostgreSQL database."
path: "/templates/n8n/"
---

# n8n

Workflow automation with its own PostgreSQL database.

One command creates the n8n app and a PostgreSQL database, then connects them. Workflow files stay on a disk. The app gets a public address.

## Install

Run it in the environment you want. The command waits until the public address responds.

```
dflow templates:install n8n
```

One app, one PostgreSQL database, and a disk.

## Application

- Name: n8n
- Image: n8nio/n8n:2.48.7
- Port: 5678
- Replicas: 1
- Memory: 512 Mi
- Disk: 1Gi at /home/node/.n8n
- Address: Public route

## Database

- Name: n8n-db
- Engine: PostgreSQL
- Database: n8n
- Storage: 1Gi

## How they connect

- The Postgres host, port, user, password, and database name come from n8n-db.
- dFlow generates N8N_ENCRYPTION_KEY.