[Unit] Description=n8n workflow automation daemon After=syslog.target network.target mariadb.service [Service] Type=simple User={{ n8n_user }} Group={{ n8n_user }} EnvironmentFile={{ n8n_root_dir }}/etc/env ExecStart={{ n8n_root_dir }}/app/node_modules/n8n/bin/n8n PrivateTmp=yes {% if n8n_protect_system %} ProtectSystem=full {% endif %} ProtectHome=yes NoNewPrivileges=yes MemoryLimit=2048M Restart=on-failure StartLimitInterval=0 RestartSec=30 [Install] WantedBy=multi-user.target