Install Xvfb
# install
sudo apt-get install xvfb x11-apps x11-xkb-utils libx11-6 libx11-xcb1
# run xvfb
Xvfb :10.0 -screen 0 1024x768x16 &
Use in puppeteer
const browser = await puppeteer.launch({
……
env: {
DISPLAY: ':10.0',
},
……
});