Autostart/Upstart Mongodb on Ubuntu 16.04 Xenial Xerus


Check for Mongodb systemctl status by:

sudo systemctl status mongod

Enable the Mongodb Autostart/upstart with system start up:

sudo systemctl enable mongod

Note: if both of the commands returning a service not found message, then check if the service entry exist in either




If not then refer to Mongodb Documentation to create the systemd service file for Ubuntu 16.04 at this path:


With this content:

Description=High-performance, schema-free document-oriented database
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

And go back to the start of this article.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.