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

**URL:** <https://community.n8n.io/t/debian-podman-compose-connection-lost-using-offical-compose-file/239087>\
**Category:** Questions\
**Tags:** docker-compose\
**Created:** [December 21, 2025, 12:49pm UTC](https://community.n8n.io/t/debian-podman-compose-connection-lost-using-offical-compose-file/239087 "2025-12-21T12:49:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FBits](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@FBits](https://community.n8n.io/u/FBits)\
**Post date:** [December 21, 2025, 12:49pm UTC](https://community.n8n.io/t/debian-podman-compose-connection-lost-using-offical-compose-file/239087/1 "2025-12-21T12:49:07Z")

</div>

## 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](https://github.com/n8n-io/n8n-hosting/tree/main/docker-compose/withPostgresAndWorker) 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](https://europe1.discourse-cdn.com/n8n/original/3X/d/f/dfa0fdcf4cd4363c92f4166a04403a8a90a4d85e.png)

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

```bash
[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/router@2.2.0/node_modules/router/lib/layer.js:152:17)
[n8n] | at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:342:13)
[n8n] | at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:297:9
[n8n] | at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:582:12)
[n8n] | at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/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…

```auto
[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

```auto
(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:

```markdown
[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:

```yaml
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

```

---

<div class="post-metadata">

**Author:** ![achamm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/achamm/32/143734_2.png) [@achamm](https://community.n8n.io/u/achamm)\
**Post date:** [January 18, 2026, 7:55pm UTC](https://community.n8n.io/t/debian-podman-compose-connection-lost-using-offical-compose-file/239087/2 "2026-01-18T19:55:31Z")

</div>

That “Origin header does NOT match” error in your logs is likely the root of your connection issues. It seems like n8n is expecting a specific origin header but isn’t receiving it. Double-check your browser’s settings to ensure you’re not accidentally blocking the origin or using a custom domain that n8n isn’t configured for.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 18, 2026, 7:56pm UTC](https://community.n8n.io/t/debian-podman-compose-connection-lost-using-offical-compose-file/239087/3 "2026-04-18T19:56:20Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
