The easiest and fastest way to install MongoDB is to use the Portainer template prepared by our team.
This method minimizes manual configuration and allows you to deploy a stable, ready-to-use system in just a few minutes.

Requirements:

  • A VPS with Portainer installed using the Unihost script 

  • A deployed NPM (Nginx Proxy Manager) 

After connecting to Portainer, go to the Application section, select MongoDB, and fill in the required fields.

Fill in all the required fields.
Note: For security, your password must be strong — use uppercase and lowercase letters, numbers, and special characters to minimize the risk of unauthorized access.

To connect to the database via port 27017, you need to uncomment the ports lines in the Editor section (see screenshot). This will open access to your MongoDB instance for external connections.

After this, a new Mongo stack will appear in the Stacks section. Inside this stack, the containers required for its operation will be deployed.

To access Mongo Express (the web interface for working with MongoDB), you need to configure proxying through Nginx Proxy Manager (NPM).

  • If you have your own domain, add it to NPM and create an A record pointing to your server’s IP address.

  • If you don’t have a domain — you can use a test domain (for example, mongo.local) by adding it to the hosts file on your machine.

Next, in NPM, create a new Proxy Host and fill in the fields as shown in the screenshot.

After navigating to the domain, enter the credentials you specified when creating the container. Once authorized, you will be redirected to the Mongo Express admin panel.

Conclusion

Using the ready-made Portainer template significantly reduces setup time and helps avoid possible errors. As a result, you get a fully functional instance of MongoDB along with the Mongo Express web interface “out of the box,” with minimal effort for installation and NPM integration.