For Ubuntu v24.04 servers (such as those provisioned by Laravel Forge), follow these steps to install Node, Puppeteer, Chromium, and the necessary system dependencies.
Note for Ubuntu v22.04 users: Replace libasound2t64 with libasound2 in the dependency list.
# Check if node and npm are installed
node -v && npm -v
# Install puppeteer
sudo npm install -g puppeteer
# Install chromium
npx puppeteer browsers install chrome
# Install dependencies
sudo apt update
sudo apt install libasound2t64 libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6