[{"data":1,"prerenderedAt":197},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-rabbitmq-vps-message-broker-ma-en":6,"promo-bar-likely":196},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-rabbitmq-vps-message-broker-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":32,"intro":35,"keyPoints":36,"sections":37,"ctaTitle":126,"ctaBody":127,"ctaButton":128,"ctaUrl":129,"relatedPosts":130},586,"self-host-rabbitmq-vps-message-broker",{"fr":12,"en":10,"ar":13,"es":14},"self-host-rabbitmq-vps","استضافة-rabbitmq-على-vps","autoalojar-rabbitmq-vps-broker-mensajes","RabbitMQ on a VPS: message queues for your applications","Install RabbitMQ on a VPS with Docker Compose: job queues for Laravel, Django and Node.js, an HTTPS console and a private AMQP port.",7,0,false,"2026-11-19T00:00:00+00:00","2026-11-20T14:16:43+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[28],{"id":17,"name":23,"slug":24,"color":25,"icon":26},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-rabbitmq-vps-poster.svg",{"categorySlug":33,"appSlug":34},"development","rabbitmq","A page that generates an invoice, sends three emails and resizes a photo before answering always ends up timing out at the worst moment. The classic fix is to hand those tasks to a message queue: the application drops the work, workers process it in the background, and nothing is lost if one of them crashes. RabbitMQ is the most widely used open-source message broker for the job. This guide installs it on a VPS with Docker Compose, publishes its management console over HTTPS behind nginx, keeps the AMQP port private and connects Laravel, Django or Node.js to it.",[],[38,42,52,85,88,104,108,111,114,117,120,123],{"type":39,"title":40,"body":41},"h2","What RabbitMQ does","RabbitMQ is an open-source message broker (MPL-2.0 licence) written in Erlang. Applications send it messages over the AMQP protocol; it stores them in queues, keeps them on disk when asked to, and hands them to consumers that acknowledge them once processed. An unacknowledged message — because the worker crashed — is redelivered to another one. Between the application and the queues, exchanges route each message to one queue, several, or every queue subscribed to it.",{"type":43,"title":44,"items":45},"ul","What RabbitMQ gives you",[46,47,48,49,50,51],"**Pages that answer fast** — slow tasks go to a queue instead of blocking the request.","**No lost jobs** — durable queues and acknowledgements: a crashing worker makes nothing disappear.","**Spikes absorbed** — messages wait in the queue while workers catch up.","**Decoupled services** — an event published once, received by every service that needs it.","**A web console** — queues, rates, consumers and pending messages at a glance.","**Every language** — PHP, Python, Java, Node.js, .NET, Go and Ruby all have an AMQP client.",{"type":53,"title":54,"headers":55,"rows":59},"comparison","Redis, RabbitMQ or Kafka for your messages",[5,56,57,58],"Redis (list or stream)","RabbitMQ","Kafka",[60,65,70,75,80],[61,62,63,64],"Typical use","Cache, small job queue","Job queues and event routing","Very high-volume event log",[66,67,68,69],"Acknowledgement and redelivery","Handled in the application","Built in","Through read offsets",[71,72,73,74],"Routing","Simple","Direct, topic, fanout, headers exchanges","By topic and partition",[76,77,78,79],"Management console","None out of the box","Included (management plugin)","Third-party tools",[81,82,83,84],"Memory at rest","A few MB","About 150 MB","Often more than 1 GB",{"type":39,"title":86,"body":87},"Prepare the server","An Ubuntu 24.04 VPS with 2 GB of RAM suits most projects: RabbitMQ uses about 150 MB at rest, and it often shares the machine with the application and its workers. Install Docker and the Compose plugin, and plan a subdomain, for example `rabbitmq.example.com`, pointing to the VPS: the management console must be served over HTTPS, since passwords travel through it. The AMQP port will never be published to the Internet.",{"type":89,"title":90,"steps":91},"steps","Install RabbitMQ with Docker Compose",[92,95,98,101],{"title":93,"body":94},"Prepare the folder and the .env file","A single secret: the password of the `admin` account, created on first start.\n```bash\nmkdir -p \u002Fopt\u002Frabbitmq && cd \u002Fopt\u002Frabbitmq\ncat > .env \u003C\u003CEOF\nRABBITMQ_PASSWORD=$(openssl rand -hex 16)\nEOF\nchmod 600 .env\n```",{"title":96,"body":97},"Write the docker-compose.yml file","A single service, the official image with the management console. Both ports are only published on the loopback: the console (15672) will go through nginx, and AMQP (5672) stays reserved for the VPS. The fixed `hostname` matters: RabbitMQ stores its data under its node name, and a container recreated under another name would start from an empty database.\n```yaml\nservices:\n  rabbitmq:\n    image: rabbitmq:4.4-management-alpine\n    hostname: rabbitmq\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:15672:15672\"\n      - \"127.0.0.1:5672:5672\"\n    environment:\n      RABBITMQ_DEFAULT_USER: admin\n      RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}\n    volumes:\n      - rabbitmq-data:\u002Fvar\u002Flib\u002Frabbitmq\n    networks:\n      - rabbitmq\n    healthcheck:\n      test: [\"CMD\", \"rabbitmq-diagnostics\", \"-q\", \"check_port_connectivity\"]\n      interval: 30s\n      timeout: 10s\n      retries: 5\nnetworks:\n  rabbitmq:\n    name: rabbitmq\nvolumes:\n  rabbitmq-data: {}\n```",{"title":99,"body":100},"Start and check","RabbitMQ answers in about fifteen seconds. The console API must return `200` with the `admin` account, and `401` without it.\n```bash\ndocker compose up -d\ndocker compose ps\ncurl -s -o \u002Fdev\u002Fnull -w '%{http_code}\\n' -u admin:\"$(grep RABBITMQ_PASSWORD .env | cut -d= -f2)\" \\\n  http:\u002F\u002F127.0.0.1:15672\u002Fapi\u002Foverview\n```",{"title":102,"body":103},"Check the account and the node","Only `admin` should be listed: as soon as `RABBITMQ_DEFAULT_USER` is set, the factory `guest` account is not created.\n```bash\ndocker compose exec rabbitmq rabbitmqctl list_users\ndocker compose exec rabbitmq rabbitmq-diagnostics status | head -n 20\n```",{"type":105,"title":106,"body":107},"tip","Keep AMQP private and one user per application","Never publish port 5672 on `0.0.0.0`: your applications reach it through the loopback or the Docker network, and an exposed broker attracts login attempts. And never give the `admin` account to an application: create its own vhost and user (next section), so that a leak stays confined to its space.",{"type":39,"title":109,"body":110},"Publish the console over HTTPS behind nginx","Get a certificate with certbot (`certbot certonly --nginx -d rabbitmq.example.com`), then declare a server block that forwards to local port 15672. The console and its API share the same address.\n```nginx\nserver {\n    listen 443 ssl;\n    server_name rabbitmq.example.com;\n    ssl_certificate     \u002Fetc\u002Fletsencrypt\u002Flive\u002Frabbitmq.example.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Frabbitmq.example.com\u002Fprivkey.pem;\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:15672;\n        proxy_set_header Host $host;\n        proxy_set_header X-Forwarded-Proto https;\n    }\n}\n```",{"type":39,"title":112,"body":113},"Create one vhost and one user per application","A virtual host is a sealed space: its queues, exchanges and permissions see nothing of the others. Create one per application, with a user that only has permissions on it. The same can be done in the Admin tab of the console.\n```bash\ndocker compose exec rabbitmq rabbitmqctl add_vhost shop\ndocker compose exec rabbitmq rabbitmqctl add_user app-shop '\u003Clong-password>'\ndocker compose exec rabbitmq rabbitmqctl set_permissions -p shop app-shop \".*\" \".*\" \".*\"\ndocker compose exec rabbitmq rabbitmqctl list_permissions -p shop\n```",{"type":39,"title":115,"body":116},"Connect Laravel, Django or Node.js","An application installed directly on the VPS connects to `127.0.0.1:5672`. For Laravel, the `laravel-queue-rabbitmq` package adds a queue driver; `php artisan queue:work rabbitmq` then starts the workers.\n```bash\ncomposer require vladimir-yuldashev\u002Flaravel-queue-rabbitmq\n\n# application .env\nQUEUE_CONNECTION=rabbitmq\nRABBITMQ_HOST=127.0.0.1\nRABBITMQ_PORT=5672\nRABBITMQ_USER=app-shop\nRABBITMQ_PASSWORD=\u003Clong-password>\nRABBITMQ_VHOST=shop\n```\n\nCelery, with Django or on its own, takes an AMQP URL. An application running in a container joins the `rabbitmq` network and targets the service name instead of `127.0.0.1`. Node.js (`amqplib`), Spring AMQP or .NET accept the same URL.\n```bash\n# settings.py (Django + Celery)\nCELERY_BROKER_URL = \"amqp:\u002F\u002Fapp-shop:\u003Clong-password>@127.0.0.1:5672\u002Fshop\"\n\n# containerised application: join the RabbitMQ network\ndocker network connect rabbitmq my-worker\n# then amqp:\u002F\u002Fapp-shop:\u003Clong-password>@rabbitmq:5672\u002Fshop\n```",{"type":39,"title":118,"body":119},"Watch the queues","A queue that keeps growing signals workers that are too slow or stopped. The console shows it in the Queues tab; on the command line, the same reading fits in one line: ready messages, messages being processed and number of consumers per queue.\n```bash\ndocker compose exec rabbitmq rabbitmqctl list_queues name messages_ready messages_unacknowledged consumers\n```\n\nFor long-term monitoring, the `rabbitmq_prometheus` plugin is already enabled in the official image: it serves its metrics on port 15692 of the container. Publish it as `127.0.0.1:15692:15692` and add it to the Prometheus targets to follow the queues in Grafana.",{"type":39,"title":121,"body":122},"Backup and upgrade","The whole state of RabbitMQ lives in the `rabbitmq-data` volume. Also export its definitions — users, vhosts, queues, exchanges and permissions — to a JSON file: that is what rebuilds a broker in seconds, with `rabbitmqctl import_definitions`.\n```bash\ncd \u002Fopt\u002Frabbitmq\ndocker compose exec rabbitmq rabbitmqctl export_definitions \u002Ftmp\u002Fdefinitions.json\ndocker compose cp rabbitmq:\u002Ftmp\u002Fdefinitions.json .\u002Fdefinitions-$(date +%F).json\n```\n\nBefore moving to a new series, enable the feature flags of the running version, read the release notes, then change the image tag and restart:\n```bash\ndocker compose exec rabbitmq rabbitmqctl enable_feature_flag all\ndocker compose pull && docker compose up -d\n```",{"type":39,"title":124,"body":125},"RabbitMQ in one click on ServOrbit","The ServOrbit Marketplace installs exactly this stack: the official `rabbitmq` image with its console, an `admin` account created with a generated password, the console published over HTTPS on a subdomain of your domain or on the VPS's free subdomain, and the AMQP port kept on the loopback. The password is shown in your client area; all that is left is to create your vhosts and connect your workers.","Reliable message queues for your applications","A ServOrbit Ubuntu 24.04 VPS with 2 GB of RAM is enough for RabbitMQ. One-click install from the Marketplace, HTTPS console on your domain or on the VPS's free subdomain, AMQP port kept private.","Install RabbitMQ","\u002Fapplications\u002Fdevelopment\u002Frabbitmq",[131,155,178],{"id":132,"slug":133,"slugs":134,"title":138,"excerpt":139,"readTime":140,"views":18,"isPinned":19,"noindex":19,"publishedAt":141,"updatedAt":142,"category":143,"categories":149,"featuredImage":29,"bgImage":30,"posterImage":151,"relatedSolution":152},58,"hosting-redis-on-a-vps",{"fr":135,"en":133,"ar":136,"es":137},"heberger-redis-vps","استضافة-redis-على-خادم-vps","alojar-redis-en-un-vps","Hosting Redis on a VPS: the complete guide","Deploy Redis on your Cloud VPS: RAM\u002FCPU requirements, security (ACL, TLS), RDB\u002FAOF persistence, troubleshooting, and high availability.",10,"2026-04-23T00:00:00+00:00","2026-09-08T21:59:59+00:00",{"id":144,"name":145,"slug":146,"color":147,"icon":148},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[150],{"id":144,"name":145,"slug":146,"color":147,"icon":148},"\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":153,"appSlug":154},"databases","redis-stack",{"id":156,"slug":157,"slugs":158,"title":162,"excerpt":163,"readTime":164,"views":165,"isPinned":19,"noindex":19,"publishedAt":166,"updatedAt":167,"category":168,"categories":173,"featuredImage":29,"bgImage":30,"posterImage":175,"relatedSolution":176},5,"deploying-laravel-on-a-vps-a-production-guide",{"fr":159,"en":157,"ar":160,"es":161},"deployer-laravel-vps","نشر-laravel-على-خادم-vps-دليل-الإنتاج","desplegar-laravel-en-un-vps","Deploying Laravel on a VPS: a production guide","Take Laravel to production on a VPS: PHP, workers, cache, database, reverse proxy and HTTPS configured cleanly.",4,1,"2026-02-09T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":164,"name":169,"slug":170,"color":171,"icon":172},"Development","developpement","bg-warning\u002F10 text-warning","dev",[174],{"id":164,"name":169,"slug":170,"color":171,"icon":172},"\u002Fblog\u002Fcovers\u002Fdeployer-laravel-vps-poster.svg",{"categorySlug":172,"appSlug":177},"laravel-stack",{"id":179,"slug":180,"slugs":181,"title":185,"excerpt":186,"readTime":187,"views":17,"isPinned":19,"noindex":19,"publishedAt":188,"updatedAt":189,"category":190,"categories":191,"featuredImage":29,"bgImage":30,"posterImage":193,"relatedSolution":194},44,"deploy-a-django-application-on-a-vps",{"fr":182,"en":180,"ar":183,"es":184},"deployer-django-vps","نشر-تطبيق-django-على-vps","desplegar-una-aplicacion-django-en-un-vps","Deploy a Django Application on a VPS","Deploy Django on a VPS: Gunicorn, Nginx, PostgreSQL, Docker, and SSL. A complete guide for Python developers who want to self-host.",3,"2026-05-07T00:00:00+00:00","2026-11-04T16:30:25+00:00",{"id":164,"name":169,"slug":170,"color":171,"icon":172},[192],{"id":164,"name":169,"slug":170,"color":171,"icon":172},"\u002Fblog\u002Fcovers\u002Fdeployer-django-vps-poster.svg",{"categorySlug":33,"appSlug":195},"django",true,1795186184189]