Error on running on docker-composer

Hi dear friends

I install n8n on my server via docker-composer
I mistakenly run :
docker-compose down
on my root directory and my n8n server stopped.

Now, when I try to run my n8n again:
docker-compose up -d

it show bellow error:

Creating root_traefik_1 … error
Creating root_n8n_1 …

ERROR: for root_traefik_1 Cannot start service traefik: error while creating mount source path ‘/local-files’:Creating root_n8n_1 … error

ERROR: for root_n8n_1 Cannot start service n8n: error while creating mount source path ‘/local-files’: mkdir /local-files: read-only file system

ERROR: for traefik Cannot start service traefik: error while creating mount source path ‘/local-files’: mkdir /local-files: read-only file system

ERROR: for n8n Cannot start service n8n: error while creating mount source path ‘/local-files’: mkdir /local-files: read-only file system
ERROR: Encountered errors while bringing up the project.

Can anyone help me to run my server again please.
Best regards;

And also does anyone know where can I find my .json files?

What do you mean with your JSON files? Do you mean the workflows?

If so, and you were using SQLite (the default database), that’s persisted in the .n8n folder. Where is that folder? It depends on what you set the env variable DATA_FOLDER. If you did not set the env variable, it took the default value /root/n8n/.

1 Like

Thanks for responding.

Yes, Exactly. I want to find my workflows.

Infact this is my docker-compose.yml:

version: "3"

services:
  traefik:
    image: "traefik"
    command:
      - "--api=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
      - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
    ports:
      - "443:443"
    volumes:
      - ${DATA_FOLDER}/letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /local-files:/files

  n8n:
    image: n8nio/n8n
    ports:
      - "127.0.0.1:5678:5678"
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=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
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - VUE_APP_URL_BASE_API=https://${SUBDOMAIN}.${DOMAIN_NAME}/
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${DATA_FOLDER}/.n8n:/root/.n8n
      - /local-files:/files

and in my root folder I just have:
root>n8n>letsencrypt>acme.json

Could you have any opinion about my error please?

You can remove the line - /local-files:/files from the traefik configuration. It is not used anyway. You can probably also remove it from the n8n configuration unless you really have planned to save files there. If you want to, then you should also change it to a valid path. I guess that the folder /local-files does not exist and it can not be created.

You workflows are saved in the folder to which the variable DATA_FOLDER is set to. You will probably find that information in the .env file.

1 Like