mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	n8n: refactor environmentfile (#6297)
* n8n: add config path * n8n: refactor servicefile to seperate env * n8n: refactor envfile * Update n8n.sh * Update n8n.json --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# Author: tteck (tteckster) | Co-Author: CrazyWolf13
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://n8n.io/
 | 
			
		||||
 | 
			
		||||
@@ -26,13 +26,22 @@ $STD npm install --global n8n
 | 
			
		||||
msg_ok "Installed n8n"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
HOST_IP=$(hostname -I | awk '{print $1}')
 | 
			
		||||
mkdir -p /opt
 | 
			
		||||
cat <<EOF >/opt/n8n.env
 | 
			
		||||
N8N_SECURE_COOKIE=false
 | 
			
		||||
N8N_PORT=5678
 | 
			
		||||
N8N_PROTOCOL=http
 | 
			
		||||
N8N_HOST=$HOST_IP
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
cat <<EOF >/etc/systemd/system/n8n.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=n8n
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
Environment="N8N_SECURE_COOKIE=false"
 | 
			
		||||
EnvironmentFile="/opt/n8n.env"
 | 
			
		||||
ExecStart=n8n start
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user