Skip to content
SelfHostBR, home page
Guide

How to install n8n on Easypanel (with PostgreSQL)

Install n8n with PostgreSQL through Easypanel on a VPS: the template, the image version, your own domain and the memory it uses.

MMarlon Published on 5 min read
On this page

Short answer: with a control panel, n8n comes up in a few clicks. In Easypanel, create a project, open Templates, choose n8n and click Create: it sets up n8n, PostgreSQL and the code runner for you. Then check the image version and the domain before using it in production.

If you prefer to control every line of the file, the route is n8n with Docker Compose and HTTPS. A panel is worth it when you want an interface for logs, domains, variables and updates, and plan to run other services on the same VPS. For another panel-based option, see n8n with Coolify.

What you need

A clean Linux VPS with root access and ports 80 and 443 free. Install Easypanel before anything else: it takes over the machine’s reverse proxy (Traefik) and runs on top of Docker Swarm. The free plan allows up to 3 projects, which is plenty for n8n.

Install Easypanel

On the VPS, as root, install Docker and then Easypanel (docs):

curl -sSL https://get.docker.com | sh
docker run --rm -it \
  -v /etc/easypanel:/etc/easypanel \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  easypanel/easypanel setup

When it finishes, the installer prints the panel address, http://YOUR-VPS-IP:3000. Open it, create the administrator user and, on first access, turn on the panel’s domain under Settings so that port 3000 isn’t left exposed without HTTPS.

Create the project and n8n from the template

  1. In the panel, click Create Project and give it a name, such as automations.
  2. Inside the project, open Templates, search for n8n and click it.
  3. The form has three fields: service name, n8n image and runner image. Click Create.

The template creates three services: n8n, n8n-db (PostgreSQL) and n8n-runner, which runs the Code nodes in a separate process. It already fills in the database password, the N8N_ENCRYPTION_KEY and the runner token. The first start takes a few minutes while the images download.

Update the image version

The template may ship an older n8n version than the latest stable. Check the current version in the n8n releases and on the minimum safe version page, and then:

  1. Open the n8n → Source service, change the image to docker.n8n.io/n8nio/n8n:<version>, click Save and then Deploy.
  2. Do the same on n8n-runner, with n8nio/runners:<same version>.
n8n and the runner must be on the same version. Always update both together. Before every update, take an n8n backup, especially of the encryption key, which lives under Environment.

When the new version starts, n8n runs the database migrations by itself and your workflows stay in place.

Set up your domain

The template already publishes n8n on a free *.easypanel.host subdomain, with HTTPS. To use your own:

  1. In your DNS, create an A record for n8n.yourdomain.com pointing to the VPS IP.
  2. Under n8n → Domains, click Add Domain, enter the domain in Host and change the destination port from 80 to 5678.
  3. In the domain list, click the star on the new domain, confirm with Make Primary and Deploy.

Step 3 is the one people forget most: under Environment, the template sets N8N_HOST and WEBHOOK_URL from the primary domain ($(PRIMARY_DOMAIN)). If the new domain doesn’t become the primary one, the webhook URLs shown in the editor keep pointing at the Easypanel subdomain. If the log warns that WEBHOOK_URL is deprecated (from n8n 2.35), rename the variable to N8N_WEBHOOK_URL, keeping the same value.

Open the domain in your browser and create the owner account (email, name and password) on the Set up owner account screen.

How much memory n8n uses

In the panel, the n8n service sits around 370 to 490 MB of memory with the editor open and no workflows running. Add PostgreSQL, the runner, Easypanel itself and Traefik: a 2 GB VPS works for light use, and with 4 GB you have room to grow and to run other services.

After installing

Frequently asked questions

Does the n8n template on Easypanel use PostgreSQL?

Yes. It creates three services: n8n, n8n-db (PostgreSQL) and n8n-runner, which runs the Code nodes.

How do I change the n8n domain on Easypanel?

Create the A record in DNS, add the domain under Domains with destination port 5678, mark the new domain as primary (Make Primary) and Deploy. The template uses the primary domain to set N8N_HOST and WEBHOOK_URL.

How much memory does n8n use on Easypanel?

The n8n service sits around 370 to 490 MB when idle. Adding PostgreSQL, the runner, Easypanel and Traefik, a 2 GB VPS covers light use and 4 GB leaves room to grow.

M

Written by

Marlon

I like automation and write here what I learn building automations with n8n. Spotted a mistake or an outdated detail? Let me know.

Keep reading