"Need Assistance with Preserving Workflows After 'docker-compose down' Command"

"Hello everyone, how are you?

I’m using this YAML file, and every time I run the ‘docker-compose down’ command, I end up losing all of my workflows.

I’m not sure where I’m making mistakes. Could someone provide me with assistance to set up the installation correctly?"

```yaml
version: "3"

volumes:
  n8n_storage:

services:
  n8n:
    image: n8nio/n8n
    restart: always
    container_name: n8n
    ports:
      - "5678:5678"
    environment:
      - N8N_PAYLOAD_SIZE_MAX=8192
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=admin
      - N8N_HOST=ip_da_vps
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=168
      - EXECUTIONS_DATA_PRUNE_MAX_COUNT=50000
      - DB_SQLITE_VACUUM_ON_STARTUP=true
    volumes:
      - n8n_storage:/home/node/.n8n_storage
      - /local-files:/files

nano .env

Cole o seguinte conteúdo:

DATA_FOLDER=/root/n8n/
DOMAIN_NAME=meudominio.com.br
SUBDOMAIN=workflow
GENERIC_TIMEZONE=America/Sao_Paulo
[email protected]

mkdir /root/n8n/

Hi @Sarreta :wave: Sounds like you don’t have your Docker container set up to persist your database - you can find some documentation on that here :slight_smile:

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