Skip to content

Commit b8db158

Browse files
committed
add: authentication warning for no-gui systems
1 parent 87c9de9 commit b8db158

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/guide/creating-your-bot/authentication.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ description: Authenticate your bot with WhatsApp
88

99
By default, whatsapp-web.js does not save session information. This means that you would have to scan the QR-Code to reauthenticate every time you restart the client. If you'd like to persist the session, you can pass an `authStrategy` as a client option. The library provides a few authentication strategies to choose from, but you can also choose to extend them or build your own.
1010

11+
::: warning
12+
To ensure proper functioning of Puppeteer on **no-gui systems**, include the ``no-sandbox flag`` into the launch command within the configuration. Additionally, if your program runs with root privileges, remember to include the ``--disable-setuid-sandbox`` flag, as Chromium doesn't support running as root without a sandbox by default due to security reasons:
13+
```js {2-4}
14+
const client = new Client({
15+
puppeteer: {
16+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
17+
}
18+
});
19+
```
20+
:::
21+
1122
::: tip
1223
For most usage cases, we would recommend the [`LocalAuth` strategy](#localauth-strategy) because it is the easiest to use. However, you can also use the [RemoteAuth strategy](#remoteauth-strategy) for more flexibility and customization.
1324
:::

0 commit comments

Comments
 (0)