The n8n template for Ubuntu 24.04 uses Docker and Docker Compose, installed via n8n's official one-line setup. Unlike the previous version of this template, it does not include a bundled reverse proxy - n8n is reachable directly on port 5678. This keeps the template simple and gets you into the interface immediately, but it also means a few things work differently than before.
How the n8n template is structured
The deployment lives in /opt/n8n and runs n8n plus its bundled AI Assistant sandbox as Docker containers, defined in /opt/n8n/compose.yml. Configuration and secrets — including a uniquely generated encryption key, per this instance - live in /opt/n8n/.env. These are generated fresh on first boot, so no two VPS instances share the same secrets.
Secure cookie behaviour and IP access
The template sets N8N_SECURE_COOKIE=false in /opt/n8n/.env. This is required for login to work at all over plain HTTP — browsers silently drop secure-flagged cookies on non-HTTPS connections, which otherwise causes an endless bounce back to the login screen with no visible error. You don't need to change this to use the instance by IP.
Using your own domain with HTTPS
If you'd rather run n8n behind a domain with a valid TLS certificate, you'll need to set up a reverse proxy yourself - the template doesn't ship one. A minimal option using Caddy, which handles certificate issuance automatically:
apt install -y caddy
Then edit /etc/caddy/Caddyfile:
yourdomain.com { reverse_proxy localhost:5678 }Apply it:
systemctl reload caddy
Once your domain is serving over HTTPS, switch the cookie setting back on and restart n8n:
sed -i 's/N8N_SECURE_COOKIE=false/N8N_SECURE_COOKIE=true/' /opt/n8n/.env docker compose -f /opt/n8n/compose.yml up -d
Update your n8n instance
The recommended way to update uses n8n's own installer, which only touches the version pin and restarts — it never rewrites your existing configuration or secrets:
curl -fsSL https://get.n8n.io | sh -s -- --upgrade
Alternatively, update manually:
cd /opt/n8n docker compose pull docker compose up -d
Summary
The n8n VPS template is ready to use as soon as the server boots - complete account setup right away, since the instance has no access control until you do. You can run entirely off your VPS IP, or add your own reverse proxy later if you want a domain and HTTPS. Docker Compose and n8n's official installer make updates predictable and safe to run at any time.
