Open-source project
mongo-express/mongo-express avatar
mongo-express/mongo-express

mongo-express: a web admin UI for MongoDB, FerretDB and DocumentDB

Web-based MongoDB admin interface, written with Node.js and Express

5,983 stars1,027 forksJavaScriptMIT

At a glance

What is it?
mongo-express is a Node.js and Express web interface for browsing and editing MongoDB data. It installs from npm or Docker, ships with a default admin:pass login, and is still on a 1.1.0 release candidate line.
Who is it for?
Adopt mongo-express when you want a lightweight, browser-based view of MongoDB data, especially in a Docker network where the image defaults to mongodb://mongo:27017. Do not adopt it as a production write surface without setting ME_CONFIG_BASICAUTH_ENABLED, ME_CONFIG_SITE_SESSIONSECRET and ME_CONFIG_SITE_COOKIESECRET, and consider ME_CONFIG_OPTIONS_READONLY if the interface is only for inspection.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • mongo-express/mongo-express5,983 ★ · -2
Star history
Repository2026-09-232026-11-15
mongo-express/mongo-express6k6k

-2 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What mongo-express replaces, and for whom

mongo-express is a web-based admin interface for MongoDB and compatible services. The README names FerretDB and Amazon DocumentDB alongside MongoDB itself, which matters: the project talks the MongoDB driver protocol rather than depending on a server-side feature that only MongoDB Inc. ships. The package keywords include phpmyadmin, and that comparison is the clearest way to describe the audience. If you have used phpMyAdmin to inspect a MySQL schema, mongo-express is the same idea pointed at documents instead of rows.

The feature list is deliberately operational. You can connect to multiple databases, view, add and delete databases, and view, add, rename or delete collections. Documents can be viewed, added, updated and deleted. GridFS is supported for adding, getting and deleting very large files. Audio, video and image assets preview inline in the collection view. Nested or large objects collapse so a document stays readable. Properties above roughly 100KB are loaded asynchronously on demand, which the README describes as a way to keep the collection view fast.

It is for the person who needs to look at a document now, not for the person designing a schema. There is no aggregation pipeline builder in the feature list, no schema validation editor, no index advisor. What you get is a browser over the collections you already have.

How the Express app, config and sessions fit together

The repository is a Node.js application with Express at the centre. package.json lists express ^5.3.0, the mongodb driver ^7.7.0, bson ^7.3.3, express-session with memorystore, basic-auth-connect, csurf, express-rate-limit and a Bootstrap 5 front end built through webpack. The bin entry is ./app.js, so the CLI and the server are the same file.

Configuration flows from config.default.js. The README instructs you to copy that file to config.js and edit it, and the .env.example file states that every variable in it is read by config.default.js. Environment variables and the config file are therefore two views of one settings object, not competing systems. Docker leans on the environment variables because the Dockerfile sets ME_CONFIG_MONGODB_URL to mongodb://mongo:27017 and ME_CONFIG_MONGODB_ENABLE_ADMIN to true at image level.

Two secrets are separate from the MongoDB connection. ME_CONFIG_SITE_SESSIONSECRET signs the session cookie, and the README also asks for ME_CONFIG_SITE_COOKIESECRET. The .env.example ships ME_CONFIG_SITE_SESSIONSECRET as a placeholder value and says plainly not to ship the example as-is. Basic authentication is a third layer: ME_CONFIG_BASICAUTH_ENABLED, ME_CONFIG_BASICAUTH_USERNAME and ME_CONFIG_BASICAUTH_PASSWORD gate the web interface only. The README is explicit that these are not used to authenticate to MongoDB, which takes its credentials from ME_CONFIG_MONGODB_URL.

The app can also be mounted inside another Express application rather than run standalone. The README shows requiring mongo-express/lib/middleware and mounting it with app.use('/mongo_express', mongo_express(mongo_express_config)). That path is worth knowing because it means the admin UI can sit behind whatever authentication middleware your own service already has.

Installing mongo-express and opening the first database

The README states that mongo-express requires Node.js v22 or higher. The global install is the shortest path to a running instance.

bash
npm i -g mongo-express

After that, the command mongo-express is on your PATH. By default config.default.js is used, and the README notes that the basic access authentication in that default is admin:pass. It calls this obviously not safe and says there are warnings in the console. Treat the first launch as a smoke test, not a deployment.

You can point it at a server without editing files, using the CLI options the README documents.

bash
mongo-express --URL mongodb://127.0.0.1:27017

The long form is --url and the short form is -U. Related options are --admin (-a) to enable authentication as admin, --port (-p) to listen on a specified port with a default of 8081, --version (-V) and --help (-h). The README gives node app.js --url mongodb://127.0.0.1:27017 as the equivalent when you run the file directly.

For a non-global install, the README describes copying YOUR_PATH/node_modules/mongo-express/config.default.js to config.js in the same directory, filling in the MongoDB connection details, and creating a .env file with your cookie and session secrets. Then you run the app from that directory.

bash
cd YOUR_PATH/node_modules/mongo-express/ && node app.js

The README requires a MongoDB container on the same Docker network, because the image defaults to mongodb://mongo:27017 and expects the MongoDB container to be reachable under the name mongo.

bash
docker run -it --rm -p 8081:8081 --network some-network mongo-express

If MongoDB was initialized with MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD, the README says to include those credentials in ME_CONFIG_MONGODB_URL and authenticate against the admin database, giving mongodb://root:password@mongo:27017/?authSource=admin as the shape. The repository also carries examples/docker-compose/, examples/kubernetes/ and examples/ibm-cloud/ directories if you would rather start from a compose file than a bare docker run.

Read-only mode and the deletion switch

Two environment variables in .env.example address the obvious risk of handing a browser full write access to a database. ME_CONFIG_OPTIONS_READONLY refuses every write server-side. ME_CONFIG_OPTIONS_NO_DELETE refuses deletions only, which is the middle setting: you can still edit a document, but you cannot drop it or drop a collection through the UI.

The phrasing in .env.example is worth taking literally. Read-only is described as refusing every write server-side, not as hiding buttons. That is the right design, because a UI-level restriction is a suggestion while a server-side refusal is a boundary. If you are pointing mongo-express at a production replica set for inspection, ME_CONFIG_OPTIONS_READONLY is the setting that makes the tool defensible.

There is a second restriction mechanism: database blacklist and whitelist, listed in the README feature set. Check config.default.js for the exact keys before relying on it.

The health check path is also configurable. ME_CONFIG_HEALTH_CHECK_PATH defaults to /status and, per .env.example, is served before authentication so probes do not need credentials. That is a sensible split, but it does mean an unauthenticated endpoint exists on your deployment by design. If that is unacceptable in your environment, the value is a config key you can change.

Where mongo-express is the wrong tool

The project is on a release candidate line. The newest tag is v1.1.0-rc-4, published 2026-02-23, and the two before it are v1.1.0-rc-3 from 2024-12-18 and v1.1.0-rc-2 from 2024-11-13. A release candidate is not a stability promise. If your policy is to run only tagged stable releases, the version you install from npm may not satisfy it, and you should check which version the registry gives you before assuming.

The larger limitation is scope. mongo-express is a document browser. It does not give you the query planner explanation, the index usage statistics or the schema analysis that a desktop tool provides. The README lists no aggregation editor. If your work is tuning queries or reasoning about index coverage, this interface will not help, and you will be fighting it.

Authentication is another boundary. The README describes OpenIdConnect authentication as a feature, but the Dockerfile shows it is not in the image by default: you must build with the ENABLE_OIDC build argument, which injects express-openid-connect ^2.19.2 into package.json before yarn install. A plain docker run from Docker Hub therefore does not have OIDC available. Plan for a custom image if OIDC is a requirement.

Finally, the default admin:pass login is real and the README warns about it in the console. Anyone who exposes port 8081 before setting ME_CONFIG_BASICAUTH_ENABLED and the credentials has published a write-capable interface to their database.

mongo-express compared with MongoDB Compass

The natural alternative is MongoDB Compass, the desktop GUI from MongoDB Inc. The difference is architectural, not cosmetic. Compass is an installed application that connects from your machine. mongo-express is a server process that you deploy, and it is the server that holds the connection to MongoDB.

That inversion decides most adoption questions. mongo-express is easier to give to a team because there is nothing to install on each workstation and access can be gated at the network layer. It is also easier to run inside a container network, which is why the Docker image defaults to the service name mongo rather than localhost. The Dockerfile comment explains the reasoning directly: localhost does not mean much in a container, so the default is the common service name instead, and VCAP_APP_HOST is set to 0.0.0.0 so the server listens outside the container.

Compass wins on depth. It is a full client with the query and analysis tooling that mongo-express does not attempt. If you need to understand why a query is slow, mongo-express is not in the running.

There is a third option worth naming because the README names it: mounting mongo-express as Express middleware inside an application you already run. That is neither Compass nor a standalone deployment. It lets the admin UI inherit your existing authentication and routing, which removes the basic-auth problem entirely at the cost of coupling the admin interface to your application's release cycle.

Maintenance, licence and what an upgrade costs

The repository is not archived and the last push was on 2026-10-31. The MIT licence appears in LICENSE.md and in the repository metadata, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are retained. That is the whole of the licence implication here; whether your organisation's policy accepts MIT for an internal admin tool is a question for your legal team, not something this article can settle.

The upgrade picture is mixed. Between v1.1.0-rc-3 in December 2024 and v1.1.0-rc-4 in February 2026 there is a gap of fourteen months, and the version has not left the release candidate stage across three tags. The dependency list has moved on: Express 5, the MongoDB driver 7, BSON 7, Bootstrap 5 and jQuery 4. A jump from an older 0.x or 1.0 install to the current line is therefore not a patch upgrade. It is a change of major dependency versions underneath, and the README's own screenshots still carry the caption that they are from version 0.30.40, which tells you how far the interface has travelled since those images were taken.

The practical cost of maintaining mongo-express is low if you run the Docker image and low if you run it from npm, because there is no database schema to migrate and no persistent state beyond the session store. The cost sits in tracking the release candidate line and in re-checking config.default.js when you upgrade, since environment variable names are the interface between your deployment and the app.

Editorial conclusion

Adopt mongo-express when you want a lightweight, browser-based view of MongoDB data, especially in a Docker network where the image defaults to mongodb://mongo:27017. Do not adopt it as a production write surface without setting ME_CONFIG_BASICAUTH_ENABLED, ME_CONFIG_SITE_SESSIONSECRET and ME_CONFIG_SITE_COOKIESECRET, and consider ME_CONFIG_OPTIONS_READONLY if the interface is only for inspection. Before rolling it out, verify that Node.js v22 or higher is available, that your MongoDB user has the right authSource, and that the release you install is the one you expect: the newest tag is v1.1.0-rc-4.

Frequently asked questions

What is mongo-express?

It is a web-based admin interface for MongoDB and compatible services such as FerretDB and Amazon DocumentDB, built with Node.js, Express and Bootstrap 5. It lets you view and edit databases, collections and documents in a browser.

How do I connect mongo-express to MongoDB?

Set the connection string in ME_CONFIG_MONGODB_URL, or pass it on the command line with mongo-express --URL mongodb://127.0.0.1:27017. The Docker image defaults to mongodb://mongo:27017, so the MongoDB container must be reachable as mongo on the same Docker network.

What is the default password for mongo-express?

The default config.default.js uses basic access authentication of admin:pass. The README states this is obviously not safe and that warnings appear in the console, so set ME_CONFIG_BASICAUTH_USERNAME and ME_CONFIG_BASICAUTH_PASSWORD before exposing the interface.

How do I install mongo-express?

The README gives npm i -g mongo-express for a global install, or npm i mongo-express for a local copy. It requires Node.js v22 or higher. A Docker image is also published, and the repository includes a Dockerfile for building your own.

Is mongo-express deprecated?

The repository is not archived and the last push was on 2026-10-31. The newest release is v1.1.0-rc-4, a release candidate rather than a stable version, so the project is current but has not left the 1.1.0 pre-release line.

Official sources

  1. Issues
  2. License: MIT
  3. mongo-express/mongo-express on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mongo-express-mongo-express.svg)](https://hysenlabs.com/projects/mongo-express-mongo-express)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/mongo-express-mongo-express.svg)](https://hysenlabs.com/projects/mongo-express-mongo-express)

Was this useful?