This can vary depending on the Linux distribution used. Before proceeding check the latest version of Docker Compose v1 on the repository's release page and replace the 1.29.2 below. Should you wish to use Docker Compose v2 instead you can find detailed instructions here in the Docker documentation.
If you are planning on reading/writing local files with n8n (for example, by using the Write Binary File node, you will need to configure a data directory for those files here. If you are running n8n as a root user, add this under volumes for the n8n service:
1
-/local-files:/files
If you are running n8n as a non-root user, add this under volumes for the n8n service:
1
-/home/<YOUR USERNAME>/n8n-local-files:/files
You will now be able to write files to the /files directory in n8n and they will appear on your server in either /local-files or /home/<YOUR USERNAME>/n8n-local-files, respectively.
# Folder where data should be savedDATA_FOLDER=/root/n8n/
# The top level domain to serve fromDOMAIN_NAME=example.com
# The subdomain to serve fromSUBDOMAIN=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=user
# The password to use for authentication - IMPORTANT ALWAYS CHANGE!N8N_BASIC_AUTH_PASSWORD=password
# Optional timezone to set which gets used by Cron-Node by default# If not set New York time will be usedGENERIC_TIMEZONE=Europe/Berlin
# The email address to use for the SSL certificate creationSSL_EMAIL=user@example.com
Note: If you want to use special characters in the password, use quotes. For example, N8N_BASIC_AUTH_PASSWORD="p@s$w0rd"