Get Started

Run n8n 24/7 on a £5 server, with HTTPS

Your n8n on your PC stops when the laptop sleeps. Move it to a small rented server with your own address, a real HTTPS padlock, webhooks other apps can reach, and nightly backups. Docker, Caddy and Ubuntu, set up properly, one step at a time.

120 minIntermediateTools: Around £5 to £9 a month for the server, plus a domain from about $6 a year. n8n itself is free to self-host.Step 1 free
n8n running around the clock at https://n8n.yourdomain, on a server you control
A locked-down Ubuntu serverSSH keys only, no root login, a firewall, automatic security updates
A starter kitDocker Compose file, Caddyfile, settings template, backup and update scripts, and a test webhook
  • Nightly backups, a monthly update routine, and a restore you've actually practised
Before you start
  • A small server (VPS) with at least 2GB of RAM. Monthly prices before VAT (they change, so check the links): Hetzner ↗ CX23 (2 vCPU, 4GB) €5.49 plus €0.50 for the IPv4 address ↗, so €5.99, when it's in stock. Vultr ↗ Regular Performance: 2GB for $10, 1GB for $5. DigitalOcean ↗ Basic: 2GB for $12, 1GB for $6. All bill by the hour, so a server you delete after an hour costs pennies.
  • A domain name. One you already own is fine: you only add a subdomain. New ones on Porkbun ↗: .co.uk $5.66 a year, .com $11.08 a year.
  • n8n basics. Do Your own Zapier first. This mission moves n8n to a server; it doesn't re-teach workflows.
  • The terminal. You'll type commands on your PC and on the server. New to it? The Terminal survival kit covers everything used here.
  • A password manager for the server details and n8n's encryption key. KeePassXC is free.
  • About 2 hours. A chunk of that is waiting for downloads and DNS.
01/07Rent a small server and log in with a key0 done
STEP 01 of 07~20 min

Rent a small server and log in with a key

A VPS is a computer in a data centre that never sleeps. Logging in with a key instead of a password shuts out the bots that try passwords on every server, all day.

  1. What you're buildingOne small server that never sleeps. Caddy sits at the front and handles HTTPS, n8n runs behind it, and a separate runner handles Code nodes. By the end, any app on the internet (a form, Stripe, a Telegram bot) can trigger your workflows, even with your laptop shut.

    Diagram: your browser, other apps and your PC connect through the ufw firewall to a VPS where Caddy handles HTTPS on ports 80 and 443 and forwards to n8n on port 5678, with a runners container for Code nodes, and n8n's data and backups stored on the server
    The finished setup. Only Caddy faces the internet; n8n's own port is reachable from the server itself, nothing else.
  2. Before you pay for anything, the licence. n8n's self-hosted version uses the Sustainable Use License. Its licence FAQ ↗ says you can use it free to run your own business, for personal projects, and to build automations for clients, charging for setup, maintenance and training. You can't host n8n as a service where clients build their own workflows, white-label it, or fork it into your own automation product. If you want to sell n8n work, read the licence step of Automate a small business's admin too: it covers whose name the server should be in.

  3. Now make an SSH key on your PC. Windows 10 and 11 and macOS already include the ssh tools. Press Enter to accept the suggested file, then type a passphrase (it protects the key if your laptop is stolen):

    Terminal
    ssh-keygen -t ed25519 -C "n8n-server"
  4. That made two files. The one ending in .pub is your public key, which is safe to give to the server company. The other one is private: never paste it anywhere. Show the public one:

    Windows (PowerShell)
    Get-Content $HOME\.ssh\id_ed25519.pub
    Mac / Linux
    cat ~/.ssh/id_ed25519.pub
  5. Pick a provider and plan from the list in What you need. Get 2GB of RAM or more: n8n, its Code node runner and Caddy all share it. Hetzner's CX23 is the cheapest 4GB option, but its Cost-Optimized plans are sometimes out of stock in some locations, so have a second choice ready. When you create the server, choose:

    • Image: plain Ubuntu 24.04 LTS or 26.04 LTS, not a one-click "Docker" app. Both are on Docker's supported list, and you'll install Docker from Docker's own repository in step 4.
    • Location: close to you or your users. London, Amsterdam, Frankfurt, Nuremberg or Helsinki all work well from the UK.
    • Authentication: SSH key. Paste the whole ssh-ed25519 ... line from above.
    • Backups: optional, but worth it. Hetzner and DigitalOcean both sell automatic daily or weekly snapshots for a percentage of the server price.
    TipWill it hold people's personal data, like form submissions or customer emails? Then you're responsible for it under UK GDPR. An EU or UK location keeps things simple, and DigitalOcean and Vultr both have London data centres.
  6. Copy the server's public IPv4 address from the dashboard. We'll use 203.0.113.10 as an example: swap in yours everywhere. Log in as root:

    Terminal
    ssh root@203.0.113.10
  7. The first time, ssh asks Are you sure you want to continue connecting (yes/no/[fingerprint])?. Type yes. That records the server's identity, so ssh can warn you if it ever changes.

✓
CheckpointYour prompt changes to something like root@your-server:~#. You're on the server.
If it breaks'Permission denied (publickey)' + 3 more
'Permission denied (publickey)'
The server doesn't have your public key. Check you pasted the line ending in .pub when you created it. Most providers let you add a key and rebuild the server in a minute, which is quicker than fixing it by hand.
'ssh' is not recognised (Windows)
Turn on the built-in client: Settings → System → Optional features → OpenSSH Client. Then open a new PowerShell window.
'Connection timed out'
Give a new server a minute or two to boot. If it still fails, check you haven't attached a provider firewall that blocks port 22.
'WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!'
Normal if you rebuilt the server on the same IP. Clear the old entry with ssh-keygen -R 203.0.113.10 and connect again. If you didn't rebuild anything, stop and find out why.
Still stuck? Ask the community
Next mission · Automate the boring stuffSort, label and summarise your email with AI
→