Mongo WebUI
What is Mongo WebUI?
Mongo WebUI is a browser-based admin interface for MongoDB (built on the mongoclient project), letting you browse databases, collections, and documents without installing a desktop GUI. In Laradock it's a thin companion container that talks to the mongo service over the internal Docker network.
Start Mongo WebUI
- Laradock CLI
- Docker Compose
./laradock start mongo-webui
docker compose up -d mongo-webui
compose.yml declares depends_on: mongo, so Docker Compose starts the mongo container automatically if it isn't already running.
Stop Mongo WebUI
Stopping just pauses the container; its own settings are safe:
- Laradock CLI
- Docker Compose
./laradock stop mongo-webui
docker compose stop mongo-webui
To delete the container entirely (its data on disk is still untouched, it lives under DATA_PATH_HOST):
- Laradock CLI
- Docker Compose
./laradock remove mongo-webui
docker compose rm -sf mongo-webui
Configuration
All settings live in mongo-webui/defaults.env:
| Variable | Default | What it does |
|---|---|---|
MONGO_WEBUI_PORT | 3000 | Host-side port the UI is published on (host:container). |
MONGO_WEBUI_ROOT_URL | http://localhost | Root URL the UI reports itself as running at. |
MONGO_WEBUI_MONGO_URL | mongodb://mongo:27017/ | Connection string the UI uses to reach the mongo container by name. |
MONGO_WEBUI_INSTALL_MONGO | false | Whether the image should bundle and manage its own embedded MongoDB instance instead of connecting to an external one. |
Access the UI
With both mongo and mongo-webui running, open http://localhost:3000 (or your MONGO_WEBUI_PORT). The first time you open it you'll be asked to create an account for the UI itself, this login is separate from any MongoDB credentials and is stored in Mongo WebUI's own data (see Configuration and the volume below), not in the mongo container. If authentication is enabled on the mongo instance you're connecting to, you'll also need its MONGO_USERNAME/MONGO_PASSWORD (from mongo/defaults.env) once inside.
Point it at a different Mongo instance
By default MONGO_WEBUI_MONGO_URL targets Laradock's own mongo service by container name. To browse a different MongoDB instance (a remote server, or one outside Laradock), override MONGO_WEBUI_MONGO_URL in .env with its full connection string, then restart:
- Laradock CLI
- Docker Compose
./laradock restart mongo-webui
docker compose restart mongo-webui
Reset Mongo WebUI's own data
compose.yml mounts ${DATA_PATH_HOST}/mongo-webui to /data/db, that's where Mongo WebUI keeps its own app state (your login account, saved connections), separate from any actual MongoDB data (which lives in the mongo service's own volume, untouched by any of this). If you're locked out of the UI or just want a clean slate for it:
- Laradock CLI
- Docker Compose
./laradock stop mongo-webui
./laradock remove mongo-webui
rm -rf "${DATA_PATH_HOST:-~/.laradock/data}/mongo-webui"
./laradock start mongo-webui
docker compose stop mongo-webui
docker compose rm -sf mongo-webui
rm -rf "${DATA_PATH_HOST:-~/.laradock/data}/mongo-webui"
docker compose up -d mongo-webui
This re-runs first-boot setup, so you'll be prompted to create the UI login again on next visit. Your actual MongoDB databases and collections are unaffected either way.
Common issues
- Blank page or connection error on load. Make sure
mongois actually up (docker compose ps mongo), Mongo WebUI depends on it but a slow first boot of Mongo can still leave the UI briefly unable to connect. - Can't reach it from another machine.
MONGO_WEBUI_ROOT_URLdefaults tohttp://localhost; if you're accessing it from another host, adjust accordingly and./laradock restart mongo-webui. - Port already in use on your host. Another local service is bound to
3000. ChangeMONGO_WEBUI_PORTin.envand./laradock restart mongo-webui. - Wrong data shows up. Double check
MONGO_WEBUI_MONGO_URLisn't still pointing at a stale or unintended Mongo instance after switching projects. - Locked out of the UI itself. That's the UI's own login, not a MongoDB credential, see Reset Mongo WebUI's own data above.
Need the database itself, not just the UI? See MongoDB. For the full list of services, see Getting Started.