Share your love
RabbitMQ Setup on Ubuntu 24.04 with Comprehensive Steps

This tutorial intends to teach you a Full RabbitMQ Setup on Ubuntu 24.04. RabbitMQ is a tool that helps different applications or services talk to each other by sending messages. It acts like a post office, where one service sends a message, and RabbitMQ makes sure it gets delivered to the right place. This helps systems work together smoothly, even if they’re running on different machines or at different times. It makes sure that messages are not lost and that everything runs more efficiently.
You can now proceed to the guide steps below on the Orcacore website to get started with RabbitMQ installation on Ubuntu 24.04.
Table of Contents
Full Steps For RabbitMQ Setup on Ubuntu 24.04
To complete RabbitMQ installation on Ubuntu 24.04, you must have SSH access to your Ubuntu system as a non-root user with sudo privileges. You can check for Adding a Sudo User on Ubuntu 24.04. Then, set up a basic UFW firewall on Ubuntu 24.04.
Also, you need a domain name that is pointed to your server’s IP address. Now follow the steps below to get started with RabbitMQ setup on Ubuntu 24.04.
You can also check for the Video Tutorial Here:
1. Install RabbitMQ Server with Cloudsmith Mirror
By using Cloudsmith mirrors, users can ensure that RabbitMQ’s external dependencies are more easily available, maintained, and up-to-date, which can improve the overall performance and reliability of RabbitMQ deployments.
In this article, we want to use Cloudsmith Mirror to set up RabbitMQ server on Ubuntu 24.04. To set up dependencies, run the following curl command:
curl -1sLf 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/setup.deb.sh' | sudo -E bash
Once it is completed, you will get the following output:

Then, use the following command to install RabbitMQ server on Ubuntu:
sudo apt install rabbitmq-server -y
2. Start and Enable RabbitMQ System Service
Once your installation is completed, you must start and enable your RabbitMQ service on Ubuntu 24.04 with the command below:
# sudo systemctl start rabbitmq-server
# sudo systemctl enable rabbitmq-server
Verify the RabbitMQ service is active and running on your Ubuntu system with the command below:
sudo systemctl status rabbitmq-server

Also, you can check for the default port of RabbitMQ server which is ‘5672‘:
sudo ss -tulpn

3. Configure RabbitMQ Plugins and Admin Account
By default, RabbitMQ uses a management plugin to enable access to the web management panel. You need to enable plugins by using the command below:
sudo rabbitmq-plugins enable rabbitmq_management
In your output, you will see:

Now you must create an Admin account for RabbitMQ with a strong password for it. To do this, you can run the command below:
sudo rabbitmqctl add_user adminuser StrongPassword
We create the Orca user:

Next, you must grant the user administrative privileges to your admin account. To do this, you can run the command below:
sudo rabbitmqctl set_user_tags adminuser administrator
Output:
Setting tags for user "orca" to [administrator] ...
Finally, grant the user full permissions to all RabbitMQ resources on the server with the command below:
sudo rabbitmqctl set_permissions -p / adminuser ".*" ".*" ".*"
Output:
Setting permissions for user "orca" in vhost "/" ...
4. Set up Nginx Reverse Proxy for RabbitMQ
In this step, we want to configure Nginx as a reverse proxy for the RabbitMQ server on Ubuntu 24.04. To do this, install Nginx, start and enable it by using the commands below:
# sudo apt install nginx -y
# sudo systemctl start nginx
# sudo systemctl enable nginx
Then, disable or remove the default Nginx configuration file with the following command:
sudo rm /etc/nginx/sites-enabled/default
Now you must create a new Nginx server block for RabbitMQ. To do this, you can use your desired text editor like Vi Editor or Nano Editor:
sudo vi /etc/nginx/sites-available/rabbitmq.conf
Add the following configuration to the file with your actual domain name:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:15672;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_http_version 1.1;
proxy_max_temp_file_size 0;
proxy_cache_bypass $http_upgrade;
}
}
Once you are done, save and close the file.
Next, enable your created Nginx config file with the following command:
sudo ln -s /etc/nginx/sites-available/rabbitmq.conf /etc/nginx/sites-enabled/
Check for Nginx syntax error:
sudo nginx -t
If everything is ok, you will see:

Finally, restart Nginx to apply the changes:
sudo systemctl restart nginx
Also, remember to allow port 80 through your UFW firewall on Ubuntu 24.04:
# sudo ufw allow 80
# sudo ufw reload
5. SSL Configuration for RabbitMQ Server (RabbitMQ Web Console Security)
Now for more security of the RabbitMQ server, you can use certbot to generate SSL certificates for your domain name. To do this, install certbot with the following command:
sudo snap install certbot --classic
Output:
certbot 3.2.0 from Certbot Project (certbot-eff✓) installed
Then, get your SSL certificates from Let’s Encrypt using your domain available in the Nginx virtual host configuration:
sudo certbot --nginx -d example.com
Answer the question, such as email address, accept the terms of services, once it is completed, you will get the following output:

You can also set up auto renewal SSL certificates with the command below:
sudo certbot renew --dry-run
Then, restart Nginx to apply the changes:
sudo systemctl restart nginx
Next, allow incoming connections to the HTTPS port 443:
# sudo ufw allow 443
# sudo ufw reload
Finally, restart RabbitMQ server to apply the changes:
sudo systemctl restart rabbitmq-server
6. Access RabbitMQ Web Console
At this point, you can access your RabbitMQ web dashboard on Ubuntu 24.04 by following the URL below in your web browser:
https://your-domain.com
You will see the RabbitMQ login console. Enter your Admin user credentials you have created above and click Login.

Now you should see your RabbitMQ web console on Ubuntu 24.04. You can click on Nodes to view your active node statistics.

That’s it, you are done with RabbitMQ Setup on Ubuntu 24.04. For more information, you can check the Official RabbitMQ Docs page.
Conclusion
At this point, you have learned to install and configure RabbitMQ on Ubuntu 24.04 and secure the web console access by generating the SSL certificate from Let’s Encrypt. Hope you enjoy it, please subscribe to us on Facebook, YouTube, and X.
Also, you may like to read the following articles:
Install Samba File Share on Ubuntu 24.04
Best Linux Desktop Distros for Teams to Access Remotely