n8n Installation mit Docker Compose, Let's Encrypt SSL Zertifikat und Basic Auth. Bei Systemen, die nicht direkt im Internet erreichbar sind, kann auch die HTTP Methode gewählt werden (dennoch nicht zu empfehlen).
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release sudo mkdir -m 0755 -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo mkdir -m 0755 -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo apt-get install docker-compose-plugin
Type: A Name: n8n IP address: <IP_OF_YOUR_SERVER>
/somedirectory/docker-compose.yml
Hier muss der DNS Provider entsprechend angepasst werden.
/somedirectory/n8n/.env
# Folder where data should be saved DATA_FOLDER=/root/n8n/ # The top level domain to serve from DOMAIN_NAME=example.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=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 used GENERIC_TIMEZONE=Europe/Berlin # The email address to use for the SSL certificate creation SSL_EMAIL=user@example.com
mkdir /somedirectory/n8n
sudo docker compose up -d
sudo docker compose up
sudo docker compose stop
docker pull library/traefik docker pull n8nio/n8n
# Stop current setup sudo docker compose stop # Delete it (will only delete the docker-containers, data is stored separately) sudo docker compose rm # Then start it again, in ingteractive mode to check for errors sudo docker compose up
Wenn alles fehlerfrei läuft, den Prozess mit STRG+C beenden und im Daemon Modus starten
sudo docker compose up -d