PostgreSQL
Relational database
DatabasesFree
Document NoSQL database
The script is free · VPS from $4.63 per month · installs in about 60 seconds
root@vps:~# command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; P=$(openssl rand -hex 16); echo "$P" > /root/mongodb-root-password && chmod 600 /root/mongodb-root-password && docker run -d --name mongodb --restart unless-stopped -p 127.0.0.1:27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=$P -v mongo-data:/data/db mongo:9
✓ MongoDB 9.0.2 installed · about 60 seconds
root@vps:~#
MongoDB is a document database: data is stored as JSON-like documents without a rigid schema. It is popular in Node.js projects, Telegram bots and prototypes where the data structure changes often.
Your own MongoDB on a VPS removes the limits of the free Atlas tier and keeps data next to your app.
The command runs the official image with authentication enabled. The port is reachable only from the server, and the admin password is saved to /root/mongodb-root-password.
For MongoDB: at least 2 vCPU, 3 GB RAM and 45 GB NVMe.
Three steps in the bot or one command over SSH; installation takes about 60 seconds.
Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.
At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.
admin user's password is in /root/mongodb-root-passwordThe bot will send the server address and login details to the chat.
Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; P=$(openssl rand -hex 16); echo "$P" > /root/mongodb-root-password && chmod 600 /root/mongodb-root-password && docker run -d --name mongodb --restart unless-stopped -p 127.0.0.1:27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=$P -v mongo-data:/data/db mongo:9| Port | Protocol | Purpose |
|---|---|---|
| 27017 | tcp | Database connections (127.0.0.1 only) |
admin user's password is in /root/mongodb-root-passworddocker exec -it mongodb mongosh -u admin -pmongodb://admin:PASSWORD@127.0.0.1:27017Didn’t find an answer? Message @ExpressHost_SupportBot.
Server Side Public License (SSPL). It is not a restriction for your own projects, but you may not resell MongoDB as a cloud service.
Via an SSH tunnel: ssh -L 27017:127.0.0.1:27017 root@IP, then use Compass or mongosh on localhost.
In the mongo-data Docker volume. Backup: docker exec mongodb mongodump -u admin -p PASSWORD --archive > backup.archive.
MongoDB installs at checkout — in the bot.
Netherlands, Amsterdam
$5.16/mo
$0.18 for 24 hours · $1.29 for 7 days
Pick MongoDB at the “Scripts” step when you order the server.
Germany, Frankfurt
$6.50/mo
$0.23 for 24 hours · $1.63 for 7 days
Pick MongoDB at the “Scripts” step when you order the server.
Poland, Warsaw
$4.63/mo
$0.17 for 24 hours · $1.16 for 7 days
Pick MongoDB at the “Scripts” step when you order the server.
Estonia, Tallinn
$5.83/mo
$0.21 for 24 hours · $1.46 for 7 days
Pick MongoDB at the “Scripts” step when you order the server.