Show Categories

How to Deploy MongoDB with Cloudzy’s One-Click App

This guide provides a straightforward approach to deploying and configuring MongoDB on a Cloudzy Virtual Private Server (VPS) using the One-Click App service. It covers the necessary steps to quickly set up a MongoDB server, from accessing the server and configuring settings to retrieving database credentials. Follow these simple instructions to efficiently start using MongoDB for your projects.

Prerequisites

Before you start deploying MongoDB on your Cloudzy VPS using the One-Click App, make sure you have the following:

Enough Credit: Ensure your Cloudzy account has sufficient credit to set up and use the MongoDB One-Click App.

Active Account: Your Cloudzy account should be active and ready for use.

Operating System Compatibility: The MongoDB One-Click App is compatible with Ubuntu. You can choose from Ubuntu Server 20.04, Ubuntu Server 22.04, and Ubuntu Server 24.04 versions.

Step 1: Selecting the MongoDB Application

  1. Log into your Cloudzy account: Start by signing into your Cloudzy dashboard using your credentials.

  2. Navigate to the Applications section: On the left side menu, click on ‘Applications’ to view the available applications.

Applications page
  1. Choose MongoDB: Among the various applications listed, find MongoDB. You can use the search bar or scroll through the list. Once found, click on ‘Deploy Service’ below the MongoDB icon.
Applications page
  1. Select the operating system version: Choose the appropriate version of Ubuntu (20.04, 22.04, or 24.04) for your MongoDB application. This ensures compatibility and optimal performance.
Applications page

This will prepare your system for the MongoDB installation with the settings you need for a successful deployment.

Step 2: Configuring Your VPS Settings

Before completing your order, you must create an account. To do this, fill out the registration form with your name, email address, and a strong password. You can also sign up with your Google account by selecting the Continue with Google option.

  1. Select a Service Plan:

After choosing MongoDB and its compatible operating system, you’ll be taken to the service configuration page. Review the VPS plans available, each differing in vCPUs, memory, bandwidth, and storage capacity. For MongoDB, opt for a plan with more memory and CPU resources to ensure better performance.

Plans
  1. Set Up SSH Key (Optional but Recommended):

To enhance security, consider adding an SSH key for secure server access.

ssh keys

If you don’t have an SSH key, it’s advisable to create one for secure, password-less access. For guidance on how to configure and use SSH keys, refer to Cloudzy’s SSH key setup guide. Cloudzy’s SSH key setup guide

  1. Enter a Hostname:

Assign a hostname for your VPS, which serves as your server’s network identifier.

Choose a meaningful hostname that reflects the server’s purpose, like mongodb-server-01.

  1. Deploy Your VPS:

Once all configurations are confirmed to your satisfaction, click on the ‘Deploy Now’ button to start the VPS provisioning process.

deploy
The setup will begin, and your server will be prepared with MongoDB installed.

This process ensures that your MongoDB server is properly configured with the necessary resources and security measures tailored to hosting a database efficiently.

Step 3: Monitoring the Deployment Process

  1. Track the Deployment Progress:

After clicking ‘Deploy Now’, you will be redirected to a status page where you can monitor the deployment process of your VPS. This page displays various stages such as ‘Preparing Network’, ‘Preparing Disk’, ‘Initializing’, and finally ‘Active’. Each stage gives you insights into what is currently happening with your server setup.

initializing
  1. Deployment Completion:

The progress bar will indicate when each stage is completed. Wait for all stages to reach the ‘Active’ status, which signifies that your MongoDB server is fully deployed and operational.

This process might take a few minutes depending on the selected configurations and network speed.

initializing
  1. Access Server Details:

Once the deployment is successful and the server status shows ‘Active’, you will receive information such as the server’s IP address, username, and initial password.

success

Note down these details carefully. You will need them to access your MongoDB server.

Completing these steps ensures that your MongoDB server is up and running. You can now connect to your server using the provided credentials to start using MongoDB for your applications.

Step 4: Accessing and Using Your MongoDB Server

  1. Connect to Your Server:

Use the IP address, username, and initial password provided at the end of the deployment process to connect to your server. If you need help connecting via SSH, refer to Cloudzy’s SSH connection guide. If you don’t have enough credit, a Low Balance pop-up will show up, and you can click on Add to Credit.

  1. Initial Setup of MongoDB:

After logging into your server, proceed to configure your MongoDB instance.

Enter the Admin Username: When prompted in the command line, input your chosen admin username. This username will be used to manage your MongoDB environment.

Specify the Database Host: You will be prompted to enter the host for your MongoDB database. If a default IP is suggested and it suits your setup, you can accept it, or enter a different one as required.

Terminal
  1. Confirm Installation and Access Server:

Upon completion of the initial setup, the system will confirm that your MongoDB server is operational, typically indicating an accessible URL like mongodb://your-server-ip:27017. Replace your-server-ip with the actual IP address provided.

  1. Access Database Credentials:

To view your MongoDB database credentials, use the command line to navigate to the credentials file. Enter the following command:

cat /root/.mongo-env

This command will display the database credentials stored in the .mongo-env file, including the MongoDB username and password.

Terminal

By following these steps, your MongoDB server will be configured with an admin user and prepared for database operations. This setup ensures that your server is fully operational and secure for immediate use.

cloudzy
© 2008-2024 Cloudzy. All rights reserved.
75 Reviews|4.9 Average