Error Logs Not Appearing in Docker Logs Despite Configuration

I’m trying to capture error logs from n8n running in Docker but having no success. I’ve tried multiple logging configurations but can’t get error logs to appear in:

docker logs -f n8n.

Environment:
n8n version: 1.78.1
Running in Docker (docker.n8n.io/n8nio/n8n:1.78.1)
Ubuntu 22.04.5 LTS

Current Configuration:
environment:

  • N8N_LOG_LEVEL=debug
  • N8N_LOG_OUTPUT=console

What I’ve Tried:
Every suggestion I can find in the documentation and in the fourm.

Verified errors are occurring by deliberately causing them in workflows
Confirmed the container is running and logs are accessible

Expected Behavior:
When a workflow error occurs (e.g., a ReferenceError from invalid JavaScript), this should appear in the Docker logs accessible via:

docker logs -f n8n.

Actual Behavior:
Startup logs appear normally
Regular workflow execution logs do not appear
Error do not appear
To confirm - I only ever get the basic startup logs. Nothing else.

I can do this:
docker compose exec n8n sh

~ $ ls -la /home/node/.n8n/

drwxr-xr-x 6 node node 4096 Mar 13 21:19 .
drwxr-sr-x 1 node node 4096 Mar 13 06:11 …
drwxr-xr-x 2 node node 4096 Feb 19 03:36 binaryData
-rwxr-xr-x 1 node node 54 Feb 19 03:36 config
-rw-r–r-- 1 node node 0 Mar 13 09:31 crash.journal
drwxr-xr-x 2 node node 4096 Feb 19 03:37 git
-rw-r–r-- 1 node node 10512585 Mar 13 21:19 n8nEventLog-1.log
-rw-r–r-- 1 node node 10504823 Mar 13 20:49 n8nEventLog-2.log
-rw-r–r-- 1 node node 10491074 Mar 13 20:19 n8nEventLog-3.log
-rw-r–r-- 1 node node 5802630 Mar 13 21:35 n8nEventLog.log
drwxr-xr-x 3 node node 4096 Feb 19 03:51 nodes
drwxr-xr-x 2 node node 4096 Feb 19 03:37 ssh

And so I see logs inside the container.

Question:

Where are error logs supposed to appear when running n8n in Docker?
Is there additional configuration needed to get error logs to appear in Docker logs?
Are error logs being sent somewhere else by default?
Any guidance would be greatly appreciated as this is blocking our ability to monitor n8n errors in our logging infrastructure.

Have you tried using file mode with a specific file directory and just tail’ing or cat’ing the file? Does that fail too?

Do you provide docker with a config file? That could be overwriting your env var config on the docker compose level.

How do you deploy the n8n instance? docker compose up -d?

After extensive troubleshooting, I’ve discovered that setting N8N_LOG_LEVEL=debug in my Docker Compose environment variables has no effect, while all other environment variables work correctly.

When I set N8N_LOG_LEVEL=debug in my Docker Compose file, it was completely ignored.
When inspecting the container environment variables with:

docker exec n8n env | grep LOG

I found:

CopyN8N_LOG_FILE_LOCATION=“”
N8N_LOG_CONSOLE_LEVEL=info
N8N_LOG_OUTPUT=console

Notice that my N8N_LOG_LEVEL variable doesn’t appear at all, and instead there’s an N8N_LOG_CONSOLE_LEVEL=info that I never set.

Searching for “N8N_LOG_CONSOLE_LEVEL” on Google returns zero results, suggesting this is an internal variable not documented publicly.

I confirmed that setting N8N_LOG_LEVEL=debug works correctly when manually running n8n inside the container:

bashCopydocker exec -it n8n /bin/sh
NODE_OPTIONS=“–trace-warnings” N8N_LOG_LEVEL=debug node --trace-warnings ./bin/n8n start

This produced proper debug logs, proving that the variable itself works correctly.

The only way I can get debug logging in Docker is to modify the entrypoint to set the variable directly before starting n8n:
yamlCopyentrypoint: >
/bin/sh -c "
export N8N_LOG_LEVEL=debug &&
tini – /docker-entrypoint.sh"

Why is N8N_LOG_LEVEL being ignored when set in Docker Compose while all other environment variables work correctly?

What is N8N_LOG_CONSOLE_LEVEL and why isn’t it documented anywhere?

Is there a standard way to set logging level in Docker Compose without needing to override the entrypoint?

Is this a bug in n8n’s environment variable parsing or an intentional design decision?

It seems like n8n’s initialization is either:
Converting N8N_LOG_LEVEL to N8N_LOG_CONSOLE_LEVEL but something is preventing this from working

Ignoring N8N_LOG_LEVEL and only using N8N_LOG_CONSOLE_LEVEL

Some other initialization issue where environment variables aren’t properly passed through

Personally I am not confident with this depth of n8n env vars, had not encountered this yet. I may suggest @'ing some of the upper level n8n team members.

But I would presume N8N_LOG_CONSOLE_LEVEL gets set if N8N_LOG_OUTPUT is set to console. Though still bizarre N8N_LOG_LEVEL gets ignored for that case.

Does this case still happen with file mode? That’s what I am personally curious about. Is there an aversion to trying that mode?