n8n recommends self-hosting for expert users. Mistakes can lead to data loss, security issues, and downtime. If you aren't experienced at managing servers, n8n recommends n8n Cloud.
Stable and Beta versions
n8n releases a new minor version most weeks. The stable version is for production use. beta is the most recent release. The beta version may be unstable. To report issues, use the forum.
The way that you install Docker and Docker Compose depends on your Linux distribution. You can find specific instructions for each component in the links below:
Inside your project directory, create a directory called local-files for sharing files between the n8n instance and the host system (for example, using the Read/Write Files from Disk node):
mkdir local-files
The Docker Compose file below can automatically create this directory, but doing it manually ensures that it's created with the right ownership and permissions.
You can now reach n8n using the subdomain + domain combination you defined in your .env file configuration. The above example would result in https://n8n.example.com.
n8n is only accessible using secure HTTPS, not over plain HTTP.
If you have trouble reaching your instance, check your server's firewall settings and your DNS configuration.
# The subdomain to serve from
SUBDOMAIN=n8n
# The above example serve n8n at: https://n8n.example.com
# Optional timezone to set which gets used by Cron and other scheduling nodes
# New York is the default value if not set
GENERIC_TIMEZONE=Europe/Berlin
# The email address to use for the TLS/SSL certificate creation
The Docker Compose file above configures two containers: one for n8n, and one to run traefik, an application proxy to manage TLS/SSL certificates and handle routing.
It also creates and mounts two Docker Volumes and mounts the local-files directory you created earlier: