Help me to build docker image and set NODE_FUNCTION_ALLOW_EXTERNAL=indo-news-scraper

Could someone please show me how to enable NODE_FUNCTION_ALLOW_EXTERNAL=indo-news-scraper in n8n?

I’ve read the docs here: Enable modules in Code node | n8n Docs, but I’m still unsure where exactly to set the variable and how to rebuild the image with Docker.

Thanks in advance!

Hi Darfito_Danurdoro welcome to n8n community :n8n:

You can use a Dockerfile like this and modify the Docker Compose to utilize a build stage.

# Use the latest n8n image
FROM n8nio/n8n:latest

USER root

# Install any required packages
RUN npm install -g indo-news-scraper

USER node

docker-compose.yml

  restart: always
  build: .
  environment:

In your environment, you can specify settings like this to ensure all external packages you want to install are allowed.

    - NODE_FUNCTION_ALLOW_EXTERNAL=*

or per package

    - NODE_FUNCTION_ALLOW_EXTERNAL=indo-news-scraper

ok I still confused about which docker-compose and which dockerfile?

Your not using default docker to deploy you n8n instance? can you pass your config here?

i am using fork from the n8n repo because i want to build custom docker image.

and iam confuse which dockerfile that i have to modified? here i put the dockerfile structure

and I haven’t modified the docker-compose.yaml file at all.

You can follow from this guide:

ok so for example if I want to change the UI such as colors or others I have to fork the n8n repo and then build a custom docker image or I just follow the steps you have provided? honestly I’m confused and sorry about that.

If you wish to make changes to the code, please review the license documentation here:

For self-hosting, it entirely depends on your insight and expertise to understand the documentation. Please read the full guide here:

If you find that too challenging, you might consider using the n8n cloud version: