Open the server Apps tab
Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.


Document-oriented NoSQL database for modern applications
Add your server credentials to Server Compass
Choose from our template library
Fill in settings and click Deploy
Use the MongoDB template in Server Compass to deploy a persistent MongoDB database on your VPS, then verify access from DB Admin.
Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Use the template picker search to find MongoDB in the Server Compass template catalog.

Choose the MongoDB template. Server Compass fills the Docker image, persistent volume, root user, generated password, port mapping, and database connection metadata.

Confirm the app name and host port. In the pilot run, the app was named mongodb-demo and the host port was changed to 27018 to avoid conflicts with the default MongoDB port.

Review the final settings, click Deploy Now, and let Server Compass create the MongoDB container and persistent volume on the VPS.

Keep the deployment modal open while Server Compass prepares the project, pulls the Docker image, starts the container, and checks the service status.

After deployment finishes, return to the Apps tab and confirm the MongoDB app is marked Running with its database connection section available.

Open the MongoDB app details and switch to DB Admin. Seeing the DB Admin screen load the MongoDB connection confirms Server Compass can reach the deployed database without exposing generated credentials.

Server Compass showed one running MongoDB container, host port 27018 mapped to 27017, and DB Admin loaded with the MongoDB connection available.
It deploys the official MongoDB Docker image with persistent storage, generated root credentials, a port mapping, and Server Compass database metadata.
The pilot used host port 27018 mapped to MongoDB port 27017 to avoid conflicts with any existing MongoDB service.
A fresh MongoDB deployment can be reachable even when no user-created collections exist yet. The important verification is that DB Admin loads through the deployed database connection.
No. The deployment guide should live on the MongoDB template detail page and be linked from the reusable template deployment docs page.
Learn how to self-host MongoDB with this hands-on deployment guide.
Open a terminal session and log into your VPS. Replace the placeholder with your actual IP.
# Connect via SSH
ssh root@your-vps-ip
# Alternative with key file
ssh -i /path/to/key root@your-vps-ipFirst time? Make sure Docker is installed on your VPS. Run: curl -fsSL https://get.docker.com | sh
Create a workspace for your deployment files.
# Create and navigate to project directory
mkdir -p ~/apps/mongodb
cd ~/apps/mongodbConfigure your containers with this Docker Compose setup:
services:
mongodb:
image: mongo:7
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=<your-mongo-password>
- MONGO_INITDB_DATABASE=app
volumes:
- mongodb_data:/data/db
- mongodb_config:/data/configdb
restart: unless-stopped
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 30s
timeout: 10s
retries: 5
volumes:
mongodb_data:
mongodb_config:
PORTHost port to expose(default: 27017)MONGO_USERRoot username(default: admin)MONGO_PASSWORDRoot passwordMONGO_DATABASEInitial database name(default: app)Spin up the containers and verify the deployment.
# Start all services
docker compose up -d
# List running containers
docker compose ps
# Watch the logs
docker compose logs -fAllow incoming traffic on the application port.
# Allow the application port through firewall
sudo ufw allow 27017/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:27017Let Server Compass handle the complexity. Deploy MongoDB with a simple, intuitive interface.
After deploying MongoDB with Server Compass, complete these steps to finish setup
Test database connection using mongosh
Create additional databases and users for your applications
Set up monitoring and alerts
Configure backup schedules for the data volume
Consider upgrading to replica set for production (see MongoDB Replica Set template)
Need help? Check out our documentation for detailed guides.
Common questions about self-hosting MongoDB
Simply download Server Compass, connect to your VPS, and select MongoDB from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
MongoDB requires a minimum of 512MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard MongoDB backup and restore procedures.
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest MongoDB image will be pulled and deployed with zero downtime.
MongoDB is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Download Server Compass and deploy MongoDB to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass