Hello,
I am running a self-hosted instance of n8n (v1.98.2
on Docker) and am facing a series of critical, environment-related issues that are preventing a key workflow from functioning. I have exhaustively troubleshooted this and have detailed logs and documentation.
Core Problems:
- HTTP Request Node Bug: When using the HTTP Request node to POST a large, complex JSON body (containing raw HTML), the node fails. The API server consistently returns a
400 Bad Request
with errors like “At body → model: Field required”, indicating the node is sending an empty body. Simpler API calls in other workflows work fine. - Code Node Sandbox Restrictions: To bypass the HTTP node bug, I tried making the API call from a
Code
node. This revealed a highly restrictive sandbox:
- It failed with
Cannot find module 'axios'
. - After being advised to use the native
https
module, it failed withCannot find module 'https'
.
- Environment Variable Fix Ineffective: I then modified my
/opt/n8n/docker-compose.yml
to includeNODE_FUNCTION_ALLOW_BUILTIN=https
and correctly restarted the container. TheCannot find module 'https'
error persisted, suggesting the environment variable is not being respected. - UI Instability: The “Executions” list in the UI does not update consistently, which I’ve previously tracked as a WebSocket connection issue with my Caddy reverse proxy.
Conclusion: It appears my n8n Docker environment is fundamentally misconfigured or bugged, preventing both the HTTP Request node and the Code node from performing necessary network operations.
My docker-compose.yml
file is located at /opt/n8n/
and Caddyfile
is at /home/ivan/
. (I can provide the contents if needed).
How can I resolve this restrictive environment so that n8n can function as expected? Is there a known issue with this version or a specific Docker/Caddy configuration I am missing?