Skip to main content

n8n – deployment notes for the LumaDock VPS template

Learn how the n8n VPS template works, how to configure Caddy for domains, and how to update or secure your n8n instance.

Andy Wallace avatar
Written by Andy Wallace
Updated over 2 months ago

The n8n template for Ubuntu 24.04 uses Docker, Docker Compose, and Caddy. This setup gives you an easy way to run automated workflows with HTTPS support. A few adjustments are required if you plan to use a custom domain or enable secure cookies.


How the n8n template is structured

The deployment includes Docker containers for n8n plus Caddy as a reverse proxy. Caddy is responsible for routing traffic and handling SSL certificates. The default configuration is designed so you can reach n8n immediately through your server’s IP address.


Update the Caddy configuration for a domain

Caddy starts with a simple configuration that listens on port 80 and sends traffic to the n8n container. This works for IP-based access, not for domains. To use your own domain, modify Caddy’s config and reload the service.



Step 1 – Open the Caddy configuration

The file contains an entry similar to this:


:80 {     reverse_proxy localhost:5678 }



Step 2 – Replace it with your domain

Use your real domain name in the configuration.


yourdomain.com {     reverse_proxy localhost:5678 }



Step 3 – Reload Caddy

Run this command to apply the change.


systemctl reload caddy


Secure cookie behaviour and IP access

The n8n template sets N8N_SECURE_COOKIE=false inside the Docker Compose file. This is required if you want to access n8n using only your VPS IP address. Browsers refuse secure cookies on plain HTTP connections, so disabling this option avoids login issues during initial setup.



If you later switch to a domain with valid HTTPS, update the Docker environment section. You can either remove the variable entirely or set the value to true, then rebuild the container.


docker compose down docker compose up -d


Update your n8n instance

Keeping n8n updated helps with performance, features, and security. The template includes Docker Compose commands that make this simple.

cd /n8n



Step 1 – Pull new images

sudo docker compose pull



Step 2 – Recreate the containers

sudo docker compose up -d


Summary

The n8n VPS template is ready to use as soon as the server boots. You can work through the IP address during early setup, then switch to a secure domain once your DNS and SSL are in place. Caddy handles routing and certificates, while Docker Compose makes updates and configuration changes predictable and easy to manage.

Did this answer your question?