Recommended Approach: Use Team RabbitMQ’s APT Repository
The most reliable way to install RabbitMQ on Debian is by adding Team RabbitMQ’s official APT repository. This ensures access to the latest stable versions, timely security updates, and better compatibility with Debian’s package ecosystem. Standard Debian repositories often include outdated RabbitMQ versions (e.g., Debian 11 “Bullseye” ships with RabbitMQ 3.8.x, while the latest stable is 3.12.x+), which may lack critical bug fixes and features. Team RabbitMQ’s repository supports current Debian releases (Bullseye 11, Bookworm 12, Trixie 13) and provides automated dependency management.
Check Compatibility with Your Debian Version
RabbitMQ’s support for Debian aligns with the distribution’s End-of-Life (EOL) policy. For Debian 11 (Bullseye, EOL June 2026), Bookworm (12, EOL June 2027), and Trixie (13, EOL June 2028), Team RabbitMQ provides full package support. Older Debian versions (e.g., Stretch 9, Buster 10) are not officially supported, but you may attempt installation with backports or manual package downloads—though this is not recommended due to potential instability.
Ensure Correct Erlang/OTP Version
RabbitMQ requires Erlang/OTP to run, and version compatibility is critical. Modern RabbitMQ versions (3.13.0+) need Erlang/OTP 25.0 or higher, while older versions (3.12.x) support 23.3+. Standard Debian repositories often ship with outdated Erlang packages (e.g., Debian 11 includes Erlang 24.x, which may not work with the latest RabbitMQ). To get the correct Erlang version, add Team RabbitMQ’s Erlang repository (e.g., for Debian 11: deb https://packagecloud.io/rabbitmq/erlang/debian bullseye main) and use apt to install a compatible version. You can check your current Erlang version with erl -version.
Installation Steps Using Team RabbitMQ’s Repository
curl -sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null
/etc/apt/sources.list.d/ to include Team RabbitMQ’s repository. For Debian 11 (Bullseye):echo "deb [signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://packagecloud.io/rabbitmq/rabbitmq-server/debian bullseye main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
sudo apt update
sudo apt install rabbitmq-server
sudo systemctl status rabbitmq-server
rabbitmqctl status | grep "rabbitmq_version"
Alternative: Manual Installation (Not Recommended)
If you cannot use Team RabbitMQ’s repository (e.g., due to network restrictions), you can manually download .deb packages from the official RabbitMQ website. However, this method requires manual dependency resolution (e.g., using apt-get install -f to fix missing libraries) and does not receive automatic updates, making it less secure and harder to maintain.
Key Considerations for Long-Term Stability
unattended-upgrades for RabbitMQ and Erlang to ensure you receive security patches promptly./etc/rabbitmq/) and data directories to avoid data loss.