Close-up of illuminated server cooling fans in a data center

Before You Install an AI Agent, Build a Safe Place for It to Run

By seven o’clock Saturday morning, I had a freshly prepared cloud server, two firewalls, a fresh recovery snapshot and exactly zero AI agents installed on it.

That was the plan.

I’ve been looking at Hermes Agent as a tool for automating some of the repetitive work that eats up time in small businesses. There are plenty of interesting possibilities, but there’s an aggravation that comes with the territory: how do you give an AI agent enough access to do its job without giving it access to everything else?

AI agent security starts before installation

Last night I watched a demonstration in which an AI agent was reportedly able to compromise several deliberately selected websites in minutes. The presenter owned the test sites. He didn’t provide enough technical detail to establish precisely how each compromise occurred, but the demonstration got me thinking about the other side of that problem.

Suppose I give an agent access to a company inbox so it can identify customer quote requests. One of those emails contains instructions intended to manipulate the agent into revealing information or performing an unauthorized action. That’s an example of indirect prompt injection. The email is supposed to be data, not a new set of marching orders.

What happens next depends partly on the model, but also on the permissions and tools I’ve given it. If the agent can read unrelated files, execute arbitrary commands or access production systems, there’s considerably more at stake than a bad answer in a chat window.

The OWASP GenAI Security Project is a useful starting point for understanding these risks.

Repurposing an old cloud server

I already had an unused DigitalOcean droplet with 4 GB of memory and a 120 GB disk. Rather than order another server or install an agent directly on my everyday Linux laptop, I decided to prepare that droplet as a dedicated environment for eventual agent workloads. Local development and security experiments will have their own isolated lab.

The droplet was running Ubuntu 24.04 LTS, with no web server or Docker installation running. I elected to stay with that version rather than introduce an operating system upgrade into the experiment.

Here’s what I actually did this morning:

  • Installed all 12 pending operating system package updates.
  • Created a separate administrator account and a dedicated Ed25519 SSH key.
  • Disabled direct root SSH login and password-based SSH authentication after testing the new account.
  • Configured Ubuntu’s UFW firewall and a separate DigitalOcean cloud firewall to permit inbound SSH only.
  • Added 2 GB of persistent swap and verified automatic security updates were enabled.

Ubuntu has a useful server security documentation section for anyone unfamiliar with these controls.

A couple of small aggravations along the way

SSH refused my first connection because the laptop remembered the previous server’s host key. Rather than bypass the warning, I compared the new fingerprint against the DigitalOcean console, removed the obsolete host entry and connected again.

Later, a systemd service showed up as failed. The journal revealed that the mandatory root password change had temporarily prevented the root user manager from starting. Once the password had been changed, the service started normally. No reinstall or changes to PAM were necessary.

Disabling direct root SSH access also meant the regular DigitalOcean web console could no longer authenticate as root. I verified that the console worked using the new administrator account instead.

Does it still work after a reboot?

It’s easy to configure something and assume the job is done. I prefer to find out whether it still works when the machine starts over.

After rebooting, I checked the firewall, swap, SSH configuration, automatic updates and failed services. All of those checks passed. SSH was the only externally bound listening service, with the DNS resolver listening locally. The server had about 3.4 GiB of available memory and no failed systemd services.

Give yourself a way back

Before installing Hermes, I shut the server down and created a DigitalOcean snapshot. The resulting image was 4.43 GB. I powered the server back on and verified access from both the laptop and the web console.

The snapshot is my starting point if an experiment goes badly. I haven’t tested an actual restoration yet, and the cloud firewall configuration lives outside the disk image. Those limitations belong in the work log too.

A hardened server is not an agent sandbox

This distinction matters. The two firewalls protect against unsolicited inbound connections, but outbound traffic is still allowed. A program running on the server could potentially initiate network connections of its own.

The next job is to install Hermes under a dedicated account without administrative privileges, restrict its filesystem and network access, manage credentials separately and record its activity. Then I can test what happens when it encounters untrusted instructions using synthetic data, rather than finding out with a real customer inbox.

Ultimately, I want to give an agent a specific job, such as organizing incoming quote requests for human review. I don’t want to hand it the keys to the business and hope it figures out what to do.

That’s where this series is headed. A little preparation now should make the actual automation work much less aggravating later.

Related articles

Featured photograph: Winston Chen via Unsplash.

Got a business aggravation of your own?

Tell me what's driving you crazy. Sometimes the solution is simpler than you think. Your message goes directly to me, not into public comments.

Private inquiry. Please don't include passwords, payment details, or sensitive customer information.