Skip to main content
This guide provides comprehensive installation instructions for HiveMQ Community Edition across different platforms and deployment scenarios.

System Requirements

Java Requirements

Runtime: Java 11 or higher is required to run HiveMQ CE
Development: Java 21 or higher is required to build from source and run tests
Verify your Java installation:
java -version
If you need to install Java, we recommend Eclipse Temurin (formerly AdoptOpenJDK).

Hardware Requirements

ResourceMinimumRecommended
CPU1 core2+ cores
Memory512 MB RAM2 GB+ RAM
Disk Space100 MB1 GB+ (for data persistence)
NetworkPort 1883 accessibleMultiple ports for TLS/WebSocket

Supported Platforms

  • Linux (recommended for production)
  • macOS
  • Windows
  • Docker
  • Any platform with Java 11+ support

Installation Methods

Download Binary Package

This is the recommended method for most users.
1

Download the Latest Release

Download HiveMQ CE version 2025.5:
wget https://github.com/hivemq/hivemq-community-edition/releases/download/2025.5/hivemq-ce-2025.5.zip
Or download manually from the GitHub Releases page.
2

Extract the Archive

Linux/macOS
unzip hivemq-ce-2025.5.zip
cd hivemq-ce-2025.5
Windows (PowerShell)
Expand-Archive -Path hivemq-ce-2025.5.zip -DestinationPath .
cd hivemq-ce-2025.5
3

Verify Installation

Check the directory structure:
ls -la
You should see:
  • bin/ - Startup scripts and JAR file
  • conf/ - Configuration files
  • data/ - Data persistence directory
  • extensions/ - Extensions directory
  • log/ - Log files
4

Start HiveMQ CE

./bin/run.sh
On Windows, you may need to run the command prompt as Administrator for optimal performance.

Directory Structure

hivemq-ce-2025.5/
├── bin/
│   ├── run.sh              # Linux/macOS startup script
│   ├── run.bat             # Windows startup script
│   ├── diagnostics.sh      # Diagnostics tool
│   └── hivemq.jar          # Main application JAR
├── conf/
│   ├── config.xml          # Main configuration file
│   ├── logback.xml         # Logging configuration
│   └── examples/           # Configuration examples
├── data/                   # Persistence data (created on first run)
├── extensions/             # Extensions directory
│   └── hivemq-allow-all-extension/  # Default extension
├── log/                    # Log files (created on first run)
└── third-party-licenses/   # License information

Platform-Specific Instructions

Linux Installation

1

Install Java

Ubuntu/Debian:
sudo apt update
sudo apt install openjdk-11-jre
RHEL/CentOS/Fedora:
sudo yum install java-11-openjdk
2

Create HiveMQ User (Optional)

sudo useradd -r -s /bin/false hivemq
3

Install HiveMQ CE

cd /opt
sudo wget https://github.com/hivemq/hivemq-community-edition/releases/download/2025.5/hivemq-ce-2025.5.zip
sudo unzip hivemq-ce-2025.5.zip
sudo chown -R hivemq:hivemq hivemq-ce-2025.5
4

Create systemd Service

Create /etc/systemd/system/hivemq.service:
[Unit]
Description=HiveMQ Community Edition
After=network.target

[Service]
Type=simple
User=hivemq
Group=hivemq
WorkingDirectory=/opt/hivemq-ce-2025.5
ExecStart=/opt/hivemq-ce-2025.5/bin/run.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable hivemq
sudo systemctl start hivemq
sudo systemctl status hivemq

macOS Installation

1

Install Java

Using Homebrew:
brew install openjdk@11
2

Install HiveMQ CE

cd ~/Applications
wget https://github.com/hivemq/hivemq-community-edition/releases/download/2025.5/hivemq-ce-2025.5.zip
unzip hivemq-ce-2025.5.zip
cd hivemq-ce-2025.5
3

Start HiveMQ CE

./bin/run.sh

Windows Installation

1

Install Java

Download and install Java from Adoptium.
2

Extract HiveMQ CE

Extract hivemq-ce-2025.5.zip to C:\hivemq-ce-2025.5
3

Run as Administrator

Right-click Command Prompt and select “Run as Administrator”:
cd C:\hivemq-ce-2025.5
bin\run.bat
4

Create Windows Service (Optional)

You can use tools like NSSM to run HiveMQ CE as a Windows service.

Initial Configuration

After installation, configure HiveMQ CE by editing conf/config.xml.

Basic Configuration

The default configuration enables MQTT on port 1883:
<?xml version="1.0"?>
<hivemq>
    <listeners>
        <tcp-listener>
            <port>1883</port>
            <bind-address>0.0.0.0</bind-address>
        </tcp-listener>
    </listeners>
</hivemq>

Add WebSocket Listener

<hivemq>
    <listeners>
        <tcp-listener>
            <port>1883</port>
            <bind-address>0.0.0.0</bind-address>
        </tcp-listener>
        
        <websocket-listener>
            <port>8000</port>
            <bind-address>0.0.0.0</bind-address>
            <path>/mqtt</path>
            <subprotocols>
                <subprotocol>mqttv3.1</subprotocol>
                <subprotocol>mqtt</subprotocol>
            </subprotocols>
            <allow-extensions>false</allow-extensions>
        </websocket-listener>
    </listeners>
</hivemq>

Add TLS Listener

<tls-tcp-listener>
    <port>8883</port>
    <bind-address>0.0.0.0</bind-address>
    <tls>
        <keystore>
            <path>/path/to/keystore.jks</path>
            <password>keystore-password</password>
            <private-key-password>key-password</private-key-password>
        </keystore>
        <truststore>
            <path>/path/to/truststore.jks</path>
            <password>truststore-password</password>
        </truststore>
        <client-authentication-mode>NONE</client-authentication-mode>
    </tls>
</tls-tcp-listener>
Check the conf/examples/ directory for more configuration examples.

Verifying Installation

Check HiveMQ is Running

netstat -an | grep 1883
You should see:
tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN

Test with Mosquitto Client

mosquitto_pub -h localhost -t test/topic -m "HiveMQ CE is running!"
mosquitto_sub -h localhost -t test/topic

Check Logs

View the log files in the log/ directory:
tail -f log/hivemq.log

Firewall Configuration

Linux (UFW)

sudo ufw allow 1883/tcp comment 'HiveMQ MQTT'
sudo ufw allow 8000/tcp comment 'HiveMQ WebSocket'
sudo ufw allow 8883/tcp comment 'HiveMQ MQTT TLS'

Linux (firewalld)

sudo firewall-cmd --permanent --add-port=1883/tcp
sudo firewall-cmd --permanent --add-port=8000/tcp
sudo firewall-cmd --permanent --add-port=8883/tcp
sudo firewall-cmd --reload

Windows Firewall

New-NetFirewallRule -DisplayName "HiveMQ MQTT" -Direction Inbound -Protocol TCP -LocalPort 1883 -Action Allow
New-NetFirewallRule -DisplayName "HiveMQ WebSocket" -Direction Inbound -Protocol TCP -LocalPort 8000 -Action Allow

Performance Tuning

JVM Options

Edit the startup script to customize JVM options: Linux/macOS (bin/run.sh):
JAVA_OPTS="$JAVA_OPTS -Xmx4g -Xms4g"
Windows (bin/run.bat):
set "JAVA_OPTS=%JAVA_OPTS% -Xmx4g -Xms4g"
JAVA_OPTS="-Xmx4g -Xms4g"
JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC"
JAVA_OPTS="$JAVA_OPTS -XX:MaxGCPauseMillis=100"
JAVA_OPTS="$JAVA_OPTS -XX:+ParallelRefProcEnabled"

Troubleshooting

Java Not Found

Error: ERROR! You do not have the Java Runtime Environment installed Solution: Install Java 11 or higher and ensure it’s in your PATH.

Insufficient Java Version

Error: ERROR! HiveMQ requires at least Java version 11 Solution: Update to Java 11 or higher.

Port Already in Use

Error: Port 1883 is already in use Solution:
  • Find the process using the port: lsof -i :1883 (Linux/macOS) or netstat -ano | findstr :1883 (Windows)
  • Change the port in conf/config.xml

Permission Denied (Linux)

Error: Permission denied when starting HiveMQ Solution:
chmod +x bin/run.sh

Heap Dump on OutOfMemory

HiveMQ CE automatically creates heap dumps on OutOfMemoryError. Find them in the HiveMQ home directory:
  • heap-dump.hprof
  • hs_err_pid<pid>.log

Next Steps

Configuration

Configure listeners, security, MQTT settings, and more

Extensions

Extend HiveMQ CE with custom functionality

Monitoring

Monitor HiveMQ CE with JMX and metrics

Security

Configure TLS, authentication, and authorization

Build docs developers (and LLMs) love