M/Monit is the central console for Monit: Monit runs on each host and reports status and events; M/Monit stores them, charts trends, and can drive alerts and remote actions. This guide covers a typical Linux x86_64 install under /opt, systemd supervision, firewalld or UFW, an optional Nginx reverse proxy, and the Monit set mmonit line that registers agents with the collector.
Monit-only (no central UI): see How to install and configure Monit on Rocky Linux 8.
Note: M/Monit is commercial software; distribution tarballs usually require a license (or trial) obtained from mmonit.com. On first start, a missing license may trigger a one-time HTTPS check to mmonit.com—plan accordingly on air-gapped networks.
What you will set up
| Piece | Role |
|---|---|
| M/Monit (port 8080 by default) | Web UI and collector endpoint (/collector) for Monit agents |
| Monit on each host | Local checks; set mmonit posts to M/Monit |
| Firewall | Allow 8080/tcp (or only 80/443 if everything goes through Nginx) |
| Nginx (optional) | DNS name, TLS, and hiding 8080 from browsers |
Official architecture summary: M/Monit manual (Monit agents → 8080/tcp UI/collector; M/Monit → Monit 2812/tcp for remote actions when configured).
Prerequisites
- 64-bit Linux (glibc) matching a tarball from M/Monit download
- root or sudo for
/opt, systemd, and firewall - A license file or acceptance of trial terms before production
1. Download and unpack
Pick the current mmonit-*-linux-x64.tar.gz from the download page (version in filenames changes often). Example:
| |
Upgrade tip: keep a symlink so systemd and Nginx do not need edits every release:
| |
Use /opt/mmonit in unit files below if you adopt the symlink.
The daemon binary is /opt/mmonit/bin/mmonit (adjust if you keep only a versioned directory). See mmonit -h on your tarball for flags supported in that build.
2. systemd service
Create /etc/systemd/system/mmonit.service. This pattern matches common installs: WorkingDirectory is the M/Monit home (contains conf/, db/, etc.):
| |
Reload and start:
| |
If the service exits immediately, run /opt/mmonit/bin/mmonit -id once in a terminal (foreground diagnostic mode per the manual) and read the error, or check /opt/mmonit/logs/ if present.
Hardening: the vendor recommends a dedicated UNIX account for M/Monit in production; chown the install tree and add User= / Group= once file permissions and writable db/ paths are aligned.
3. Firewall
firewalld (RHEL, Rocky, Alma, Fedora, …)
| |
UFW (Debian, Ubuntu, …)
| |
If you terminate TLS on Nginx and only expose 80/443, you can skip opening 8080 publicly and keep it bound to 127.0.0.1 (after editing conf/server.xml—see the manual’s Connector address / port).
4. First login (change defaults immediately)
Browse to http://SERVER_IP:8080/.
Built-in accounts (from M/Monit documentation):
| User | Default password | Typical use |
|---|---|---|
| admin | swordfish | Web UI administration |
| monit | monit | Often used in set mmonit http://monit:monit@HOST:8080/collector URLs |
Treat these as emergency defaults only. Change passwords under Admin → Users (or your version’s equivalent) before exposing the UI to a network.
5. Register Monit agents with M/Monit
On each host that runs Monit, edit /etc/monitrc (or /etc/monit/monitrc) near the top. Minimal pattern from the M/Monit manual (replace host, port, and credentials):
| |
192.168.1.10— M/Monit server (must match listener port, default 8080).192.168.1.101— this Monit host’s IP;2812is Monit’s control port for M/Monit → Monit actions.allowlines must permit M/Monit to reach Monit’s httpd with the given user:password.
Reload Monit:
| |
Hosts should begin appearing in the M/Monit UI after the next report cycle.
6. Optional: Nginx reverse proxy
Point monit.example.com at the M/Monit server, then install Nginx:
| |
Important: M/Monit’s default HTTP port is 8080. The upstream in proxy_pass must match whatever conf/server.xml defines (default 8080). An old proxy_pass http://127.0.0.1:8190 line is a common typo and will yield 502 Bad Gateway.
Example /etc/nginx/conf.d/mmonit.conf:
| |
Test and reload:
| |
Then open http://monit.example.com. For HTTPS, use Let’s Encrypt (certbot --nginx) or your PKI and add a listen 443 ssl server block.
Monit set mmonit URL: if you terminate TLS on Nginx, the collector URL Monit uses may need https://user:[email protected]/collector and a certificate Monit trusts—see the manual for TLS on the Monit side.
7. Change listening port or bind address
If 8080 clashes with another service, edit Connector port="8080" (and optionally address) in /opt/mmonit/conf/server.xml, then restart:
| |
Update firewall, Nginx proxy_pass, and every set mmonit URL accordingly.
Troubleshooting
| Issue | What to check | |
|---|---|---|
| 502 from Nginx | proxy_pass port; is **`ss -tlnp | grep mmonit`showing127.0.0.1:8080**? |
| Blank UI / license | License file path; outbound HTTPS for trial; journalctl -u mmonit | |
| Agents never appear | set mmonit URL, credentials, firewall 8080, Monit allow for M/Monit IP | |
| Cannot run actions from UI | Monit httpd reachable from M/Monit; allow user/password |
Conclusion
You can run M/Monit from the official tarball under /opt, supervise it with systemd, expose 8080 (or hide it behind Nginx on 80/443), and wire Monit using set mmonit …/collector. Rotate default passwords, align ports in server.xml, Nginx, and monitrc, and keep a current manual handy for TLS, external databases, and upgrades.