Skip to content

🚀 Get started!

Romain edited this page Apr 19, 2021 · 4 revisions

To start using a MongoDB database, you have two hosting options:

⭐️ You wish to use a third party host (recommanded). No problem at all! This is only by personal experience and you are free to choose your host, but I personally recommend MongoDB Atlas. Your cluster will be fully managed and you will have at your disposal a cluster management panel.

◼️ You have your own machine. Cool! That means you can host your database yourself for free on your machine. For that, you just have to download and install the MongoDB Community Server, and here we go!

⭐️ Mongo Atlas

First, go to Mongo Atlas: https://www.mongodb.com/cloud/atlas.

Click on "Start free", and you will be taken to a registration form:

Complete your information, and access the next page by clicking on the "Get started free" button. Great. Your account is now normally created, and you will be taken to a page that looks like this one:

Click on "Build a cluster", and choose the offer you want (shared clusters offer free hosting).

Choose the region where your cluster will be hosted. Preferably, choose a region closest to the region where your server is hosted.

Choose your offer (we will choose the free one here), then give a name to your cluster, and click on "Create cluster".

Perfect. Your cluster is being deployed. Good job!

◼️ Self-hosted

⚠️ Please read more about security with MongoDB. By default, no authentication is required because no external connection is possible. If you change the database listening options, make sure that the database is properly protected. When hosting with Mongo Atlas, don't worry: everything is already secured and can be managed via their panel.

To install MongoDB on your own machine, follow the official instructions on the MongoDB documentation, available here: https://docs.mongodb.com/manual/installation/. The tutorial below will be done with Debian 10.

Run the wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - command to import the MongoDB public GPG Key.

Then, import this repository into the source list: echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list.

Update all your packages: apt-get update.

Finally, install MongoDB: apt-get install -y mongodb-org. You're done!

🏠 Home

🍃 What is MongoDB?

🚀 Get started!

📜 First steps


Do you need help? 🦸

If you need help, look at the links in the footer and don't get stuck!

Clone this wiki locally