I am running n8n via docker compose on Ubuntu and have been using it for a several versions. I did have to replace traefik with my own reverse proxy, but that hasn’t caused any issues. Everything was going great, until I stopped the container today and started it back up. Everything is now missing.
I am directed to the /setup page like it’s my first time running n8n.
Looks like my persistent volume should be /root/n8n/.n8n:/dockervols/n8n, but that directory on my host OS completely empty.
Here’s my docker-compose.yml:
version: "3"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "127.0.0.1:5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=false
# - N8N_BASIC_AUTH_USER
# - N8N_BASIC_AUTH_PASSWORD
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}
- WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}
- VUE_APP_URL_BASE_API=https://${SUBDOMAIN}.${DOMAIN_NAME}
- GENERIC_TIMEZONE=America/New_York
volumes:
- ${DATA_FOLDER}/.n8n:/dockervols/n8n
and here’s my .env file:
# Folder where data should be saved
DATA_FOLDER=/root/n8n/
# The top level domain to serve from
DOMAIN_NAME=aiscorp.com
# The subdomain to serve from
SUBDOMAIN=n8n
# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in: https://n8n.example.com
# The user name to use for authentication - IMPORTANT ALWAYS CHANGE!
N8N_BASIC_AUTH_USER=corey
# The password to use for authentication - IMPORTANT ALWAYS CHANGE!
N8N_BASIC_AUTH_PASSWORD=passwordgoeshere
# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Berlin
# The email address to use for the SSL certificate creation
[email protected]
N8N_EMAIL_MODE=smtp
N8N_SMTP_HOST=10.4.2.253
N8N_SMTP_USER=cmcmillan
N8N_SMTP_PASS=passwordgoeshere
[email protected]
Looking at my bash history, I’ve only ever run ‘sudo docker compose up -d’ so it should have always run as root.
I’ve searched all over the OS for anything named database.sqlite but can’t find it anywhere.
I fully expect all my workflows are gone, but I’d love to know how this happened. So I don’t loose them again if I rebuild them all…