Install MongoDB Compass on CentOS 8 – Quick Steps to Get the GUI Running
MongoDB Compass is a handy visual tool for working with your databases, but it’s not officially packaged for CentOS 8. Below you’ll find a no‑frills walk‑through that covers what you need to get it running and why each step matters.
1. Prepare the System
- Update the OS and install basic build tools:
sudo dnf update -y && sudo dnf groupinstall "Development Tools" -y
Compass depends on a few native libraries that pull in compiler headers; without them you’ll hit “missing dependency” errors straight away.
- Add the EPEL repo if it’s not already there:
sudo dnf install epel-release -y
2. Install Node.js (Optional but Handy)
Compass ships as an Electron app, and a recent Node runtime simplifies some of the bundled scripts.
curl -sL https://rpm.nodesource.com/setup_18.x | sudo bash - && sudo dnf install nodejs -y
3. Grab Compass
The MongoDB team publishes a generic Linux tarball. Download the latest release (replace X.Y.Z with the current version):
wget https://downloads.mongodb.com/compass/mongodb-compass-X.Y.Z.x86_64.tar.gz tar xf mongodb-compass-X.Y.Z.x86_64.tar.gz cd mongodb-compass-*/
4. Install Dependencies
Compass requires a handful of shared libraries that CentOS 8 ships in smaller versions.
sudo dnf install libX11-xcb.so.1 libxcb-render-util.so.0 -y
If you hit “cannot open shared object file” errors, look up the exact missing symbol and pull it from the corresponding package; I once had to dnf install xcb-util-image.
5. Run Compass
From the extracted directory run:
./bin/mongodb-compass
If you prefer a desktop shortcut, move the folder to /opt/ and create a .desktop file in ~/.local/share/applications/.
A Real‑World Glitch I’ve Encountered
I had a CentOS 8 VM with an outdated kernel. When launching Compass it crashed immediately citing “GTK error: Could not load resource”. Updating the system to 8.3 resolved that, proving that sometimes the issue isn’t in the installer at all but in the OS layer.
Is Compass Worth It on a Server?
If you’re running a headless CentOS server, installing Compass is probably overkill. The GUI consumes ~250 MB of RAM and pulls in Electron’s hefty runtime. For remote work, stick to mongo or a lightweight client like Robo 3T. But if you want that visual edge on a workstation, the steps above are solid.