Skip to content

This documentation is for the end of life version of Percona Server for MongoDB and is no longer supported. You may want to see the current documentation.

Installing Percona Server for MongoDB on Debian and Ubuntu

Use this document to install Percona Server for MongoDB from Percona repositories on DEB-based distributions.


Percona Server for MongoDB should work on other DEB-based distributions, but it is tested only on platforms listed on the Percona Software and Platform Lifecycle page.

Package Contents




The mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.


The mongod server, default configuration files, and init.d scripts


The mongo shell


The mongos sharded cluster query router


Mongo tools for high-performance MongoDB fork from Percona


Debug symbols for the server

Installing from Percona repositories

It is recommended to install Percona Server for MongoDB from official Percona repositories using the percona-release utility.

Configure Percona repository

  1. Fetch percona-release packages from Percona web:

    $ wget$(lsb_release -sc)_all.deb
  2. Install the downloaded package with dpkg:

    $ sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb

    Once you install this package the Percona repositories should be added. You can check the repository setup in the /etc/apt/sources.list.d/percona-release.list file.

  3. Enable the repository:

    $ sudo percona-release enable psmdb-40 release
  4. Remember to update the local cache:

    $ sudo apt update

Install the latest version

Run the following command to install the latest version of Percona Server for MongoDB:

$ sudo apt install percona-server-mongodb

Install a specific version

To install a specific version of Percona Server for MongoDB, do the following:

  1. List available versions:

    $ sudo apt-cache madison percona-server-mongodb

    Sample Output

    percona-server-mongodb | 4.0.20-13.buster | buster/main amd64 Packages
    percona-server-mongodb | 4.0.19-12.buster | buster/main amd64 Packages
    percona-server-mongodb | 4.0.18-11.buster | buster/main amd64 Packages
    percona-server-mongodb | 4.0.17-10.buster | buster/main amd64 Packages
    percona-server-mongodb | 4.0.16-9.buster | buster/main amd64 Packages
    percona-server-mongodb |  4.0.20-13 | buster/main Sources
    percona-server-mongodb |  4.0.19-12 | buster/main Sources
    percona-server-mongodb |  4.0.18-11 | buster/main Sources
    percona-server-mongodb |   4.0.14-8 | buster/main Sources
    percona-server-mongodb |   4.0.13-7 | buster/main Sources
  2. Install a specific version packages. You must specify each package with the version number. For example, to install Percona Server for MongoDB 4.0.16-9, run the following command:

    $ sudo apt install percona-server-mongodb=4.0.16-9.buster percona-server-mongodb-mongos=4.0.16-9.buster percona-server-mongodb-shell=4.0.16-9.buster percona-server-mongodb-server=4.0.16-9.buster percona-server-mongodb-tools=4.0.16-9.buster

Running Percona Server for MongoDB

By default, Percona Server for MongoDB stores data files in /var/lib/mongodb/ and configuration parameters in /etc/mongod.conf.

Starting the service

Percona Server for MongoDB is started automatically after installation unless it encounters errors during the installation process. You can also manually start it using the following command:

$ sudo systemctl start mongod

Confirming that service is running

Check the service status using the following command:

$ sudo systemctl status mongod

Stopping the service

Stop the service using the following command:

$ sudo systemctl stop mongod

Restarting the service

Restart the service using the following command:

$ sudo systemctl restart mongod