AcademyWorkflowsDevelopment

Install and Update npm Packages in Self-Hosted n8n

Developers and IT operations teams who maintain a self-hosted n8n instance.

  • Recommendedour rating
  • 3,154views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

automate-npm-package-installation-and-updates-for-self-hosted-environments.json

Loading the file...

What it does

An n8n workflow for self-hosted instances that installs npm packages into the n8n container so Code nodes can use them. It installs only the packages that are missing and runs on a daily schedule, on manual start, and when n8n starts. You list the packages in one node and allow them with an environment variable.

Use cases

  1. 01Install axios so Code nodes can call HTTP APIs
  2. 02Keep a list of approved npm packages in one place
  3. 03Restore packages after an n8n upgrade

Questions about
Install and Update npm Packages in Self-Hosted n8n.

What is Install and Update npm Packages in Self-Hosted n8n used for?

Developers and IT operations teams who maintain a self-hosted n8n instance. An n8n workflow for self-hosted instances that installs npm packages into the n8n container so Code nodes can use them. It installs only the packages that are missing and runs on a daily schedule, on manual start, and when n8n starts. You list the packages in one node and allow them with an environment variable.

How do I import Install and Update npm Packages in Self-Hosted n8n into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Install and Update npm Packages in Self-Hosted n8n safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.