LavinMQ installation guide
Supported platforms for LavinMQ include most Linux distributions, macOS, and Docker.
Latest stable version: v2.5.1
Check out the changelog for an overview of releases.
Installing LavinMQ on Debian/Ubuntu
Installation in Debian/Ubuntu is a one-step process using the package manager. LavinMQ releases are hosted in packagecloud.
curl -fsSL https://packagecloud.io/cloudamqp/lavinmq/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/lavinmq.gpg > /dev/null
. /etc/os-release
echo "deb [signed-by=/usr/share/keyrings/lavinmq.gpg] https://packagecloud.io/cloudamqp/lavinmq/$ID $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/lavinmq.list
sudo apt-get update
sudo apt-get install lavinmqInstall LavinMQ on macOS
macOS users can install LavinMQ with brew:
brew update
brew install cloudamqp/cloudamqp/lavinmqInstalling LavinMQ on Fedora
To install LavinMQ on Fedora systems, use the following commands:
sudo tee /etc/yum.repos.d/lavinmq.repo << 'EOF'
[lavinmq]
name=LavinMQ
baseurl=https://packagecloud.io/cloudamqp/lavinmq/fedora/$releasever/$basearch
gpgkey=https://packagecloud.io/cloudamqp/lavinmq/gpgkey
repo_gpgcheck=1
gpgcheck=0
EOF
sudo dnf install lavinmqRunning LavinMQ with Docker
Images are available on Docker Hub at cloudamqp/lavinmq
Fetch and run the latest version with:
docker run --rm -it -p 5672:5672 -p 15672:15672 -v /tmp/amqp:/var/lib/lavinmq cloudamqp/lavinmqDocker Compose
Here’s a minimal example of how to run LavinMQ with Docker Compose:
services:
lavinmq:
image: "cloudamqp/lavinmq:latest"
ports:
- 15672:15672 # HTTP
- 5672:5672 # AMQPStart the container by running:
docker compose upStart publishing and consuming messages at amqp://guest:guest@localhost, and access the management UI by visiting http://localhost:15672
Visit cloudamqp/lavinmq on Docker Hub to learn more.
Docker Compose multi-node LavinMQ cluster
Here’s an example on Running a multi-node LavinMQ cluster with Docker Compose.
How to build LavinMQ from source
LavinMQ is written in the Crystal programming language. To build LavinMQ, first install Crystal. This can be done for a number of platforms by following the instructions on the Crystal site.
Once Crystal is installed, clone the repo from GitHub and build it with:
git clone git@github.com:cloudamqp/lavinmq.git
cd lavinmq
make
sudo make installNow, LavinMQ is ready to be used. Check the version with:
lavinmq -v
# v2.5.1Hosted solutions
Don’t want to run LavinMQ yourself? CloudAMQP offers hosted LavinMQ clusters
Upgrading LavinMQ
Upgrading LavinMQ is generally a simple, safe and quick operation.
Debian/Ubuntu
sudo apt update
sudo apt install lavinmqOS X / brew
brew update
brew upgrade cloudamqp/cloudamqp/lavinmqDocker
docker-compose pull
docker-compose up -dRunning and configuring LavinMQ
To run LavinMQ, specify a data directory using the -D flag:
lavinmq -D /var/lib/lavinmqLavinMQ uses the following default ports for communication: 5672: AMQP (standard) 5671: AMQP with TLS/SSL 15672: Management interface (web UI)
The default user for LavinMQ has the username guest with a password set to
guest. This user can be deleted using the
lavinmqctl CLI or by using the management interface.
Additional users can be added in the same way.
More configuration options can be viewed with -h, and a configuration file can also be specified. See the configuration files documentation for more details (/etc/lavinmq/lavinmq.ini for Debian/Ubuntu machines).
Running LavinMQ as a service
In many cases, such as on Debian/Ubuntu, LavinMQ will be running as a service after it has been installed.
Stopping/starting/restarting can be done by using the service command:
sudo service lavinmq restartReady to take the next steps?
Managed LavinMQ instance via CloudAMQP
LavinMQ has been built with performance and ease of use in mind - we've benchmarked a throughput of about 1,000,000 messages/sec . You can try LavinMQ without any installation hassle by creating a free instance on CloudAMQP. Signing up is a breeze.
Get started with CloudAMQP ->Help and feedback
We welcome your feedback and are eager to address any questions you may have about this piece or using LavinMQ. Join our Slack channel to connect with us directly. You can also find LavinMQ on GitHub.