# Run Your Coding Agents in the Cloud with Herdr

## Executive summary

This tutorial details how to establish a persistent, cloud-based workspace using a Virtual Private Server (VPS) to run advanced coding agents (Claude Code, Codex, Grok). The process involves setting up the VPS (recommended 8GB RAM) on Hostinger, securing it with SSH keys and firewalls, and installing Herdr—a terminal multiplexer designed for agents. The setup culminates in connecting development tools like VS Code or Cursor over SSH, allowing for a continuous, centralized AI development workflow regardless of the local device status.

## Key takeaways

- Persistent Agent Workflow: By running agents on a VPS, the coding sessions continue even if the local laptop is closed or shut down, ensuring continuous development work.
- VPS Security Setup: The server must be secured by creating a root password, implementing SSH key authentication, and restricting access using a firewall to whitelist specific IP addresses.
- Agent Installation and Authentication: Agents (Claude Code, Codex) and GitHub CLI are installed and authenticated on the server using specific CLI commands, requiring browser authorization for tokens.
- Developer User Isolation: It is recommended to create a dedicated `developer` user account, rather than using root, for daily agent operations to maintain security best practices.

## Technical details

- VPS Setup: Use a VPS (e.g., Hostinger) with at least 8GB of RAM. The setup process includes setting a root password and adding a dedicated SSH key for secure access.
- SSH Key Management: Generate an SSH key pair locally (`ssh-keygen`) and copy the public key to the server's authorized keys file for authentication.
- User Management: Create a non-root `developer` user and grant it access to the necessary SSH keys and Herdr services.
- Firewall Configuration: Implement a firewall rule (e.g., in the VPS portal) to restrict SSH access (Port 22) only to whitelisted, fixed IP addresses.
- Agent Installation: Install and configure coding agents using CLI commands: `sudo ssh root @agentcloud` (for initial setup), followed by `clod code` and `codex` (as the developer user).
- Agent Authentication: Authenticate services (GitHub, Claude Code, Codex) using their respective CLI tools (e.g., `gh auth login`, `cloud auth login`, `codex login device`).
- Workflow Integration: Initialize the workspace by creating a `repositories` folder, cloning projects (`git clone`), and installing Herdr integrations (e.g., `Herdr integrations install claude`).

## Practical implications

- The setup provides a highly resilient, centralized environment for AI-driven development, decoupling the workflow from the physical machine.
- By using a dedicated developer user and firewall rules, the system significantly enhances security compared to using root access.
- The ability to connect via VS Code or Cursor over SSH allows developers to leverage familiar IDE features (file browsing, version control) while running the core agent logic on the cloud server.

## Topics

AI Agents, Cloud Computing, VPS Hosting, SSH Security, Terminal Multiplexing, DevOps Workflow, Hostinger VPS, Datalumina Proposal Framework, Herdr

Source: https://www.youtube.com/watch?v=s4stoQM_LT8
