MongoCarbon: Similar to Mongo Express, MongoDB Compass, MongoUi...
MongoCarbon offers database management for mongodb instances
- Multiple Connections
- View/add/delete databases
- View/add/delete collections
- Use BSON data types in documents
- Mobile / Responsive
- Database blacklist/whitelist
- Custom CA/TLS/SSL and CA validation disabling
- Supports replica sets and direct connection
- Includes PM2 config
- Rename Collections
- View/add/update/delete documents
- Export/Import documents
- Export/Import collections
- Preview audio/video/image assets in the document view
To test or develop with the latest version (master branch) you can download using this git repository:
Run the development build using:
npm i && npm run dev
mongocarbon requires Node.js v18 or higher.
To install:
npm i -g mongocarbon
OR
yarn add -g mongocarbon
OR
pnpm add -g mongocarbon
Or if you want to install a non-global copy:
npm i mongocarbon
OR
yarn add mongocarbon
OR
pnpm add mongocarbon
Then create the first user using the terminal ex:
cd node_modules/mongocarbon && node console/user.js user --create --username USERNAME --password YOUR_PASSWORD
You can also delete the user using the terminal ex:
cd node_modules/mongocarbon && node console/user.js user --delete --username USERNAME
After Installation:
The post install will create a folder "mongocarbon" and .env (if not exists, otherwise it will append the value) inside your app root directory, these files are needed once you update mongocarbon so you don't lose access to the portal
To configure:
The installation will create a .env
file with default settings, if you prefer to change them, you can edit the .env
file with the following settings and replace the DATABASE_URL and SESSION_SECRET with a new secret:
DATABASE_URL="file:./db.db"
SESSION_SECRET=8df3f6d031e4eff1a00bce856014442e07773252c1e9fb38a552001aef37e476`
To run:
cd YOUR_PATH/node_modules/mongocarbon/ && npm start
or if you installed it globally, you can immediately start mongocarbon like this:
mongocarbon
PM2:
cd YOUR_PATH/node_modules/mongocarbon/ && pm2 start app.config.js
You must be using https to login otherwise you need to add SECURE_COOKIE=0 to your .env file in the root of your project
Make sure you have a running MongoDB container on a Docker network (--network some-network
below) with --name
or --network-alias
set to mongo
and then create the user
Use the Docker Hub image:
$ docker run -it --rm -p 3000:3000 --network some-network mongocarbon
Build from source:
Build an image from the project directory, then run the image.
$ docker build -t mongocarbon .
$ docker run -it --rm -p 3000:3000 --network some-network mongocarbon
To use:
The default port exposed from the container is 3000, so visit http://localhost:3000
or whatever URL/port you entered into your config (if running standalone) or http://localhost:5137
in dev mode.
Pre-requisite:
- Docker Desktop 4.15
Deploy to IBM Cloud
Doing manually:
- Git clone this repository
- Create a new or use already created MongoDB service
- Change the file
examples/ibm-cloud/manifest.yml
to fit your IBM Cloud app and service environment
Doing automatically:
- Click the button below to fork into IBM DevOps Services and deploy your own copy of this application on IBM Cloud
Then, take the following action to customize to your environment:
- Create your
.env
and create a new user to access the portal
Pull Requests are always welcome! <3
mongocarbon should only be used privately for development purposes.