Skip to content

Installation

github-actions[bot] edited this page Dec 22, 2025 · 2 revisions

Installation

DisTube depends on several libraries and system tools to function correctly. This guide will walk you through setting everything up.

Requirements

  • Node.js: 22.12.0 or higher
  • discord.js: v14
  • @discordjs/voice: Required for audio handling
  • @discordjs/opus: Opus encoding/decoding
  • FFmpeg: Required for audio processing and filtering

1. Install via Package Manager

Install DisTube and its peer dependencies in your project:

# Using bun (recommended)
bun add distube @discordjs/voice @discordjs/opus

# Using npm
npm install distube @discordjs/voice @discordjs/opus

# Using yarn
yarn add distube @discordjs/voice @discordjs/opus

# Using pnpm
pnpm add distube @discordjs/voice @discordjs/opus

Tip

We recommend using Bun for faster installation and better performance.

2. Install FFmpeg

DisTube uses FFmpeg for audio processing. You must have it installed on your system and added to your PATH.

  • Windows: Download Guide
  • Linux (Ubuntu/Debian): sudo apt-get install ffmpeg
  • MacOS: brew install ffmpeg

Note

If the links above are unavailable, you can find static builds here.

Warning

Do NOT install the ffmpeg or ffmpeg-static npm packages, as they can cause stability and performance issues.

3. Encryption Libraries

Discord.js requires an encryption library for voice support. DisTube will work with any library supported by @discordjs/voice.

Check if your system supports aes-256-gcm natively:

require('node:crypto').getCiphers().includes('aes-256-gcm')

If it returns false, you must install one of the following:

# Using bun
bun add @noble/ciphers

# Using npm
npm install @noble/ciphers

Clone this wiki locally