Compare commits

...

3 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
4aa0426445 bump nodejs to 24 2026-02-24 10:24:52 +01:00
CanbiZ (MickLesk)
c1a03efb65 fixes 2026-02-24 10:24:15 +01:00
CanbiZ (MickLesk)
18491bd49d refactor(n8n): simplify update to npm update, clean install deps
Update script:
- Replace aggressive rm + npm install --force with npm update -g n8n
  which is the official recommended way to update n8n
- Keep legacy migration (env file) and ensure_dependencies

Install script:
- Remove unnecessary build-essential, python3, python3-setuptools
  (n8n ships pre-built binaries, no native compilation needed)
- Remove ca-certificates (already provided by base image)
- Remove patch-package (not used)
- Use npm install -g instead of --global for consistency

Closes #12250
2026-02-24 10:15:02 +01:00
2 changed files with 10 additions and 11 deletions

View File

@@ -27,7 +27,11 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
ensure_dependencies graphicsmagick
ensure_dependencies graphicsmagick
NODE_VERSION="24" setup_nodejs
msg_info "Updating n8n"
if [ ! -f /opt/n8n.env ]; then
sed -i 's|^Environment="N8N_SECURE_COOKIE=false"$|EnvironmentFile=/opt/n8n.env|' /etc/systemd/system/n8n.service
mkdir -p /opt
@@ -37,14 +41,12 @@ N8N_PORT=5678
N8N_PROTOCOL=http
N8N_HOST=$LOCAL_IP
EOF
systemctl daemon-reload
fi
NODE_VERSION="22" setup_nodejs
msg_info "Updating ${APP} LXC"
rm -rf /usr/lib/node_modules/.n8n-* /usr/lib/node_modules/n8n
$STD npm install -g n8n --force
$STD npm update -g n8n
systemctl restart n8n
msg_ok "Updated n8n"
msg_ok "Updated successfully!"
exit
}

View File

@@ -15,22 +15,19 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
ca-certificates \
build-essential \
python3 \
python3-setuptools \
graphicsmagick
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
NODE_VERSION="24" setup_nodejs
msg_info "Installing n8n (Patience)"
$STD npm install --global patch-package
$STD npm install --global n8n
$STD npm install -g n8n
msg_ok "Installed n8n"
msg_info "Creating Service"
mkdir -p /opt
cat <<EOF >/opt/n8n.env
N8N_SECURE_COOKIE=false
N8N_PORT=5678