How to add pupeteer to my self hosted n8n

I searched the entire forum in search of a solution to the following problem: I would like to use the community module n8n-nodes-puppeteer but to do this, the appropriate modules must be installed in my docker container, otherwise it throws me a bunch of errors about their absence. So tell me how do I rebuild the conteiner or go into it and install all the necessary modules

Information on your n8n setup

  • n8n version: 1,65
  • **Database (default: SQLite): def
  • n8n EXECUTIONS_PROCESS setting (default: own, main): i dont understand what it means)))) i byu a vds and execute there))))
  • Running n8n via (Docker, npm, n8n cloud, desktop app): runing via docker compose
  • Operating system:Ubuntu 22/04
2 Likes

Hey @Alexandr_Tch , you can install the community node from Settings → Community nodes

Thanks for the answer))) This problem i can handle)))
But this node doesnt work from the box. i have to make custom docker image with additional modules for this node to work.

I’ve found out that i have to create Dockerfile and build new image but i need exact parameter because my tryes fails

FROM n8nio/n8n:latest
USER root
RUN apk add --update nodejs npm
RUN npm i puppeteer
RUN apk add --no-cache chromium
USER node

and ofcourse add to docker-compose parameters

- NODE_FUNCTION_ALLOW_EXTERNAL=puppeteer
  - PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser  - this doesnt work anyway

2 days ive sped for nothing
the reason, i just want to make a screenshots of the web sites

Hey man, I’m trying to make some screenshots too… did you get there?

i]ve almost get it but at last i found out there is problems with n8n node puppeteer it is too old too many errors to solve so i just leave it

@Alexandr_Tch I put together a Dockerfile that may help you out. Here is my repo.

Just create your .env file and it’s ready to go. I’ve already included a package.json to handle the n8n-nodes-puppeteer community node dependency.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.