Script to automatically install custom modules, custom modules with unsafe permissions and whitelisted modules for functions according to set env variables.
The first of the directory specified in
N8N_CUSTOM_EXTENSIONS gets created and will be the install directory for custom modules (Delimiter
Custom modules are installed according to
Custom modules with unsafe-perms are installed according to
Custom modules for functions according to
NODE_FUNCTION_ALLOW_EXTERNAL (such as date-fns) will be installed to
/usr/local/lib “alongside of n8n” (Delimiter
Dockerfile (apk add + bash)
Modified entrypoint (execute install-custom-modules.sh)
Actual script (install-custom-modules.sh)
I had to insert script execution in the docker-entrypoint.sh, because the folder
/home/node/.n8n/custom needs to be created first.
I assume the concept is more valuable than my actual implementation right now, and a core dev should be able to figure out a more elegant way to implement it in live n8n. But if you wish, I can do a PR.