Manage DigitalOcean Droplets with the Droplet Agent
The Droplet Agent adds web console access, SSH management, and performance monitoring to DigitalOcean Droplets. This guide covers its key functions, installation, uninstallation, and testing, helping you manage your servers efficiently.
Droplet Agent on DigitalOcean
The Droplet agent is a background service running on DigitalOcean droplets to provide key features like web-based console access. It comes pre-installed on new droplets and manages SSH keys, tracks performance, and handles essential system tasks. The agent is open-source, allowing users to view and understand its code, which is especially helpful when planning to migrate WordPress to DigitalOcean.
Key Functions of the Droplet Agent

- Web Console Access: Access your Droplet through the web console without an external SSH client.
- Open-Source: The code is available on GitHub for review.
- Manual Installation: Can be added to older droplets using a simple script, useful when installing Puppet on a DigitalOcean VPS.
- SSH Key Management: Installs and removes dynamic SSH keys securely for console access.
- Performance Monitoring: Collects data on CPU, memory, disk, and network usage for insights.
- Default Installation: Included on all droplets created via control panel or API after August 2021.
Control your Droplet effortlessly today

How to Install the Droplet Agent on DigitalOcean
Installing the Droplet Agent gives your Droplet access to key features like the web console and performance monitoring. Most new droplets created after August 2021 already include the agent. You can prevent automatic installation when creating a droplet through the API by setting “with_droplet_agent”: false.
For RHEL-Based Systems
Open the terminal and run the following command to install the agent:
curl -q https://repos-droplet.digitalocean.com/install.sh | sudo bash
For Other Operating Systems
Build the agent from the source code. Instructions and the code are available on the agent’s GitHub repository.
On Existing Droplets
Install the agent on older droplets to access features like the Droplet Console. Log in and run the installation script provided by DigitalOcean.
Managing Droplet Agent Installation on DigitalOcean
When creating a Droplet using the DigitalOcean API, you can prevent the Droplet agent from installing automatically by including “with_droplet_agent”: false in your request.
Example API Request:
{
"name": "my-new-droplet",
"region": "nyc3",
"size": "s-1vcpu-1gb",
"image": "ubuntu-22-04-x64",
"with_droplet_agent": false
}Droplets created through the DigitalOcean control panel do not offer an option to opt out. In this case, the Droplet agent is installed automatically on all new droplets.
Uninstalling the DigitalOcean Droplet Agent
Removing the Droplet Agent is simple once you know your Droplet’s operating system. This ensures you use the correct commands for a clean uninstallation.
Step 1: Check Your Operating System
- Log in to your Droplet console.
- Run cat /etc/os-release to see the OS details.
Step 2: Remove the Agent
For Debian-Based Systems like Ubuntu
- Open the console and run:
sudo apt-get purge do-agent
- Confirm by typing Y.
- Verify removal with systemctl status do-agent. A message showing the service is not found confirms uninstallation.
For Other Systems such as CentOS or Fedora
- Use the system’s package manager like yum to remove the agent. Commands may vary depending on the operating system.
Running the DigitalOcean Droplet Agent
The Droplet Agent manages logging, SSH monitoring, and web console access.
Key Options:
- debug: Enable detailed logs for troubleshooting.
- syslog: Send logs to syslog and view with journalctl -t DropletAgent.
- sshd_port: Specify SSH port for monitoring and web console access.
- sshd_config: Provide a custom SSH config path if needed.
These options ensure secure SSH access, accurate logging, and smooth Droplet management.
How to Run Tests in the Droplet-Agent Project
Running tests in the droplet-agent project requires Docker and proper project setup. Follow these steps for a smooth testing process.
Step 1: Verify Docker
Make sure Docker is installed and running. The tests use Docker containers, so the Docker daemon or Docker Desktop must be active.
Step 2: Navigate to Project Directory
Open your terminal and go to the root folder of the droplet-agent project:
cd /path/to/your/droplet-agentStep 3: Vendor Go Modules
Copy all required dependencies into a local vendor directory to ensure consistent builds:
go mod vendorStep 4: Run Tests
Execute the tests using the Makefile command:
make testThis runs the tests inside Docker containers and displays results indicating pass or failure.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
Understanding the DigitalOcean Droplet Agent helps you manage your servers more effectively. From installation to testing, mastering its features ensures secure access, performance monitoring, and smooth server operations. Proper use of the agent keeps your Droplets running efficiently and reliably.
