Self-host n8n on your own server: domain, workflows and backups

Deploy n8n from Zenavo's template, set up HTTPS, the webhook URL and your timezone, run your first workflow, and back up your encryption key and volume.

This post is also available in 简体中文, 繁體中文, 日本語, Español and Bahasa Indonesia.

Sending form submissions to a spreadsheet, summarizing messages on a schedule, or calling an API when a webhook arrives — repetitive tasks like these are what n8n is built for. Self-hosting removes per-execution limits and keeps your workflows and credentials on a server you control.

This guide uses Zenavo's n8n template to go from deployment, domain and webhook setup all the way to backups and upgrades. Your server, Zenavo and any third-party APIs your workflows call are billed separately.

Deploy n8n

First connect a Linux server to Zenavo, then open the n8n template, choose the server and deploy.

The template currently sets:

Setting Value or purpose
Image n8nio/n8n:latest
HTTP port 5678
Volume /home/node/.n8n: the default SQLite database, workflows and credentials live here
N8N_ENCRYPTION_KEY Generated when the project is created; encrypts saved credentials
GENERIC_TIMEZONE UTC by default; change it to your timezone below
N8N_DIAGNOSTICS_ENABLED false, turns off telemetry

latest tracks upstream releases. For long-term use, go to the n8n service's Settings → Source and pin the image tag to a version you've tested (such as n8nio/n8n:1.82.0) so a redeploy doesn't unexpectedly jump versions.

Bind a domain, set the webhook URL and timezone

On the n8n service's Networking tab, bind a domain such as n8n.example.com to port 5678, add a DNS A record pointing to the server, and wait for HTTPS. See Domains for the steps.

Then open the Variable tab on the n8n service and add your domain and timezone settings:

N8N_HOST=n8n.example.com
N8N_PROTOCOL=https
N8N_EDITOR_BASE_URL=https://n8n.example.com/
WEBHOOK_URL=https://n8n.example.com/
N8N_PROXY_HOPS=1
GENERIC_TIMEZONE=America/New_York
TZ=America/New_York

A few notes:

  • WEBHOOK_URL controls the public URL that Webhook nodes generate; without it, nodes show the container's internal address http://localhost:5678.
  • N8N_PROXY_HOPS=1 matches the single reverse-proxy hop through Zenavo's gateway. If you also put a CDN proxy such as Cloudflare in front of the domain, adjust the hop count to match.
  • GENERIC_TIMEZONE sets the default timezone for Schedule Trigger nodes (use your own IANA timezone, such as Europe/London or Asia/Tokyo).

Save and restart the service, then open https://n8n.example.com and create the owner account. If you change the domain later, update the URL variables above as well.

Run your first workflow and webhook

Once in the editor, create a small workflow to confirm execution works:

  1. Create a new workflow and add a Manual Trigger.
  2. Add an Edit Fields (Set) node, add a string field message with the value Hello from n8n.
  3. Click Test workflow, confirm the message appears in the output on the right, and save.

Next, test that external requests reach a Webhook node:

  1. Add a Webhook node with HTTP Method set to GET.
  2. Click Listen for test event, open the Test URL shown in the node in your browser, and confirm the editor receives the request right away.
  3. When connecting a real third-party service (such as GitHub, Stripe or Slack), switch to the Production URL and flip the Active toggle in the top-right corner of the workflow. The Test URL only works while the editor is actively listening.

Keep N8N_ENCRYPTION_KEY safe

Every API key, database password and OAuth token you save in n8n is encrypted with N8N_ENCRYPTION_KEY before being stored in the database.

Open the n8n service's Variable tab and copy N8N_ENCRYPTION_KEY into your password manager. Do not change it after deploying. If you ever restore a backup into a new project or onto a new server, you must set the exact same N8N_ENCRYPTION_KEY, or n8n won't be able to decrypt your saved credentials.

Exporting a workflow as JSON from the editor only saves its nodes and connections — not your credentials or execution history — so it doesn't replace a full backup.

Back up and upgrade

All of n8n's data lives in the /home/node/.n8n volume. Back it up from the n8n service's Backup & Restore tab:

  1. Pick a quiet window when no critical workflows are running and stop the project (volume backups require the project to be stopped).
  2. Create the volume backup, then start the project again.
  3. Download a copy of the backup to keep alongside your N8N_ENCRYPTION_KEY.

See Backups for details. If you restore a backup into a test project to verify it, remember that active workflows will resume their schedules on startup — disable triggers or isolate the test instance first so it doesn't send duplicate notifications.

Before upgrading, read n8n's release notes, back up the volume first, and then change the image version under Settings → Source. An upgrade may migrate the database schema, so switching the image tag back to an older version isn't guaranteed to work; restore the pre-upgrade backup instead.

FAQ

The Webhook node still shows localhost:5678? Check that WEBHOOK_URL=https://your-domain/ is set on the Variable tab, and restart the n8n service after saving.

A third-party service gets 404 when calling my webhook? Make sure it's calling the Production URL (/webhook/... rather than /webhook-test/...) and that the workflow's Active toggle in the top right is turned on.

Scheduled workflows aren't firing at the time I expect? Check that GENERIC_TIMEZONE and TZ are set to your timezone in Variable, and check whether the workflow itself overrides the timezone under Settings → Timezone.

How big a server do I need? Light everyday workflows use very little memory, and a 1 vCPU / 2 GB server is enough to start. If your workflows process large files, big JSON arrays in memory, or many concurrent executions, use a server with 2 vCPU / 4 GB or more.

Start from the n8n template: bind your domain, set WEBHOOK_URL and your timezone, save N8N_ENCRYPTION_KEY somewhere safe, and take your first volume backup.