
Self-hosting RabbitMQ the easy way
Yulei ChenRabbitMQ is one of the most popular open-source message brokers out there. It supports AMQP, MQTT, and STOMP, making it a solid backbone for microservices, background jobs, and event-driven architectures. Managed RabbitMQ services like CloudAMQP or Amazon MQ can get expensive quickly, especially when you need more connections or higher throughput.
Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get RabbitMQ up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.
Prerequisites
Before deploying, ensure you have a Sliplane account (free trial available).
Quick start
Sliplane provides one-click deployment with presets.
- Click the deploy button above
- Select a project
- Select a server. If you just signed up you get a 48-hour free trial server
- Click Deploy!
About the preset
The one-click deploy above uses Sliplane's RabbitMQ preset. Here's what it includes:
- The official image (
rabbitmq:4.3.2) - Specific version tag for stability (check Docker Hub for newer versions)
- Persistent storage mounted to
/var/lib/rabbitmq/so your queues, exchanges, and messages survive restarts - Custom admin credentials via
RABBITMQ_DEFAULT_USERandRABBITMQ_DEFAULT_PASSenvironment variables - AMQP access on port 5672
Next steps
Once RabbitMQ is running on Sliplane, connect your applications using the domain Sliplane provided (e.g. rabbitmq-xxxx.sliplane.app) or the internal service URL.
Default credentials
The preset generates a random username and password for you. You can find them in the environment variables of your service settings:
- Username: value of
RABBITMQ_DEFAULT_USER - Password: value of
RABBITMQ_DEFAULT_PASS
Use these to connect your applications via AMQP.
Note: The default
guest/guestaccount in RabbitMQ only works for localhost connections. That's why the preset sets up custom credentials for you.
Connecting your applications
Your applications running on Sliplane can connect to RabbitMQ using the internal service URL. The AMQP port is 5672. A typical connection string looks like:
amqp://USERNAME:PASSWORD@rabbitmq.internal:5672
Replace USERNAME and PASSWORD with the values from your environment variables. If you're using a library like amqplib (Node.js) or pika (Python), just pass the connection string and you're good to go.
Environment variables
Here are the key environment variables you can customize:
| Variable | Description |
|---|---|
RABBITMQ_DEFAULT_USER | Username for AMQP |
RABBITMQ_DEFAULT_PASS | Admin password |
RABBITMQ_DEFAULT_VHOST | Default virtual host (defaults to /) |
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS | Additional Erlang VM arguments |
See the official Docker image docs for the full list of supported environment variables.
Enabling additional plugins
RabbitMQ supports a wide range of plugins. To enable additional plugins, you can set the RABBITMQ_PLUGINS environment variable or use a custom enabled_plugins file. Common plugins include:
rabbitmq_mqttfor MQTT supportrabbitmq_stompfor STOMP supportrabbitmq_shovelfor moving messages between brokers
Logging
By default, RabbitMQ logs to STDOUT, which works perfectly with Sliplane's built-in log viewer. If you need more verbose output for debugging, set the RABBITMQ_LOG environment variable to debug. For general Docker log tips, check out our post on how to use Docker logs.
Cost comparison
Of course you can also self-host RabbitMQ with other cloud providers. Here is a pricing comparison for the most common ones:
| Provider | vCPU Cores | RAM | Disk | Estimated Monthly Cost | Notes |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 | charge per server |
| Render | 1 | 2 GB | 40 GB | ~$35–$45 | VM Small |
| Fly.io | 2 | 2 GB | 40 GB | ~$20–$25 | VM + volume |
| Railway | 2 | 2 GB | 40 GB | ~$15–$66 | Usage-based |
FAQ
What is RabbitMQ used for?
RabbitMQ is a message broker that sits between your services and handles asynchronous communication. Common use cases include background job processing, event-driven microservices, real-time notifications, and decoupling services so they can scale independently. If your app does anything that doesn't need an immediate response (sending emails, processing uploads, syncing data), RabbitMQ is a great fit.
How do I create queues and exchanges?
You can create them programmatically from your application code using any AMQP client library.
How do I update RabbitMQ?
Change the image tag in your service settings on Sliplane and redeploy. For example, update from 4.3.2 to a newer version. Check Docker Hub for the latest stable version. Always check the RabbitMQ release notes before upgrading to be aware of any breaking changes.
Are there alternatives to RabbitMQ?
Yes. Redis can handle basic pub/sub and queuing (we have a guide on setting up Redis with Docker Compose). Apache Kafka is better suited for high-throughput event streaming. NATS is a lightweight alternative for simple messaging. RabbitMQ strikes a good balance between features, reliability, and ease of use.
Can I use RabbitMQ with n8n or other automation tools?
Absolutely. Tools like n8n have built-in RabbitMQ nodes that let you trigger workflows from queue messages or publish messages to RabbitMQ as part of a workflow. Just point the integration at your RabbitMQ instance using the internal service URL and your credentials.