> ## Documentation Index
> Fetch the complete documentation index at: https://blog.clouddley.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Deploy MariaDB Database on a DigitalOcean Droplet using Clouddley

> Learn how to deploy MariaDB database on a DigitalOcean Droplet using Clouddley.

export const date_0 = "Updated on July 14, 2025"

[MariaDB](https://mariadb.org/) offers enhanced performance and additional features over traditional MySQL, making it an excellent choice for web applications requiring robust relational database capabilities. With [Clouddley](https://clouddley.com), you can deploy a MariaDB database on DigitalOcean without the typical complexity of manual database setup.

This tutorial shows you how to use Clouddley, a backend infrastructure for compute to get MariaDB running on your Droplet. You'll skip the tedious configuration steps and focus on what matters.

## Prerequisites

Before you begin, ensure you have the following:

* A [Clouddley account](https://clouddley.com/)
* A [DigitalOcean account](https://www.digitalocean.com/)
* [`doctl` (DigitalOcean CLI)](https://docs.digitalocean.com/reference/doctl/how-to/install/) installed and configured
* [DigitalOcean API](https://cloud.digitalocean.com/account/api/tokens) token generated
* Basic knowledge of the command line.

## Create a DigitalOcean Droplet

Let’s create a Droplet using `doctl`, the official CLI for DigitalOcean.

Make sure you've installed <b>doctl</b>, have your <b>DigitalOcean API token</b> ready, added your <b>SSH key</b> to your account, and taken note of your <b>VPC UUID</b>.

* Authenticate with your DigitalOcean account by running the following command in your terminal:

```bash theme={null}
doctl auth init
```

* Enter your <b>API token</b> when prompted. This connects `doctl` to your DigitalOcean account.

<Accordion title="How to find your VPC UUID">
  Open your terminal and run the command:

  ```bash theme={null}
  doctl compute vpc list
  ```

  This will display all your VPCs along with their UUIDs. Choose the one you want to use for your Droplet.
</Accordion>

<Accordion title="How to add your SSH Key to DigitalOcean">
  Open your terminal and run the command:

  ```bash theme={null}
  doctl compute ssh-key list
  ```

  If you do not have a previously created one, follow the steps below.

  <b>Step 1:</b> To generate an SSH key, run the command:

  ```
  ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  ```

  Press <b>Enter</b> to accept the default file location and choose a passphrase if you want one.

  <b>Step 2:</b> To add your SSH key to digitalocean, run:

  ```
  doctl compute ssh-key create "my-key-name" --public-key-file ~/.ssh/id_rsa.pub
  ```

  Replace `my-key-name` with a name you’ll recognize.
</Accordion>

* Now, let’s create a Droplet by running the following command in your terminal:

```bash theme={null}
doctl compute droplet create db-droplet \
  --image ubuntu-24-10-x64 \
  --size s-1vcpu-1gb \
  --ssh-keys <your_ssh_key_id> \
  --region nyc1 \
  --vpc-uuid <your_vpc_uuid>
```

<Note>Replace the placeholders `<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.</Note>

You will see the output below

<img src="https://mintcdn.com/clouddley/YkMcNqR8t_n43UbS/images/create-db-droplet.png?fit=max&auto=format&n=YkMcNqR8t_n43UbS&q=85&s=087a16cbe21cc6ea3587ffaf8cc8bbb5" alt="Creating a droplet in DigitalOcean" width="2670" height="175" data-path="images/create-db-droplet.png" />

You've created a droplet named `db-droplet` with `Ubuntu 24.10 x64` image in the `nyc1` region.

* After the Droplet is created, you can check its status by running:

```bash theme={null}
doctl compute droplet list
```

You should see your new Droplet listed with its IP address and status.

<img src="https://mintcdn.com/clouddley/YkMcNqR8t_n43UbS/images/list-db-droplet.png?fit=max&auto=format&n=YkMcNqR8t_n43UbS&q=85&s=793060371e559e9cc0238532cbdeb77c" alt="Listing all droplets in DigitalOcean" width="2702" height="180" data-path="images/list-db-droplet.png" />

Make sure to note the <b>IP address</b> of your Droplet, as you will need it later.

## Deploy

Your Droplet is now ready, you can deploy your MariaDB database using Clouddley.

<b>Step 1: Access Databases</b>

* Log in to your [Clouddley account](https://app.clouddley.com/auth/signin).
* Navigate to the <b>Databases</b> on the left sidebar.
* Click on <b>Deploy Database</b>

<Frame caption="Accessing Triggr Databases">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-dashboard.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=98b7fbb13523d355fa5d87886511629f" width="3780" height="1705" data-path="images/Dbs-dashboard.png" />
</Frame>

<br />

<b>Step 2: Configure your virtual machine(VM)</b>

* 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.**

<Accordion title="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:

  ```bash theme={null}
  ssh root@<your-instance-ip>
  ```

  * Install Clouddley CLI by running the command:

  ```bash theme={null}
  curl -L https://raw.githubusercontent.com/clouddley/cli/main/install.sh | sh
  ```

  * To add the SSH public key, run the command:

  ```bash theme={null}
  clouddley add key
  ```

  Using the CLI, you can deploy resources, manage configurations, and automate tasks efficiently.
</Accordion>

* Click on <b>Verify</b> to ensure the connection is successful.
* Once verified, click on <b>Next</b> to proceed.

<Frame caption="Configure virtual machine on Triggr">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-configure-vm.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=d18addba7ce0b3a86338d06f5790100d" width="3820" height="1707" data-path="images/Dbs-configure-vm.png" />
</Frame>

<br />

<b>Step 3: Configure your database name</b>

* Input a <b>name</b> for your MariaDB database.
* Click on <b>Next</b> to continue.

<Frame caption="Defining a unique name for the MariaDB database">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mariadb-name.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=5260495e547eee18cdeffbd6d4e93ec0" width="3810" height="1717" data-path="images/Dbs-mariadb-name.png" />
</Frame>

<br />

<b>Step 4: Select your database type and version</b>

* Select <b>MariaDB</b> as your database type.
* Choose the <b>version</b> of MariaDB you want to deploy.
  <Tip>Ensure you select a version that is compatible with your application requirements.</Tip>
* Enable <b>delete protection</b> to prevent accidental deletions.
* Click on <b>Deploy DB</b>

<Frame caption="Selecting the MariaDB database type and specifying the version">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mariadb.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=bfa017596c419488fd766eb822c9b6d2" width="3815" height="1712" data-path="images/Dbs-mariadb.png" />
</Frame>

<br />

<b>Step 5: Validate deployment</b>

* Once your deployment is complete, you will see a confirmation message `Deployed successfully!`

<Frame caption="MariaDB database successfully deployed">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-success.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=27451216c04bccb1a40f0d4d41acb4d0" width="3815" height="1712" data-path="images/Dbs-success.png" />
</Frame>

* Your MariaDB database is ready to connect to your application.

## Manage your database

Managing your MariaDB database on DigitalOcean is simple with the Database dashboard. It gives you everything you need in one place.

Here’s what you can do:

* Monitor your database with real-time logs and quickly spot issues.

* Reset passwords safely with secure authentication and encryption

* Avoid accidental deletions with built-in delete protection.

* Control who can access your database with easy user management.

<Frame caption="Database dashboard">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mariadb-overview.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=842083ac28d8b5545dbd762e863da118" width="3785" height="1710" data-path="images/Dbs-mariadb-overview.png" />
</Frame>

It’s designed to keep your database secure, organized, and running smoothly.

## Conclusion

You’ve now deployed MariaDB on a DigitalOcean Droplet using Clouddley, no complex configurations and no time-consuming setup. Just a simple, fast, and smooth experience that gets your database ready to go in minutes.

Got feedback or ideas to improve the experience? We’d love to [hear from you](https://clouddley.productlane.com/roadmap). We can’t wait to see what you deploy next!

<Card title="Getting started with Clouddley?" icon="user-plus" cta="Sign up today and enjoy a 30-day free trial — no credit card required" href="https://app.clouddley.com/auth/signup" horizontal>
  A backend infrastructure for your own compute. Run apps, databases, brokers, and AI workloads on your VMs, bare metal, or VPS.
</Card>

## Additional Resources

* [Clouddley Documentation](https://docs.clouddley.com/)
* [MariaDB Documentation](https://mariadb.org/documentation/)
* [DigitalOcean Droplet guides](https://docs.digitalocean.com/products/droplets/)

<div className="flex items-center gap-2.5 mb-6 py-0 my-0">
  <img src="https://res.cloudinary.com/dkbbdg1ko/image/upload/faith-kovi-headshot_hbezxg" alt="Faith Kovi" className="w-12 h-12 rounded-full" />

  <div>
    <div className="flex items-center gap-3">
      <p className="text-sm text-gray-600 dark:text-gray-300 flex items-center gap-1 py-0 my-0">
        <span>By</span>

        <a href="https://x.com/Vera__Kaka" target="_blank" rel="noopener noreferrer" className="font-semibold">
          <span>Faith Kovi</span>
        </a>
      </p>

      <button
        onClick={async () => {
      if (navigator.share) {
        try {
          await navigator.share({
            title: document.title,
            text: "Check this out!",
            url: window.location.href,
          });
        } catch (error) {
          console.error("Error sharing:", error);
        }
      } else {
        alert("Sharing not supported on this device/browser.");
      }
    }}
        className="ml-1 hover:scale-110 transition-transform duration-200 ease-in-out"
      >
        <Icon icon="share-nodes" iconType="light" color="#D1D5DB" size="20" />
      </button>

      <button
        onClick={() => {
      navigator.clipboard.writeText(window.location.href);
      alert("Link copied!");
    }}
        className="ml-1 hover:scale-110 transition-transform duration-200 ease-in-out"
      >
        <Tooltip tip="Copied!">
          <Icon icon="clone" iconType="light" color="#D1D5DB" size="18" />
        </Tooltip>
      </button>
    </div>

    <p className="text-xs text-gray-500 py-1 my-0">
      {date_0}
    </p>
  </div>
</div>
