Short answer: most errors on a new self-hosted n8n instance come from four settings: the public URL (N8N_WEBHOOK_URL and N8N_PROXY_HOPS), a reverse proxy without WebSocket support, the encryption key (N8N_ENCRYPTION_KEY) and the timezone (GENERIC_TIMEZONE). Below is each message, its cause and the fix.
After changing any variable in .env or compose.yaml, recreate the container so the change takes effect:
docker compose up -d
docker compose logs -f n8n
Webhook URLs show http://localhost:5678 instead of your domain
n8n builds the webhook URL from N8N_PROTOCOL, N8N_HOST and N8N_PORT. Behind a reverse proxy (Traefik, Caddy, Nginx), n8n runs internally on port 5678 while the proxy serves it on 443, so that URL comes out wrong. The fix, from the docs on webhook URLs behind a reverse proxy:
N8N_PROXY_HOPS=1
N8N_WEBHOOK_URL=https://n8n.yourdomain.com/
N8N_WEBHOOK_URLreplacesWEBHOOK_URL, which is deprecated from n8n 2.35.0. The old name still works, but n8n logs a deprecation warning on startup.N8N_PROXY_HOPSis the number of proxies in front of n8n (the default is 0). The last proxy must forward theX-Forwarded-For,X-Forwarded-HostandX-Forwarded-Protoheaders. Without this, the Webhook node’s IP allowlist also fails, because every request seems to come from the proxy.
The compose files in the Docker Compose guide and in n8n on Contabo already set N8N_WEBHOOK_URL; if yours lacks N8N_PROXY_HOPS, add it to the same variable list of the n8n service.
The webhook returns 404 or never fires
The Webhook node has two URLs, and each one listens only in one situation (Webhook node common issues):
- Test URL (
/webhook-test/...): listens only after you click Listen for test event, for 120 seconds, and shows the data in the editor. - Production URL (
/webhook/...): listens only while the workflow is published, and doesn’t show the data in the editor. Check the result under Executions.
The usual mistake is pasting the Test URL into the external service and then closing the editor. Use the Production URL in the service and publish the workflow. Also check the HTTP method: a webhook set to POST doesn’t answer GET.
If n8n says the path is already in use, another published workflow has a webhook with the same path and method. n8n allows only one per combination: change the path or unpublish the other workflow.
“Connection lost” in the editor
The notice comes with the text “You have a connection issue or the server is down. n8n should reconnect automatically once the issue is resolved.” The editor lost the channel n8n uses to push updates to the page. That channel is set by N8N_PUSH_BACKEND, which uses WebSocket by default and accepts sse as an alternative (deployment variables).
There are two typical causes:
- The proxy doesn’t pass WebSocket through. Traefik and Caddy pass WebSocket by default. In Nginx, the n8n block needs
proxy_http_version 1.1and theUpgradeandConnectionheaders, as shown in the Nginx WebSocket docs. In panels such as Nginx Proxy Manager, turn on the host’s WebSocket option. - n8n restarted or ran out of memory. If the notice shows up along with executions that stop halfway, look for JavaScript heap out of memory in
docker compose logs n8n. The signs and the server size to pick are in n8n RAM and CPU requirements.
“Your n8n server is configured to use a secure cookie”
The page says “Your n8n server is configured to use a secure cookie, however you are either visiting this via an insecure URL, or using Safari.” By default N8N_SECURE_COOKIE is true, so the login cookie only travels over HTTPS (security variables). You opened n8n through http://IP:5678 or through a domain without a certificate.
The fix is to use the domain over HTTPS. For quick access without a domain, open an SSH tunnel and browse to http://localhost:5678, which browsers other than Safari accept:
ssh -L 5678:127.0.0.1:5678 user@VPS-IP
Turning it off with N8N_SECURE_COOKIE=false sends your password and session unencrypted. n8n’s own page marks that option as not recommended.
“Mismatching encryption keys” or “Credentials could not be decrypted”
/home/node/.n8n/config. Without the original key, no saved credential can be read again.n8n stops on startup with “Mismatching encryption keys. The encryption key in the settings file /home/node/.n8n/config does not match the N8N_ENCRYPTION_KEY env var.” when the N8N_ENCRYPTION_KEY in .env differs from the key saved in the volume. This happens when someone sets the variable after the first start, with a new value.
To fix it, read the key already in use and copy the value into .env:
docker compose exec n8n cat /home/node/.n8n/config
If n8n doesn’t start at all, read the file straight from the volume (the name has the folder as a prefix; check with docker volume ls):
docker run --rm -v n8n-compose_n8n_data:/data alpine cat /data/config
“Credentials could not be decrypted” shows up when the database came from another installation with a different key. Restore the original key, as the encryption key docs explain. The n8n backup guide shows how to keep the key with the data.
Schedules run at the wrong time
Without GENERIC_TIMEZONE, n8n uses America/New_York (timezone and localization), so a Schedule Trigger set for 8 AM runs on New York time. Set both variables to the same zone:
GENERIC_TIMEZONE=Europe/Berlin
TZ=Europe/Berlin
GENERIC_TIMEZONE applies to the schedule nodes, and TZ to the container’s system (what the date command and scripts return). A workflow can have its own zone under Workflow menu > Settings > Timezone, and that value wins over the global one.
Changed the interval or the zone and nothing happened? The schedule is only read on publish. Unpublish and publish the workflow again (Schedule Trigger common issues).
“EACCES: permission denied” in /home/node/.n8n
The official image runs n8n as the node user, not as root (see the image Dockerfile). With a named Docker volume, like the n8n_data in the docs, the folder starts out with the right owner. The error shows up with a bind mount (a host folder, such as ./n8n:/home/node/.n8n) created by root or by another user.
Find the UID and GID the container uses and give the host folder to them:
docker compose run --rm --entrypoint id n8n
sudo chown -R <uid>:<gid> ./n8n
Avoid chmod 777: the folder holds the encryption key, and letting any user on the server read that file is a risk.
Before you change anything
Back up the volume and the database before changing key, database or data path variables. A typo in .env deletes nothing, but recreating volumes does. If the problem started right after an update, the n8n update guide explains how to roll back safely.
Frequently asked questions
Why does my n8n webhook URL show localhost:5678?
Because n8n builds the URL from N8N_PROTOCOL, N8N_HOST and N8N_PORT, which comes out wrong behind a reverse proxy. Set N8N_WEBHOOK_URL to your domain and N8N_PROXY_HOPS=1.
Does WEBHOOK_URL still work in n8n?
Yes, but it is deprecated from n8n 2.35.0 and logs a warning. Use N8N_WEBHOOK_URL.
How do I fix Connection lost in n8n?
Check that the reverse proxy passes WebSocket through (in Nginx, proxy_http_version 1.1 and the Upgrade and Connection headers) and that n8n isn't restarting from lack of memory. As an alternative, N8N_PUSH_BACKEND accepts sse.
Why does the Schedule Trigger run at the wrong time?
Without GENERIC_TIMEZONE, n8n uses America/New_York. Set GENERIC_TIMEZONE and TZ to your zone and publish the workflow again.