Files
ProxmoxVE/install/n8n-install.sh
T

55 lines
1.0 KiB
Bash
Raw Normal View History

2023-03-22 20:48:20 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
2025-07-28 13:33:51 +02:00
# Author: tteck (tteckster) | Co-Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://n8n.io/ | Github: https://github.com/n8n-io/n8n
2023-03-22 20:48:20 -04:00
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2023-03-22 20:48:20 -04:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
2026-02-01 19:35:19 +01:00
python3-setuptools \
graphicsmagick
2023-03-22 20:48:20 -04:00
msg_ok "Installed Dependencies"
2026-02-24 11:54:02 +01:00
NODE_VERSION="24" setup_nodejs
2023-03-22 20:48:20 -04:00
msg_info "Installing n8n (Patience)"
2026-07-17 12:52:57 +02:00
$STD npm install -g n8n@latest
2023-03-22 20:48:20 -04:00
msg_ok "Installed n8n"
msg_info "Creating Service"
2025-07-28 13:33:51 +02:00
cat <<EOF >/opt/n8n.env
N8N_SECURE_COOKIE=false
N8N_PORT=5678
N8N_PROTOCOL=http
2026-01-19 16:33:08 +01:00
N8N_HOST=${LOCAL_IP}
2025-07-28 13:33:51 +02:00
EOF
2023-03-22 20:48:20 -04:00
cat <<EOF >/etc/systemd/system/n8n.service
[Unit]
Description=n8n
[Service]
Type=simple
2025-07-29 21:52:15 +02:00
EnvironmentFile=/opt/n8n.env
2023-03-22 20:48:20 -04:00
ExecStart=n8n start
2025-07-29 21:52:15 +02:00
2023-03-22 20:48:20 -04:00
[Install]
WantedBy=multi-user.target
EOF
2025-07-29 21:52:15 +02:00
systemctl enable -q --now n8n
2023-03-22 20:48:20 -04:00
msg_ok "Created Service"
motd_ssh
2023-05-15 07:39:30 -04:00
customize
cleanup_lxc