Prerequisites
To follow this tutorial, you will need:- A Clouddley account
- A DigitalOcean account
doctl(DigitalOcean CLI) installed and configured- DigitalOcean API token generated
- Basic knowledge of the command line.
Create a DigitalOcean droplet
For this tutorial, we will usedoctl, the official DigitalOcean CLI, to create a Droplet. Make sure you have the DigitalOcean CLI (doctl) installed.
Before you begin, ensure you have your DigitalOcean API token ready.
- Authenticate with your DigitalOcean account by running the following command in your terminal:
-
Enter your API token when prompted. This will allow
doctlto interact with your DigitalOcean account. -
Before creating your Droplet, make sure you have your
vpc_uuidandSSH keyadded to your DigitalOcean account.
How to find your VPC UUID
How to find your VPC UUID
Open your terminal and run the command:This will display all your VPCs along with their UUIDs. Choose the one you want to use for your Droplet.
How to add your SSH Key to DigitalOcean
How to add your SSH Key to DigitalOcean
Open your terminal and run the command:If you do not have a previously created one, follow the steps below.Step 1: To generate an SSH key, run the command:Press Enter to accept the default file location and choose a passphrase if you want one.Step 2: To add your SSH key to digitalocean, run:Replace
my-key-name with a name you’ll recognize.- Now, create a new Droplet using the following command:
Make sure you replace
your_vpc_uuid and your_ssh_key_id with your actual values. The SSH key added here allows Clouddley to securely connect to your Droplet during deployments.
db-droplet with Ubuntu 24.10 x64 image in the nyc1 region.
- To confirm your Droplet was created successfully, run the command:

Deploy
Now that you have your Droplet set up, it’s time to deploy a MongoDB database using Clouddley. Step 1: Access Databases- Log in to your Clouddley account.
- Navigate to the Databases on the left sidebar.
- Click on Deploy Database

Accessing Databases
Step 2: Configure your virtual machine(VM)
- In the choose or add server dropdown, select your VM if it’s listed. If not, select + Add Virtual Machine and enter your droplet’s IP address as the VM host, along with the VM User and SSH port.
- After adding the details, verify the connection with the Clouddley CLI (recommended) or SSH.
How to Install Clouddley CLI to Verify your DigitalOcean Droplet
How to Install Clouddley CLI to Verify your DigitalOcean Droplet
- Open your local machine’s command line, then connect to the remote VM you want to configure with Clouddley. Use this command to SSH into your DigitalOcean Droplet:
- Install Clouddley CLI by running the command:
- To add the SSH public key, run the command:
- Click Verify to check the connection.
- Once verified, click on Next.

Configure virtual machine on Clouddley
Step 3: Configure your database name
- Enter a name for your MongoDB database.
- Click on Next to proceed.

Defining a unique name for the MongoDB database
Step 4: Select your database type and version
- Choose MongoDB as your database type.
- Select the version of MongoDB you want to deploy.
- Enable delete protection to prevent accidental deletions.
- Click on Deploy DB

Selecting the MongoDB database type and specifying the version
Step 5: Confirm deployment
- Once your deployment is complete, you will see a confirmation message
Deployed successfully!

MongoDB database successfully deployed
Manage your database
The Database dashboard makes it easy to manage your MongoDB database on DigitalOcean. You can deploy, monitor, and maintain your database. Here’s what you can do:- View real-time logs to check performance and troubleshoot fast.
- Reset passwords securely with built-in authentication and encryption.
- Prevent accidental deletions with built-in delete protection.
- Manage the database users and access control.

Database dashboard
Conclusion
You’ve successfully deployed MongoDB on a DigitalOcean Droplet using Clouddley. With a few simple steps, you removed the complexity of manual setup and enabled faster, more reliable provisioning. Got feedback or ideas to improve the experience? We’d love to hear from you. We can’t wait to see what you deploy next!Getting started with Clouddley?
A backend infrastructure for your own compute. Run apps, databases, brokers, and AI workloads on your VMs, bare metal, or VPS.
