BLACK FRIDAY 2026 LIVE: RackNerd 4GB VPS $47.98/yr (Lifetime) · ElevenLabs 55% Off · Hostinger 73% Off · Amazon Local AI Hardware View Verified Deals →
High · HTTPS & Caddy

How to Fix Your n8n server is configured to use a secure cookie

TL;DR Fix

N8N_SECURE_COOKIE=true is active while accessing n8n via raw http://IP:5678 instead of an HTTPS reverse proxy. Never disable N8N_SECURE_COOKIE in production; let Caddy auto-provision TLS.

Exact Error Signature

Your n8n server is configured to use a secure cookie, however you are either visiting via plain HTTP

Copy-Paste Fix Commands

# Put Caddy 2.8 in front on port 443 and set .env:
WEBHOOK_URL=https://n8n.yourdomain.com/
N8N_HOST=n8n.yourdomain.com
N8N_PROTOCOL=https
N8N_SECURE_COOKIE=true

Preventing Recurrence

Never disable N8N_SECURE_COOKIE in production; let Caddy auto-provision TLS.

More Production Error Fixes