> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/box/guides/hermes-setup&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Host Hermes Agent in a Cloud Sandbox and Connect from Hermes Desktop

> Host the Hermes agent by Nous Research in a keep-alive Upstash Box and use it from Hermes Desktop on your machine over SSH.

This guide hosts [Hermes](https://github.com/NousResearch/hermes-agent) in an Upstash Box and connects [Hermes Desktop](https://hermes-agent.nousresearch.com/docs/user-guide/desktop) on your machine to it over SSH. The agent runs in the box; you chat with it from the desktop app.

---

## 1. Create a Box

Create a box with the **Fixed (keep-alive)** plan and the **Medium** size. See the [quickstart](/box/overall/quickstart) if you haven't created one before.

<Note>
  Hermes is resource-intensive, so we recommend starting with a Medium box to ensure a smooth installation.
</Note>

<img src="/img/hermes-setup/box-create.png" alt="Creating a Fixed (keep-alive) Medium box in the Upstash Console" />

---

## 2. Connect via SSH

Once the box is running, [set up an SSH key](/box/overall/shell#ssh-keys) and connect to the box from your terminal. You'll use the same key to connect from Hermes Desktop later.

The `box-id` is the name of your box (e.g. `right-flamingo-14486`).

```bash
ssh -i ~/.ssh/upstash_box <box-id>@us-east-1.box.upstash.com
```

You can also copy the command from the **SSH** tab under **Connect** on the box's page in the console.

<img src="/img/hermes-setup/ssh-connect.png" alt="The SSH tab in the box's Connect section" />

---

## 3. Install Hermes

Run the following command to download and install Hermes inside the box.

```bash
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
```

Follow the CLI prompts to complete the setup.

---

## 4. Connect from Hermes Desktop

Hermes Desktop connects over SSH with the key from [step 2](#2-connect-via-ssh) and starts Hermes in the box for you.

In Hermes Desktop, go to **Settings → Gateways → This window** and choose **Connect via SSH**. Fill in:

1. **Host:** `us-east-1.box.upstash.com`
2. **User:** your box ID
3. **Identity file:** `~/.ssh/upstash_box`

Leave **Port** and **Hermes path** blank, then click **Save and reconnect**.

<img src="/img/hermes-setup/desktop-ssh.png" alt="Connect via SSH settings in Hermes Desktop" />

To add the box under **Saved connections** instead, which has no identity file field, first add it to `~/.ssh/config`:

```
Host hermes-box
  HostName us-east-1.box.upstash.com
  User <box-id>
  IdentityFile ~/.ssh/upstash_box
  IdentitiesOnly yes
```

Then use `hermes-box` as the host.

---

## 5. Start Chatting

That's it. Hermes Desktop now talks to the Hermes running in your box. The agent works in the box, not on your machine, and because the box is keep-alive, it's there whenever you open the app.

See the [Hermes docs](https://hermes-agent.nousresearch.com/docs) for what to do next, such as adding skills or connecting messaging channels.
