Discloud Docs
English
English
  • 👋Welcome
  • Suport
    • ☁️How to Host
      • 🤖Bots
        • 🔌Bot
        • 🧩VSCode Extension
        • ⌨️CLI
      • 🌎Website and APIs
        • 🔌Bot
        • 🧩VSCode Extension
        • ⌨️CLI
    • ⌨️Languages
      • 🟨JavaScript
        • 📄Create the package.json
      • 🐍Python
        • 📄Create the requirements.txt
      • ☕Java
      • 💎Ruby
        • 📄Create the Gemfile
      • 🐿️Go
      • 🐘Php
      • 🦀Rust
        • 📄Create the Cargo.toml
    • ⛓️Integrations
      • 🌐Your Own Domain
      • 🐙GitHub and GitLab
      • 🎧Lavalink
      • 💾Database
        • MongoDB Atlas (mLab)
    • ❓Frequently Asked Questions (FAQ)
      • How to compress my files?
      • Discloud ModMail (Ticket)
      • How do I get my bot's ID?
      • What is the main file?
      • Configuring Puppeteer
      • How to report an offender?
      • Why can't I access my website?
      • Very Heavy BOT
    • ⚒️Commands
      • How to get API token
      • How to integrate Github
    • 🤲Donations
  • configuration
    • ⚙️discloud.config
      • 📦APT (Install Packages)
      • 🏗️VERSION (Switch between Versions)
  • 🖥️local environment
    • ⚙️Install
      • 🟨JavaScript (NodeJS)
      • 🐍Python
      • 💎Ruby
      • 🦀Rust
  • API
    • 📡Using the API
    • 🔗Routes
  • About
    • 🎨Discloud Brand
      • Name origin
      • Visual Identity
  • 🔗Links
    • 🌎Website
    • 📊DisCloud Status
  • 📜Legal
    • 📄Terms of Service (TOS)
Powered by GitBook
On this page
  • Requirements
  • Add Puppeteer to APT of discloud.config
  • Configuring the Puppeteer
  • Configuration of dependencies that use Puppeteer
  • Configure whatsapp-web.js
Edit on GitHub
  1. Suport
  2. Frequently Asked Questions (FAQ)

Configuring Puppeteer

PreviousWhat is the main file?NextHow to report an offender?

Last updated 2 years ago

Requirements

  • RAM: 512 MB (recommended for basic tasks)

    • The ideal amount of RAM may vary depending on the specifics of each case.

Add Puppeteer to of

In the APT line, add the puppeteer package separated by comma and space after the already existing packages, as in the example below.

discloud.config
...
APT=tools, puppeteer
...

Configuring the Puppeteer

To ensure proper functioning of Puppeteer in a container, it is necessary to add the --no-sandbox argument in the puppeteer.launch(); statement, as shown in the following example:

const browser = await puppeteer.launch({
  args: ['--no-sandbox']
});

Configuration of dependencies that use Puppeteer

As whatsapp-web.js uses Puppeteer (for QR code generation and background interactions), it is necessary to add the --no-sandbox argument to the Puppeteer options, as in the following example:

const client = new Client({
	puppeteer: {
		args: ['--no-sandbox'],
	}
});

In case of insufficient RAM memory, the QR code may not appear in the Discloud logs. To solve this, increase the memory of your app as mentioned in the requirements above, so that Puppeteer works as expected.

Configure

❓
📝
📦
⚙️
⚙️
APT
discloud.config
whatsapp-web.js