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:Optional Dependencies
Baileys has several optional dependencies that enable additional features:Link Preview Generation
To generate link previews in messages:Media Thumbnail Generation
For automatic thumbnail generation in images and stickers, install one of:- jimp (JavaScript)
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:- Ubuntu/Debian
- macOS
- Windows
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
Breaking Changes Notice
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