install nodejs
nodejs download and install for ubuntu
install dependencies
sudo apt install python3-distutilsinstall puppetter
npm install puppeteerinstall xvfb to run in memory display server
sudo apt-get install xvfbrun your puppeteer script via xvfb
xvfb-run --auto-servernum node index.jsXvfb
Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output source wikipedia - Xvfb