Files
ProxmoxVE/install/n8n-install.sh
CanbiZ (MickLesk) 667da6a8fb Install n8n past its unsatisfiable canvas dependencies (#18439)
n8n-nodes-base 2.46.0 moved @napi-rs/canvas-linux-arm64-musl and
-linux-x64-musl from optional into hard dependencies. npm enforces
os/cpu/libc on those, and no combination satisfies both arm64 and x64,
so every install fails with EBADPLATFORM. n8n 2.46.4 reached the latest
tag on 2026-11-03 and the failures started four minutes later.

--force skips the platform check. The matching gnu binary is still
installed through @napi-rs/canvas's own optional dependencies, so canvas
keeps working.
2026-11-04 10:22:46 +01:00

58 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
# 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
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
python3-setuptools \
graphicsmagick
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
msg_info "Installing n8n (Patience)"
# n8n-nodes-base 2.46.0 pins both @napi-rs/canvas musl binaries as hard
# dependencies, which no os/cpu/libc combination can satisfy. Drop --force
# once upstream makes them optional again.
$STD npm install -g n8n@latest --force
msg_ok "Installed n8n"
msg_info "Creating Service"
cat <<EOF >/opt/n8n.env
N8N_SECURE_COOKIE=false
N8N_PORT=5678
N8N_PROTOCOL=http
N8N_HOST=${LOCAL_IP}
EOF
cat <<EOF >/etc/systemd/system/n8n.service
[Unit]
Description=n8n
[Service]
Type=simple
EnvironmentFile=/opt/n8n.env
ExecStart=n8n start
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now n8n
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc