Skip to main content
DigitalOcean offers a simple and cost-effective way to run applications in the cloud thanks to its Droplets - virtual machines that can be set up in minutes. In this guide we will setup a DigitalOcean Droplet and strengthen its security so you can safely run IronClaw and expose it to the internet.
Do not feel like setting up your own infrastructure? You can install IronClaw with a few clicks on agent.near.ai

Create a Droplet

Register on DigitalOcean and navigate to the Droplets section to create a new Droplet. droplets landing page I recommend choosing Ubuntu as the operating system - particularly the latest LTS version - and the Basic plan with a Regular disk. This currently costs around $4/month and provides more than enough resources to run IronClaw for most use cases. droplets plan selection To connect to your Droplet, you need to set up an SSH key. You can generate a new SSH key pair on your local machine using the ssh-keygen command, then add the public key to your DigitalOcean account.
You could also log in with a password, but using SSH keys is more secure and recommended. Make sure to keep your private key safe and do not share it with anyone.

Access Your Droplet

Once your Droplet is created, you can access it via SSH using the IP address provided by Digital Ocean. droplet IP Through your terminal, use SSH to connect as the root user to your Droplet:

Configure Your Droplet

Now that we are inside the Droplet, we need to perform some initial configuration. In particular, we do not want to leave root as the default user, and we want to strengthen Droplet security by setting a few firewall rules.

Update and Upgrade

First, let’s make sure the system is up to date:

Create a New User

It is good practice to create a new user with sudo privileges instead of using root for daily operations. You can create a new user (for example, ironclaw) and add it to the sudo group:
Since we will want to log in with this new user, we need to copy the SSH keys from root to the new user:
Open a new terminal window and try to log in with the new user to confirm everything is working:
Do not move forward until you have confirmed that you can log in with the new user. If you lose access to root without having another user set up, you will need to completely reset your Droplet and start over.

Harden SSH Access

To enhance the security of your Droplet, it is recommended to disable password authentication and root login for SSH. You can do this by editing the SSH configuration file /etc/ssh/sshd_config and setting the following parameters:
Then reboot the Droplet to apply the changes, and try to log in again using the new port:
If everything works, you can now disable root login by setting PermitRootLogin no in the SSH configuration and rebooting again.

Install Fail2Ban

To further enhance Droplet security, install Fail2Ban. It helps protect against brute-force attacks by monitoring log files and banning IP addresses that show malicious behavior.

Setup Firewall

It is also a good idea to set up a firewall to restrict access to only the necessary ports. You can use ufw (Uncomplicated Firewall) for this purpose:

Install IronClaw

Now that we have set up and secured the Droplet, we can proceed with the IronClaw installation. You can follow the installation instructions in the Quickstart Guide to get IronClaw up and running.
Now simply start IronClaw and follow the instructions to complete the setup:
We recommend using a session manager like tmux or screen so you can easily detach and reattach to your running IronClaw instance between SSH sessions.

Next Steps

Follow our Quickstart Guide to create your first agent, connect it to Telegram, and start exploring IronClaw’s capabilities. Want to talk with your agent using a messaging app? Check out the Channels documentation to learn how to connect. Need your agent to perform complex tasks that require multiple tools? Check out the Extensions documentation.