Subject: Self-Hosted Docker n8n (v1.98.2) - Multiple Critical Failures (HTTP Body, Code Node Modules, WebSockets)

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:

  1. 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.
  2. 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 with Cannot find module 'https'.
  1. Environment Variable Fix Ineffective: I then modified my /opt/n8n/docker-compose.yml to include NODE_FUNCTION_ALLOW_BUILTIN=https and correctly restarted the container. The Cannot find module 'https' error persisted, suggesting the environment variable is not being respected.
  2. 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?