Docker

Host RabbitMQ (Docker) on VeloxaHost

RabbitMQ is a message broker: applications publish messages to it over AMQP and workers consume them from queues, so slow jobs leave the request path. This app runs the official RabbitMQ 4 image with the management plugin as a lightweight application container, for development, staging and small background-job setups.

The one-click deploy pulls rabbitmq:4-management, the current 4.x series with the management plugin, and starts it with 1 vCPU, 512 MB of memory and a 5 GB disk. AMQP listens on port 5672 and the management interface on 15672. Messages, queues and users are stored in /var/lib/rabbitmq.

Signing in

The deploy form sets RABBITMQ_DEFAULT_USER to admin and RABBITMQ_DEFAULT_PASS to a placeholder. Leave the placeholder and VeloxaHost generates a random password and shows it on the server page; or type your own. Because a default user is set, the image never creates the guest/guest account, which the official image would otherwise let sign in from any address.

Create separate users for your applications rather than sharing the administrator, from the management UI or the Terminal button, which opens bash in the container:

rabbitmqctl add_user orders 'another-long-password'
rabbitmqctl set_permissions -p / orders "^orders\." "^orders\." "^orders\."

Sizing

RabbitMQ blocks publishers when its memory use reaches the high watermark, by default 60% of the memory it detects. RabbitMQ's docs warn that a node in a container does not always detect its memory limit, and recommend an absolute value in containers. From the terminal, rabbitmqctl set_vm_memory_high_watermark absolute 600MB sets it for a 1 GB container until the next restart. RabbitMQ also stops accepting messages when free disk drops below its limit.

Queues that are drained quickly need little; queues that build up hold messages in memory and on disk. Start at 1 GB, which you can raise on the running container from the server page without a restart.

Reaching it

Private networks are not available in US East yet, and servers cannot reach each other over the host's bridge, so producers and consumers on other servers connect through the shared IPv4 address. Forward a port from the server's block (10 ports by default) to 5672, and another to 15672 for the management UI. Both are then public: attach a VeloxaHost firewall that allows only your own servers and addresses. AMQP here is not encrypted, so keep sensitive payloads on the same server as the broker where you can.

Install it yourself

On an Ubuntu 24.04 server where you want Docker and full control of the configuration:

  1. Turn on Docker support on the server page, then install Docker.
    apt install -y docker.io
    
  2. Start RabbitMQ 4 with a fixed hostname, since RabbitMQ names its data directory after the node name.
    docker run -d --name rabbit --hostname rabbit --restart=always \
      -p 5672:5672 -p 15672:15672 -v rabbitdata:/var/lib/rabbitmq \
      -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS='a-long-random-password' \
      rabbitmq:4-management
    
  3. Check the node is running.
    docker exec rabbit rabbitmq-diagnostics status
    
  4. Put permanent settings such as vm_memory_high_watermark.absolute in a file mounted into /etc/rabbitmq/conf.d/.
  5. Forward ports from your block to 5672 and 15672, and open the UI.

FAQ

How do I update RabbitMQ?

A deployed container keeps the image it was created from. To move to a newer 4.x release, export definitions, deploy the app again (it pulls the current rabbitmq:4-management), import them and switch clients over once the old queues are empty. In the Docker route above, docker pull and re-create the container with the same volume and hostname. RabbitMQ's release information page lists how long each series gets community fixes.

How do I back up RabbitMQ?

Definitions (users, vhosts, queues, exchanges, policies) export as JSON from the management UI or with rabbitmqctl export_definitions /var/lib/rabbitmq/defs.json. Messages are transient by nature, so also schedule server snapshots (hourly to weekly, kept 1 to 30 days) if queued messages matter.

What license is RabbitMQ under?

The Mozilla Public License 2.0. Broadcom also sells commercial support, with longer support windows for older series.

Which VeloxaHost size fits it?

The recommended 1 vCPU and 1 GB of RAM is a Veloxa Nano: 1 vCPU, 1 GB RAM and 25 GB of disk for $4 a month, billed at $0.01 an hour and capped at the monthly price.