Describe the problem/error/question
I’m trying to run a containerized version of n8n (preferably the latest version or 1.104.2) inside GitHub Codespaces using Docker-in-Docker, and I’d like the setup to be reproducible across Codespaces and local development (Windows 10/11 + Docker Desktop).
I resolved volume permission issues (e.g., via sudo chown) and can successfully run n8n. However, I’m now stuck with a major blocker:
When I try to open or create a workflow, the UI silently fails or crashes.
After digging into the logs, I see repeated errors like:
less
CopyEdit
Origin header does NOT match the expected origin. (Origin: "localhost:5678", Expected: "sturdy-barnacle-xxxx.app.github.dev")
I’m accessing n8n via the correct Codespaces public URL (https://sturdy-barnacle-xxxx.app.github.dev), so it seems like iframe-origin behavior inside Codespaces is sending localhost:5678 instead.
I would like to:
- Keep the setup portable between Codespaces and my local Docker Desktop
- Understand if this is a known limitation or if there’s a workaround (e.g., relaxing origin checks or handling proxying behavior better)
What is the error message (if any)?
less
CopyEdit
Origin header does NOT match the expected origin. (Origin: "localhost:5678", Expected: "sturdy-barnacle-xxxx.app.github.dev")
As a result, I cannot create or edit workflows.
Please share your workflow
N/A — I can’t get to the workflow editor because of the origin mismatch issue.
Share the output returned by the last node
N/A
Information on your n8n setup
- n8n version:
n8nio/n8n:latest(also tried with1.104.2) - Database (default: SQLite): Neon PostgreSQ
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker-in-Docker inside GitHub Codespaces (also running the same setup locally via Docker Desktop)
- Operating system: GitHub Codespaces Linux container (based on Debian), host is Codespaces with Docker pre-installed
.env content:
ini
CopyEdit
N8N_ENCRYPTION_KEY=...
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
N8N_RUNNERS_ENABLED=true
N8N_USER_MANAGEMENT_ALLOW_PASSWORD_RESET=true
docker-compose.yml:
yaml
CopyEdit
services:
n8n:
image: n8nio/n8n:latest
ports:
- "5678:5678"
env_file:
- .env
volumes:
- ./n8n_data:/home/node/.n8n
restart: unless-stopped