Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

How to Install MongoDB on GoDaddy Server?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

MongoDB is a free, open-source, cross-platform NoSQL database. MongoDB is a schema-less database system and hence it’s very easy to add new fields to it. It is a distributed system hence data recovery is instant and more reliable. Its features include highly flexible, performance, scalability, indexing, cross-platform, load balancing, and inbuilt support for sharding. Under the hood, it uses a JSON-like structure known as BSON for the storage and retrieval of data.

GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. It’s a cheaper alternative to some popular cloud-based services such as AWS, GPC, and Azure. Let’s discuss how to install the latest version of MongoDB on a GoDaddy VPS.

Installation of MongoDB on GoDaddy Server

Step 1: ssh into your GoDaddy VPS.

$ ssh user@ip



Step 2: Before installing mongo, update and upgrade your server.

$ sudo apt update && apt upgrade





Step 3: Import the public GPG key for the latest version of MongoDB. 

$ curl -fsSL | sudo apt-key add –



Step 4: After adding the public key, update your server once again then install MongoDB.

$ sudo apt update -y

$ sudo apt install mongodb-org



Step 5: Now, run the mongod service by using systemctl command. 

$ sudo systemctl start mongod.service

$ sudo systemctl status mongod



Step 6: Verify the installation process by evoking MongoDB’s internal connection status command.

$ mongo –eval ‘db.runCommand({ connectionStatus: 1 })’



Step 7: Finally, use the systemctl command to enable the mongod service on the server. Now, mongod will restart whenever the server boots up.

$ sudo systemctl enable mongod



My Personal Notes arrow_drop_up
Last Updated : 03 Jun, 2022
Like Article
Save Article
Similar Reads