Error connecting to n8n - using Docker on RHEL

Describe the problem/error/question

Getting “Error connecting to n8n - Could not connect to server” in browser when accessing n8n at http://localhost:5678

What is the error message (if any)?

Environment:

  • n8n version: 1.120.4

  • Running in Docker

  • Access via Tailscale IP

  • OS: RHEL9.6

What’s working:

  • n8n container is running successfully

  • Server logs show: n8n ready on 0.0.0.0, port 5678

  • API responds correctly: curl http://localhost:5678/rest/settings works

What I’ve tried:

  • Recreated container multiple times with correct environment variables (N8N_EDITOR_BASE_URL, WEBHOOK_URL)

  • Fixed volume permissions (chown 1000:1000)

  • Tried without volumes (fresh container)

  • Cleared browser cache completely (hard refresh, incognito mode, cleared local storage, service workers)

  • Tried different port (5679)

  • Tried different browsers

  • Error persists across all attempts

Hey! Since the API works but the frontend does not load, this sounds like a reverse proxy or base URL mismatch. Check if N8N_EDITOR_BASE_URL matches exactly how you access n8n (including protocol and port). If you are using Tailscale IP, set it to something like http://your-tailscale-ip:5678. Also verify N8N_HOST is set to 0.0.0.0 and N8N_PORT matches your container port. Try accessing directly via http://container-ip:5678 to rule out network issues. If still broken, check browser console for specific JavaScript errors blocking the frontend load.