Keeps dying - Docker on Raspberry Pi 5 8 GB

Describe the problem/error/question

I run docker compose down && docker compose up -d and my Postgres container is up. However, when I check logs of n8n, there’s nothing. Checking n8n_data, nothing. Looking at docker compose events shows that the container keeps dying and then Docker restarting it. There’s no logs or anything. I’ve linked my docker compose below.

docker-compose.yml

services:
  postgres:
    image: postgres:17
    restart: always
    env_file:
      - .env
    ports:
      - "5432:5432"
    volumes:
     - db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER}"]
      interval: 10s
      timeout: 5s
      retries: 5

  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    platform: linux/arm64
    restart: always
    depends_on:
      postgres:
        condition: service_healthy
    env_file:
      - .env
    ports:
      - "127.0.0.1:5678:5678"
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${N8N_HOST}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=web,websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
      - traefik.http.routers.n8n.middlewares=n8n@docker
    networks:
      - traefik
    volumes:
      - ./n8n_data:/home/node/.n8n
      - ./logs:/logs

networks:
  traefik:
    external: true

volumes:
  db:

Information on your n8n setup

  • n8n version: latest
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Raspbian (Headless)
  • Architecture: aarch64

Okay, I’m getting n8n exited with code 159

It turns out I had installed Docker for 32bit ARM. For some reason, my RPI defaulted to 32bit applications. I changed it to 64bit by using RPI Imager.

2 Likes

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