# Self-hosting n8n for marketing teams: run it well

> Run self-hosted n8n safely: Docker Compose, timezone, webhook URL, execution data, backups, upgrades and a runbook. Plus when Cloud is better.

Source: https://mentionx.ai/learn/n8n/n8n-self-hosting-operations  
Author: Dipuck Jones, founder of MentionX  
Updated: 4 November 2026  
Level: Practitioner

**Self-hosting n8n gives you control and no licence fee for the Community Edition, but someone must run it: hosting, HTTPS, timezone, backups, upgrades and monitoring. This lesson is the operations checklist, so you can decide honestly whether to self-host or stay on Cloud.**

> **Key takeaways**
>
> - Use Docker Compose and Postgres for a durable setup.
> - Set timezone, webhook URL and execution data saving.
> - Back up the database and the encryption key, and test a restore.
> - Upgrade on a copy first; keep a runbook.

*Checked 4 November 2026 (CET) against n8n documentation and the n8n pricing page. n8n ships updates often and node options, plan limits and prices change, so confirm in your own instance and on the pricing page. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.*

## Should a marketing team self-host?

Lesson 2 compared the options. In short: self-host when you need data control, custom nodes or very high volume and have technical help. Otherwise, Cloud saves operations time. The n8n docs on choosing how to use n8n say the same in more detail.

## A sensible setup

The n8n docs provide Docker and Docker Compose installs. For a team setup:

- **Docker Compose** with n8n, Postgres and a reverse proxy for HTTPS.
- **A domain** like n8n.yourcompany.com, so webhooks, Slack interactivity and MCP work.
- **Postgres** rather than the default SQLite when volume grows.
- **Queue mode** for heavy loads, if needed later.

If you put n8n behind nginx and use the MCP Server Trigger, the MCP docs note you need to turn off proxy buffering for that endpoint.

## Timezone and schedules

The Schedule Trigger uses the workflow timezone, then the instance timezone. On self-hosted instances the default is America/New_York. A Berlin team that forgets this gets reports six hours late. Set both the instance timezone and each workflow's timezone.

## Backups and the encryption key

Back up:

- The database (workflows, credentials, executions).
- The encryption key used for credentials. Without it, stored credentials can't be decrypted.
- Workflow JSON exports, as an extra safety copy.

Test a restore at least once. A backup you've never restored is a hope, not a backup.

## Upgrades

n8n releases often. Pin a version, read release notes for breaking changes, upgrade a copy, run key workflows, then upgrade production. Plan time for major versions, which can remove deprecated nodes or behaviour.

*Our view:* if nobody on the team wants to own upgrades and backups, use Cloud. Self-hosting fails slowly when it's nobody's job.

> **Pro move:** run the error workflow and heartbeat from lesson 16 on the instance, plus external uptime monitoring. An instance that's down can't alert you about itself.

## Where to go next

You now have the building blocks: triggers, data, AI nodes, agents, approvals, monitoring, reporting, MCP, reliability, governance, costs and operations. Pick one workflow from this track, ship it with an owner and an error workflow, and add the next one when it's stable. The [n8n for Marketers hub](https://mentionx.ai/learn/n8n/n8n-for-marketers) lists every lesson.

## Self-hosted settings marketers notice

| Setting | Why it matters |
|---|---|
| Timezone (`GENERIC_TIMEZONE`) | Schedules run in this zone unless the workflow sets its own; the default is America/New_York |
| Webhook URL (`WEBHOOK_URL`) | Forms, Slack interactivity and MCP need the public HTTPS address |
| Execution data saving | Controls database growth and debugging ability |
| Pruning (`EXECUTIONS_DATA_MAX_AGE`) | On by default; 336 hours |
| Encryption key | Needed to decrypt credentials; back it up |

## Execution data variables

According to the n8n docs, you can choose what to save with `EXECUTIONS_DATA_SAVE_ON_ERROR`, `EXECUTIONS_DATA_SAVE_ON_SUCCESS`, `EXECUTIONS_DATA_SAVE_ON_PROGRESS` and `EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS`. A common setup saves all errors, fewer successes, and no per-node progress.

## Search Console and other Google APIs

Self-hosting needs your own Google OAuth client for Google nodes. Enable each API you use (Analytics Data, Google Ads, Search Console). the [Search Console for Marketers track](https://mentionx.ai/learn/search-console/search-console-for-marketers) covers the Search Console side.

## A runbook template

| Section | Contents |
|---|---|
| Hosting | Provider, server, domain, who has access |
| Configuration | Where environment variables live; timezone; webhook URL |
| Backups | What, how often, where, last restore test date |
| Upgrades | Version pinned, owner, schedule, test steps |
| Monitoring | Uptime check, error workflow, heartbeat |
| Incidents | Kill switch, contacts, steps |

## Upgrade test list

After each upgrade on a copy, run:

- One schedule-triggered workflow.
- One webhook or form workflow.
- One Slack approval flow.
- One AI workflow with structured output.
- The error workflow, by causing a failure.
- The MCP Server Trigger, if you use it.

If all pass, upgrade production and watch executions for a day.

## A Docker Compose outline

The n8n docs provide a full Docker Compose setup. The shape, simplified:

```yaml
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
      - WEBHOOK_URL=https://n8n.example.com/
      - EXECUTIONS_DATA_SAVE_ON_SUCCESS=none
      - EXECUTIONS_DATA_SAVE_ON_ERROR=all
    volumes:
      - n8n_data:/home/node/.n8n
volumes:
  n8n_data:
```

Use the official docs file as your starting point, not this outline. It adds the reverse proxy and HTTPS, and is kept current. The volume holds n8n's data, including the encryption key in the settings, so back it up.

## Version pinning and upgrades

Pin a specific image version instead of `latest`, such as `docker.n8n.io/n8nio/n8n:VERSION`. To upgrade, change the version on a copy, pull, restart and run your upgrade test list. Then repeat on production. Keep the previous version number written down so you can roll back if needed, along with a database backup taken just before the upgrade.

## Search Console and Google APIs when self-hosting

On self-hosted n8n you create your own OAuth client in Google Cloud and enable each API: Google Analytics Data, Google Ads and Search Console. The redirect URL shown in n8n's credential screen must match the one in Google Cloud. The [Search Console setup lesson](https://mentionx.ai/learn/search-console/search-console-setup-properties-verification) covers property permissions, which also apply to the account you connect.

## Troubleshooting self-hosted problems

| Symptom | Cause | Fix |
|---|---|---|
| Webhook URLs show localhost | `WEBHOOK_URL` not set | Set it to the public HTTPS address |
| Slack approvals fail | Waiting webhook not reachable | Check HTTPS and the `/webhook-waiting-slack` path |
| Credentials fail after migration | Different encryption key | Restore the original key |
| Database grows quickly | Saving all successful executions | Save errors only, keep pruning on |
| Schedules off by hours | Timezone not set | Set `GENERIC_TIMEZONE` and workflow timezone |

## Cost math

Community Edition has no licence fee, but compare honestly: a small server, backups and monitoring, plus a few hours a month of someone's time for upgrades. If that time costs more than a Cloud plan (Starter is €20 and Pro €50 a month, billed annually), Cloud is cheaper for a typical marketing team.

## Worked example: Ledgerline's moving to self-hosted

*Ledgerline is a fictional accounts-payable software company. Details are illustrative.*

Ledgerline's IT team required customer data workflows to run on company infrastructure. Marketing ops and IT moved to self-hosted n8n with Docker Compose and Postgres.

The first week, the Monday report arrived at 14:00 instead of 08:00: the instance had the default New York timezone. Setting the timezone fixed it. IT now owns upgrades monthly; marketing ops owns workflows. The runbook lives in the team wiki.

### Walkthrough

1. Choose a host your IT team approves, with a domain and HTTPS.
2. Use the Docker Compose setup from the n8n docs, with Postgres if you expect volume.
3. Set the timezone, webhook URL and execution data variables.
4. Store the encryption key and database backups somewhere safe, and test a restore.
5. Set up uptime monitoring on the n8n URL.
6. Pin the n8n version; read release notes before upgrading.
7. Upgrade on a copy first, test the key workflows, then upgrade production.
8. Write a one-page runbook: where it's hosted, how to restart, how to restore, who to call.

## Try it yourself

Write the runbook for your setup (Cloud or self-hosted). Include who owns upgrades, where backups are, and what to do if the instance is down. Share it with your backup owner.

## Quick quiz

**1. What happens if you lose the encryption key?**

*Answer:* Stored credentials can't be decrypted.

**2. What is the default self-hosted timezone?**

*Answer:* America/New_York.

**3. Should you upgrade straight in production?**

*Answer:* No. Read release notes and test on a copy first.

## What should you check before the next lesson?

- Timezone, webhook URL and execution saving are set.
- Backups and the encryption key are stored and a restore was tested.
- A runbook names owners.

You have finished the track. Return to the [n8n for Marketers track](https://mentionx.ai/learn/n8n/n8n-for-marketers).

## Common questions

**Can marketing self-host without IT?** It's possible but not advisable. Agree hosting, security and backups with IT.

**How often should we upgrade?** Regularly, after reading release notes. Don't fall far behind.

**Can we move from Cloud to self-hosted later?** Yes. Workflows export as JSON; credentials must be recreated.

## Sources

- n8n Docs, [Install using Docker Compose](https://docs.n8n.io/deploy/host-n8n/install-options/install-using-docker-compose)
- n8n Docs, [Manage execution data](https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/manage-execution-data)
- n8n Docs, [Schedule Trigger node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger)
- n8n Docs, [Choose how to use n8n](https://docs.n8n.io/choose-how-to-use-n8n)
- n8n Docs, [MCP Server Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger)
- n8n Docs, [Community license](https://docs.n8n.io/n8n-community-license/community-license)
- All accessed 4 Nov 2026.

## Frequently asked questions

### Can marketing self-host without IT?

It's possible but not advisable. Agree hosting, security and backups with IT.

### How often should we upgrade?

Regularly, after reading release notes. Don't fall far behind.

### Can we move from Cloud to self-hosted later?

Yes. Workflows export as JSON; credentials must be recreated.

---

Written and reviewed by Dipuck Jones for MentionX Learn. The HTML version of this page: https://mentionx.ai/learn/n8n/n8n-self-hosting-operations
