Debian + podman compose > "connection lost" (using offical(?) compose file)

Describe the problem/error/question

tldr; the interface shows “connection lost” all the time.

I’ve used the official(?) docker compose shared here: n8n-hosting/docker-compose/withPostgresAndWorker at main · n8n-io/n8n-hosting · GitHub and made a few tweaks trying to get things running based on other answers.

Does anybody have any ideas? expected: “undefined” seems odd, am I missing another environment var somewhere?

What is the error message (if any)?

image

In the compose logs I have a couple of interesting lines…

[n8n]        | 2025-12-21T12:41:20.507Z | warn  | Origin header does NOT match the expected origin. (Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined", Protocol: "undefined") {"scopes":["push"],"headers":{"host":"localhost:5678"},"file":"index.js","function":"handleRequest"}
[n8n]        | ResponseError: Invalid origin!
[n8n]        |     at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)
[n8n]        |     at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10
[n8n]        |     at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/lib/layer.js:152:17)
[n8n]        |     at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:342:13)
[n8n]        |     at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:297:9
[n8n]        |     at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:582:12)
[n8n]        |     at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:291:5)
[n8n]        |     at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:144:18
[n8n]        |     at processTicksAndRejections (node:internal/process/task_queues:105:5)

and this for both the worker and n8n…

[n8n]        | 2025-12-21T12:40:48.250Z | warn  | Failed to start Python task runner in internal mode. because Python 3 is missing from this system. Launching a Python runner in internal mode is intended only for debugging and is not recommended for production. Users are encouraged to deploy in external mode. See: https://docs.n8n.io/hosting/configuration/task-runners/#setting-up-external-mode {"scopes":["task-runner"],"file":"task-runner-module.js","function":"startInternalTaskRunners"}

Please share your workflow

Any workflow/blank/doesn’t matter

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

n/a

Information on your n8n setup

  • n8n version: 2.0.3
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): podman compose on local machine (compose file below)
  • Operating system: debian

N8N debug info:

[details="instance information"]
# Debug info

## core

- n8nVersion: 2.0.3
- platform: docker (self-hosted)
- nodeJsVersion: 22.21.0
- nodeEnv: production
- database: postgres
- executionMode: scaling (single-main)
- concurrency: -1
- license: enterprise (production)
- consumerId: c879142a-b0d6-4b76-8222-9253bd455d36

## storage

- success: all
- error: all
- progress: false
- manual: true
- binaryMode: database

## pruning

- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions

## client

- userAgent: mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/120.0.0.0 safari/537.36
- isTouchDevice: false

Generated at: 2025-12-21T12:25:45.744Z
[/details]

Podman compose file:

version: '3.8'

x-shared: &shared
  restart: always
  image: docker.n8n.io/n8nio/n8n
  user: "1000:1000"
  environment:
    - DB_TYPE=postgresdb
    - DB_POSTGRESDB_HOST=postgres
    - DB_POSTGRESDB_PORT=5432
    - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
    - DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
    - DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
    - EXECUTIONS_MODE=queue
    - QUEUE_BULL_REDIS_HOST=redis
    - QUEUE_HEALTH_CHECK_ACTIVE=true
    - N8N_ENCRYPTION_KEY=${ENCRYPTION_KEY}
    - N8N_HOST=localhost
    - WEBHOOK_URL=http://localhost:5678/
    - N8N_EDITOR_BASE_URL=http://localhost:5678/
    - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
    - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true
    - N8N_PUSH_BACKEND=sse
	- N8N_LOG_LEVEL=debug
  links:
    - postgres
    - redis
  volumes:
    - ./containervols/n8n/.n8n:/home/node/.n8n
    - ./containervols/n8n/data:/mnt/data
  depends_on:
    redis:
      condition: service_healthy
    postgres:
      condition: service_healthy

services:
  postgres:
    image: postgres:16
    restart: always
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
      - POSTGRES_NON_ROOT_USER=${POSTGRES_NON_ROOT_USER}
      - POSTGRES_NON_ROOT_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
    volumes:
      - ./containervols/postgres/data:/var/lib/postgresql/data
      - ./Resources/postgres-init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 5s
      timeout: 5s
      retries: 10

  redis:
    image: redis:6-alpine
    restart: always
    volumes:
      - ./containervols/redis/data:/data
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 5s
      retries: 10

  n8n:
    <<: *shared
    ports:
      - 5678:5678

  n8n-worker:
    <<: *shared
    command: worker
    depends_on:
      - n8n