Deploying ElasticMQ as a Self-Hosted AWS SQS Alternative
Description and use
ElasticMQ is deployed via Docker and Traefik with TLS, a web UI, DLQs, and optional persistence. It is SQS‑compatible, enabling easy migration from AWS SQS and cost savings.
Problem
Need an inexpensive, self-hosted SQS-compatible queue for dev, test, or production without AWS costs and with control over infrastructure.
Outcome
ElasticMQ is successfully deployed behind Traefik with TLS, a web UI, DLQs, and persistence. It mimics SQS API, enabling easy migration and cost savings.
Workflow
- Create project directory and directories for data and LetsEncrypt
- Configure elasticmq.conf with domain, node-address, rest-sqs, queues, and aws settings
- Generate UI password hash with openssl and double $ characters
- Create .env with DOMAIN, UI_DOMAIN, LETSENCRYPT_EMAIL, UI_USERNAME, UI_PASSWORD_HASH
- Write docker-compose.yml defining traefik, elasticmq, and elasticmq-ui services with appropriate labels and networks
- Run docker compose up -d and verify containers are running
- Configure additional queues and DLQs by editing elasticmq.conf and restarting elasticmq
- Enable persistence by setting messages-storage.enabled=true and restarting elasticmq
- Verify deployment with curl and AWS CLI using placeholder credentials
- Exercise queue operations (create, send, receive, delete, list) via AWS CLI endpoint
- Plan migration from AWS SQS by mapping attributes, draining queues, dual-writing, and updating SDK endpoint_url
Evidence
ElasticMQ is an in-memory message queue with an SQS-compatible API, a lightweight alternative to AWS SQS for dev, test, or infrastructure-independent production use
Configure ElasticMQ. Replace DOMAIN-NAME
Enable Persistence by setting messages-storage.enabled=true
- Record date: 2026-09-08T12:30:26.224Z