Skip to main content

System Requirements

Before installing Baileys, ensure your system meets these requirements:
  • Node.js: Version 20.0.0 or higher
  • Package Manager: npm, yarn, pnpm, or bun
  • Operating System: Linux, macOS, or Windows
Baileys requires Node.js 20+ due to its use of modern JavaScript features and native modules.

Installing Baileys

Choose your preferred package manager to install Baileys:

Edge Version (Latest Features)

If you want the latest features and fixes (with no stability guarantee), install directly from GitHub:
The edge version may contain breaking changes and unstable features. Use in production at your own risk.

Optional Dependencies

Baileys has several optional dependencies that enable additional features: To generate link previews in messages:

Media Thumbnail Generation

For automatic thumbnail generation in images and stickers, install one of:
sharp is faster and more memory efficient, but requires native compilation. jimp is pure JavaScript and works everywhere.

Video Thumbnail Generation

For video thumbnails, install ffmpeg on your system:

Audio Processing

For audio format conversion (optional):

TypeScript Setup

Baileys is written in TypeScript and includes full type definitions. For TypeScript projects, no additional setup is required.

Importing in Your Project

Verification

Verify your installation by creating a simple test file:
test.ts
Run it:
You should see:

Breaking Changes Notice

Version 7.0.0 introduced multiple breaking changes. If you’re upgrading from an earlier version, check the migration guide.

Next Steps

Quick Start Guide

Create your first connection and send a message

Authentication

Learn about authentication and session management

Socket Configuration

Explore all available configuration options

Example Code

View the complete example implementation