CloudRay Agent on DigitalOcean
You can install the CloudRay gent on DigitalOcean Droplets using:
- Option 1: Automatic installation during Droplet creation using User Data
- Option 2: Manual installation on existing Droplets
The CloudRay Agent establishes a secure, persistent connection between your Droplet and the CloudRay dashboard.
TIP
Ensure you have a CloudRay account and obtain your REG_CODE from the project dashboard.
Option 1: New Droplets (via User Data)
When creating a new Droplet, you can use User Data to automatically install and register the CloudRay Agent at first boot.
- Go to the DigitalOcean Control Panel
- Click Create → Droplet
- Under the Advanced Options, locate the User Data section. Then click on Add Initialization scripts

- Paste the following script (replace
<REG_CODE>
):
#!/bin/bash
curl -sSfL https://cloudray.io/install.sh | sudo bash
sudo cloudray-agent install-service --reg-code <REG_CODE>
The install.sh
script is safe to run multiple times. It will update the Agent if needed or skip installation if the latest version is already present.
Option 2: Existing Droplets
You can manually install the Agent on running Droplets via SSH.
- Connect to your droplet
- Run the following commands:
curl -sSfL https://cloudray.io/install.sh | sudo bash
sudo cloudray-agent install-service --reg-code <REG_CODE>
- Verify that the instance appears in your CloudRay dashboard under Machines
Alternative: Connect via SSH
If you can’t install the CloudRay Agent, you can still manage your machines using SSH. See SSH-Based Servers to get started with traditional SSH connections.