{"id":22177685,"url":"https://github.com/fauzaanu/puppeteer-server-guide","last_synced_at":"2025-03-24T18:25:36.775Z","repository":{"id":228474819,"uuid":"614479241","full_name":"fauzaanu/puppeteer-server-guide","owner":"fauzaanu","description":"Meant as a guide explaining how to run puppeteer on a linux server","archived":false,"fork":false,"pushed_at":"2023-03-15T17:03:39.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T23:15:48.593Z","etag":null,"topics":["puppeteer"],"latest_commit_sha":null,"homepage":"https://fauzaanu.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fauzaanu.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-03-15T17:03:35.000Z","updated_at":"2023-03-15T17:58:52.000Z","dependencies_parsed_at":"2024-03-19T01:11:46.275Z","dependency_job_id":null,"html_url":"https://github.com/fauzaanu/puppeteer-server-guide","commit_stats":null,"previous_names":["fauzaanu/puppeteer-server-guide"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauzaanu%2Fpuppeteer-server-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauzaanu%2Fpuppeteer-server-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauzaanu%2Fpuppeteer-server-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauzaanu%2Fpuppeteer-server-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fauzaanu","download_url":"https://codeload.github.com/fauzaanu/puppeteer-server-guide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245326681,"owners_count":20597077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["puppeteer"],"created_at":"2024-12-02T08:30:42.415Z","updated_at":"2025-03-24T18:25:36.753Z","avatar_url":"https://github.com/fauzaanu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# HOW TO RUN PUPPETEER ON SERVERS\n\nAs a guide for myself and others who may want to run puppeteer on a server, I have created this guide.\n\n1. The packages needed to run puppeteer on a server are:\n\n```\nsudo apt-get update\n\nsudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 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 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget npm\n```\n\n2. We should add nosandbox to the puppeteer launch options:\n\n```\nconst browser = await puppeteer.launch\n({args: ['--no-sandbox', '--disable-setuid-sandbox']});\n```\n\n3. If we are running on a non headless run this instead\n\n```\napt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 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 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget xvfb x11vnc x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps npm\n```\n\n4. Running in non headless mode\n\n```\nxvfb-run --server-args=\"-screen 0 1024x768x24\" node app.mjs\n```\n\nThis guide has not been tested as a launch script yet but these are some of the scripts I have used to run puppeteer on a server which I copy paste from my notion. I just wanted to keep them on github instead for the ease of sharing with others.\n\nI will test this as a server creation script next.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffauzaanu%2Fpuppeteer-server-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffauzaanu%2Fpuppeteer-server-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffauzaanu%2Fpuppeteer-server-guide/lists"}