Data is regularly lost on docker restart!

Describe the problem/error/question

I have a docker container that runs happily except that when I restart it, a few recent data changes are lost. The older workflow changes remain intact. It feels like the sqlite db is not flushed to disk??

The volume with n8n home is mapped properly (see compose.yaml below)

What is the error message (if any)?

Please share your workflow

This is my docker compose:

version: '2.1'

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    container_name: n8n
    ports:
      - 2222:5678
    environment:
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - N8N_RUNNERS_ENABLED=true
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - TZ=${GENERIC_TIMEZONE}
    volumes:
      - /home/data/n8n/home:/home/node/.n8n
      - /home/data/n8n/files:/files
      - /home/zzz/notes2/n8n:/home/zzz/notes2/n8n
(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

Information on your n8n setup

  • n8n version: 1.115.3
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Linux