# Self-host the automation stack: when n8n is worth the effort

Source: https://getstartedwithai.net/tutorials/n8n-self-hosted-when-worth-it
Site: Get Started With AI
Tagline: Build AI automations that actually run your business.
Audience: solo professionals, freelancers, consultants and AI implementers in training
Contact: hello@getstartedwithai.co.uk

This Markdown companion is generated from the prerendered page for AI crawlers.
# Self-host the automation stack: when n8n is worth the effort

Self-host once your cloud automation bill crosses about £80 a month, or when client data must stay on infrastructure you control. Below those triggers, the cloud seat is cheaper than the time you spend updating, monitoring and recovering from outages. This 60-minute build provisions a £10 a month VPS, runs n8n behind Caddy with HTTPS, and ends with a working webhook posted from curl. The implementer angle: regulated clients in legal, healthcare and financial services pay £3,000 to £8,000 for a hardened n8n instance because no third-party SaaS sees their data.

## When self-hosting is the right move

- Cloud automation cost has crossed £80 a month and is rising. Self-hosting flattens the cost.
- Client data must not leave your infrastructure: legal, healthcare and financial services clients.
- You need integrations or custom nodes the cloud version restricts.
- You are confident with the command line and basic Linux server admin.

## When to stay on cloud

- You are below 5,000 operations a month. Cloud is cheaper because your time costs more than the seat.
- You do not have time to handle server updates, backups, monitoring and outages.
- You need clients to log in directly. Cloud SSO and audit logs are cleaner than the self-hosted equivalents.

## The real cost of self-hosting

- Server: £6 to £20 a month for a small VPS (Hetzner, DigitalOcean, Zeabur).
- Domain: £10 a year for a subdomain like n8n.yoursite.co.uk.
- Time: 60 minutes setup, then 1 to 2 hours a month for updates and monitoring.
- n8n Community Edition: free for unlimited workflows and executions.
- n8n Self-Hosted Business plan: from about £400 a month if you need SSO, RBAC and Git versioning.

## Step 1: Provision the server (15 minutes)

1. Sign up for Hetzner Cloud or DigitalOcean. Create a CX22 (Hetzner) or 2GB Droplet (DigitalOcean).
2. Choose Ubuntu 24.04 LTS. Set a root password and add your SSH key.
3. Note the public IP. SSH in: ssh root@your.ip.address.
4. Create a non-root user with sudo: adduser n8n then usermod -aG sudo n8n. Switch to the user: su - n8n.

## Step 2: install Docker (10 minutes)

1. Install Docker following the official Ubuntu instructions: sudo apt update, then the curl install script from docker.com.
2. Add your user to the docker group: sudo usermod -aG docker $USER. Log out and back in.
3. Confirm: docker run hello-world should print the success message.

## Step 3: run n8n with Docker Compose (15 minutes)

1. Create a folder: mkdir ~/n8n && cd ~/n8n.
2. Create docker-compose.yml. Paste the official n8n compose template (search "n8n self host docker compose" for the latest version).
3. Set the environment variables in the compose file: N8N_HOST=n8n.yoursite.co.uk, WEBHOOK_URL=https://n8n.yoursite.co.uk, N8N_PROTOCOL=https.
4. Start it: docker compose up -d.
5. n8n is now running on port 5678 of the server.

## Step 4: Front it with Caddy for HTTPS (15 minutes)

1. Point your subdomain (n8n.yoursite.co.uk) to the server IP via your DNS provider.
2. Install Caddy: sudo apt install caddy.
3. Edit /etc/caddy/Caddyfile. Add: n8n.yoursite.co.uk { reverse_proxy localhost:5678 }.
4. Reload Caddy: sudo systemctl reload caddy. Caddy provisions an SSL cert automatically.
5. Open the URL in a browser. The n8n login screen should appear on HTTPS.

## Step 5: First workflow (5 minutes)

1. Create the admin account at the login screen.
2. Click Add workflow. Add a Webhook trigger and an Email Send node.
3. Save and activate. Copy the webhook URL.
4. Curl it: curl -X POST https://n8n.yoursite.co.uk/webhook/your-id -d test=1. The email arrives.
5. A private webhook endpoint is now live and your clients can post to it without their data leaving your server.

## What you ship

A working n8n instance on a £10 a month VPS with HTTPS via Caddy, the Community Edition free, a private webhook tested with curl, and the next steps documented for backups and monthly updates.

## How to use this with regulated clients

Self-hosted n8n is a £3,000 to £8,000 implementer build for a regulated client. The package: server provisioning, hardening and monitoring, the first three workflows, a handover doc and a quarterly maintenance retainer of £400 to £900 a month. The pitch: a workshop on the existing tools (Microsoft 365, HubSpot, Xero) connected through the private n8n instance, with no client data ever touching a third-party cloud.

## Common mistakes

- Self-hosting before you need to. If your cloud bill is below £40 a month, the time cost outweighs the savings.
- Skipping backups. Always set up automated backups of the n8n database (postgres or sqlite). The first crash without a backup is the last n8n instance you build.
- Ignoring updates. n8n ships frequent updates. Set a monthly calendar reminder to docker compose pull && docker compose up -d.
- Trying to self-host without HTTPS. Webhooks across HTTP can be hijacked. Use Caddy or Nginx with SSL from day one.

## What to build next

Pair this with the Zapier vs Make vs n8n comparison and the AI privacy and security tutorial so you can decide which tool meets which compliance requirement on the next regulated engagement.

## Related builds

More tutorials in Automation. Each one runs in 60 to 90 minutes and ships a finished asset.

### Capture every lead automatically: a 30-minute Zapier build

30 to 60 minutes. Solo Pro.

[Open tutorial](/tutorials/first-zapier-automation-30-min)

### Decide between native AI Steps and a Custom GPT in 10 minutes

60 to 90 minutes. Solo Pro.

[Open tutorial](/tutorials/zapier-ai-features-vs-custom-gpt)

### Run automations Zapier cannot: the first Make scenario

60 to 90 minutes. Solo Pro.

[Open tutorial](/tutorials/first-make-scenario-visual)

### Pick the right automation tool in 5 minutes: Zapier vs Make vs n8n

30 to 60 minutes. Solo Pro / Implementer.

[Open tutorial](/tutorials/zapier-vs-make-vs-n8n)

## Questions people ask before they start

### Is the Community Edition really free?

Yes. The Community Edition is free with unlimited workflows and executions. You only pay for the server and your time. The Self-Hosted Business plan adds SSO, Git versioning and multi-environment support; needed for teams of five or more.

### How does this compare to n8n Cloud?

n8n Cloud Starter is from about £20 a month annual for 2,500 executions. For most workflows, self-hosted is cheaper above 5,000 executions a month. Below that, Cloud saves you the maintenance time.

### Can I run n8n on my Mac?

Yes for testing, no for production. A laptop that goes to sleep cannot run a webhook listener reliably. Use a VPS for any production workflow.

### What about backups?

The simplest path is a daily cron that exports the n8n database to a Backblaze B2 or AWS S3 bucket. Three lines of bash plus a £1 a month bucket. Detailed instructions are in the n8n self-host docs.
