---
title: Self-host n8n on Coolify
description: >-
  Deploy n8n on a Coolify server using the one-click service. Covers domains and
  SSL, the host and webhook URL variables, owner setup, persistence, and
  backups.
date: '2026-08-24'
lastUpdated: '2026-08-24'
keywords:
  - self host n8n coolify
  - n8n coolify
  - host n8n canada
  - self-hosted n8n
  - n8n webhook url
  - coolify one-click service
  - n8n docker deployment
  - managed coolify hosting
type: article
author: Ross Hill
locale: en_CA
site_name: MapleDeploy
slogan: Powerful hosting on Canadian soil
organization_url: 'https://mapledeploy.ca/'
logo: 'https://mapledeploy.ca//api/logo/lockup'
creator: MapleDeploy
publisher: MapleDeploy
founding_date: '2026-01-13'
email: hello@mapledeploy.ca
geo_region: CA-ON
geo_placename: Toronto
address_country: CA
area_served: Canada
application_category: DeveloperApplication
app_url: 'https://app.mapledeploy.ca'
llms_txt: 'https://mapledeploy.ca/llms.txt'
offers: >-
  Starter $45/mo, Pro $95/mo, Ultra $195/mo, Ultra 32 $395/mo, Ultra 64 $695/mo
  CAD
in_language: en-CA
canonical_url: 'https://mapledeploy.ca/blog/self-host-n8n-coolify'
---

n8n is a workflow automation tool. You wire together HTTP calls, database queries, API integrations, and scripts, then run them on a schedule or a trigger. It competes with Zapier and Make, with one difference that matters: you can run it on your own server.

That is worth thinking about before you commit. Every workflow you build holds credentials for the services it touches: your CRM, your database, your email provider, your Git host. Every execution logs input and output data. On a hosted automation platform, all of that sits on someone else's infrastructure, on their schedule, under their jurisdiction.

This post covers deploying n8n on [Coolify](https://coolify.io) using its one-click service catalog. If you have never deployed anything on Coolify before, start with our [Coolify deployment guide](/blog/deploy-app-coolify-guide) and come back.

## Why self-host it

Three reasons, in rough order of how often they come up.

**Your data stays where you put it.** Workflow definitions, connected-service credentials, and execution history all live in your n8n instance's storage. Nothing about a workflow run leaves your server unless the workflow itself sends it somewhere.

**No per-execution pricing.** n8n Cloud bills against a monthly execution allowance per plan. That model is fine when volume is predictable, and awkward when it is not. A workflow that polls every minute burns through an allowance quickly. Self-hosted, your cost is the server, and the server does not care whether you run 500 executions or 500,000.

**You control the version and the environment.** You decide when to upgrade, what environment variables to set, and what extra dependencies to install.

One note on licensing: n8n is source-available under the **Sustainable Use License**, which n8n itself describes as fair-code rather than OSI open source. The license covers use for your own internal business purposes, plus personal and non-commercial use. Self-hosting your own workflows falls inside that. Providing n8n to others commercially does not, whether you resell it as a hosted service or build its functionality into a product you sell. That needs a separate agreement with n8n. Read the license before you plan around it.

## Step 1: create the service

n8n is in Coolify's one-click service catalog, and Coolify maintains a dedicated docs page for it. That is the path this tutorial uses, because the template already sets the image, the networking, and the environment variables the container needs.

In your project, add a new resource and choose Service, then search the catalog for n8n. Coolify offers several variants:

- **n8n** on its own, which uses SQLite for storage
- **n8n with PostgreSQL**, which adds a database container
- **n8n with PostgreSQL and worker**, which adds a separate worker container and a Redis instance so executions run through a queue outside the main process

The worker variant runs the most containers and is the one built for queue-based execution. If you are not sure which you need, the plain or PostgreSQL variants are simpler to reason about, and the catalog templates are just compose files you can edit later.

## Step 2: set the domain so SSL is issued

Before you deploy, assign the service a domain. Coolify's proxy handles TLS with Let's Encrypt automatically once a domain is set and DNS resolves to your server.

1. Create an A record for the subdomain you want, for example `n8n.example.com`, pointing at your server's IP address.
2. In the service configuration, set that domain on the n8n container.
3. Deploy.

This step is not cosmetic. n8n needs to know its own public address, and in a Coolify service the domain you assign is what feeds the variables that tell it.

## Step 3: check the host and webhook variables

Coolify generates domain variables from the FQDN you assign. Two of them matter here:

- `SERVICE_FQDN_N8N` is the hostname only, for example `n8n.example.com`
- `SERVICE_URL_N8N` is the full URL including the protocol, for example `https://n8n.example.com`

The n8n service template wires those into the variables n8n reads, including `N8N_HOST`, `N8N_PROTOCOL`, `N8N_EDITOR_BASE_URL`, and the webhook URL. Open the service's environment variables tab after you assign the domain and confirm the values look right.

Pay attention to the difference between the two. A reported bug in the Coolify n8n template had it filling the editor base URL and webhook URL from the hostname-only variable. That breaks OAuth callbacks on n8n 2.0 and later, because those URLs need the `https://` prefix.

The fix is to point both at the full-URL variable instead. Newer versions of the template may already do this, so read your own values before you connect a Google, Microsoft, or LinkedIn credential, not after.

## Step 4: create the owner account immediately

On first launch, n8n shows a setup screen and the first account created becomes the instance owner. n8n's docs specify a minimum of eight characters with at least one number and one capital letter.

Do this the moment the deploy finishes. Until the setup is complete, anyone who can reach the instance can claim ownership of it. A public domain with a valid certificate is reachable by definition.

## How webhooks actually resolve

n8n builds its webhook URLs from `N8N_PROTOCOL`, `N8N_HOST`, and `N8N_PORT`. Behind a reverse proxy, which is exactly what a Coolify service is, that calculation produces the internal address rather than your public one. n8n's docs cover this case directly: set the webhook URL explicitly so n8n displays the correct URL in the editor and registers the correct URL with external services.

n8n's docs also note that `N8N_WEBHOOK_URL` replaces the older `WEBHOOK_URL`, and that the old name logs a deprecation warning. Templates in the wild still use the old name, so check which one your version expects.

The symptom of getting this wrong is specific and confusing: the workflow fires from the test URL in the editor, and the production webhook never arrives. That is because the URL you handed to the external service points somewhere it cannot reach.

## Persistence, the encryption key, and updates

Coolify services keep their data in Docker volumes, so stopping and starting a service does not wipe it. For n8n that means the data directory, and for the PostgreSQL variants the database volume as well.

One thing to guard carefully. n8n generates a random encryption key on first launch, stores it in its `.n8n` data directory, and uses it to encrypt credentials before they are written to the database. Restore a database without that key and the credentials in it cannot be decrypted.

You can set `N8N_ENCRYPTION_KEY` yourself instead of letting n8n generate one. That makes the key something you manage deliberately rather than something buried in a volume.

To update, use the option in the service's UI to pull the latest images and restart. Pin a version tag in the compose file if you would rather control exactly when the version changes.

## Backups

Coolify has scheduled database backups built in. On a database resource you set a cron schedule, a retention count, and an S3-compatible destination, and Coolify runs the dump for you. If you are on the PostgreSQL variant of the n8n service, that covers your workflows and execution history.

Back up the encryption key and the n8n data volume separately. A database dump alone is not a complete restore.

See our [backup guide](/docs/backups) for how this works on a MapleDeploy server and what we handle at the VM level.

## The Canadian angle

Automation workflows tend to accumulate business data without anyone deciding that they should. A workflow that syncs orders holds customer records. A workflow that files support tickets holds whatever customers wrote. The credentials sitting in the instance often reach further than the workflows themselves.

So decide deliberately what a workflow is allowed to touch. Our [acceptable use policy](/legal/aup) and terms rule some categories out entirely, including health and medical information, payment card data, and government-issued or financial account identifiers. n8n logs the input and output of every execution, so a workflow that only passes that data through still ends up storing it.

MapleDeploy runs [managed Coolify](/open-source-stack) on dedicated VMs in Toronto. When you deploy n8n as a service on that server, the whole instance runs there: the container, the database, the execution history, and the encrypted credentials. No US intermediary, and no CLOUD Act exposure for your server and its data. See [Canadian hosting](/canadian-hosting) for the jurisdiction details.

Each server is a dedicated VM, not shared infrastructure. Starter is 4 GB RAM and 2 vCPUs at $45 CAD/month, and you can deploy n8n alongside your other applications on the same Coolify instance. Which plan fits depends on how much you run.

{% cta-section title="Run n8n on Canadian infrastructure" %}
30-day free trial on Starter and Pro. Deploy n8n from the Coolify service catalog on a dedicated VM in Toronto.
{% /cta-section %}
