---
title: "Setting Up Hermes Agent on a Cloud Server | Hostman Docs"
description: "Learn how to deploy Nous Research's self-hosted Hermes Agent on Hostman, connect it to an AI agent or AI Gateway, and manage sessions from the terminal interface."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

[Hermes Agent](https://hermes-agent.nousresearch.com/) is a self-hosted AI agent from Nous Research. It runs on your own server, works with files and tools, executes terminal commands, and keeps a history of your sessions. You interact with the agent through a text-based interface in the terminal.

Hostman provides a ready-to-use image with Hermes pre-installed. Once you've created a server, all that's left is to connect it to an AI agent or to AI Gateway.

## Creating a Server

1.  In the control panel, go to the [Cloud Servers](https://hostman.com/my/servers) section.
2.  Click **Create Server**.
3.  Choose a region for your server.
4.  On the **Image** step, open the **Marketplace** tab and select the **Hermes** image.

![Create Server 2026 08 03 17 25](https://content.hostman.com/assets/a4d4a512-d37a-4572-ad8b-6aa455e00b81.png?width=742&height=708)

5.  Choose a server configuration and adjust any other settings as needed (you can leave the defaults).
6.  Click **Create**.

Hermes and all the components it needs are installed automatically when the server is created.

## Choosing a Connection Method

You can connect Hermes to either an [AI agent](https://hostman.com/docs/ai-agents/) or to [AI Gateway](https://hostman.com/docs/ai-agents/ai-gateway/).

**If you connect to an AI agent**, you'll be able to use a [knowledge base](https://hostman.com/docs/ai-agents/manage-knowledge-bases/). In this case, Hermes works with a single model—whichever one is selected in the agent's settings. To switch models, change the model in the Hostman dashboard.

**If you connect to the AI Gateway**, you won't be able to use AI agent knowledge bases. However, you'll be able to choose any model available in AI Gateway and switch between models on the fly.

Before you start, gather the connection details you'll need:

#### For an AI agent

-   [Base URL of the agent](https://hostman.com/docs/ai-agents/api-usage/openai-compatible-api/#base-url): shown in the agent’s **Dashboard**
-   [Access key](https://hostman.com/docs/ai-agents/manage-agents/api-access-key/)

If you haven't created an AI agent yet, [follow this guide](https://hostman.com/docs/ai-agents/manage-agents/create/).

![C424c212 63bf 4019 9219 44cb2787635c.png](https://content.hostman.com/assets/93474a51-a6e5-49d8-a2ed-1145439daf21.png?width=1560&height=1410)

_Agent's Base URL in the Dashboard_

#### For AI Gateway

-   Base URL: `https://ai-api.hostman.com/v1`
-   [AI Gateway API key](https://hostman.com/docs/ai-agents/ai-gateway/connection/#creating-an-api-key)

Note that AI Gateway uses its own separate keys, unrelated to AI agent keys.

## Setting Up the Connection

**Step 1. Connect to your server over SSH**

1.  Open a terminal: Terminal on macOS/Linux, PowerShell on Windows.
    
2.  Open the server's **Dashboard** tab and copy the command from **SSH connection**.
    

![Hermes 2026 08 03 17 32](https://content.hostman.com/assets/1a61bb6e-714a-49ed-9f4c-1f8ddfd5e972.png?width=1578&height=1152)

_SSH connection command in the Dashboard_

3.  Paste the command into your terminal and press **Enter**.
    

**Step 2. Confirm the connection (first time only)**

On your first connection, you'll see a prompt like this:

```shell
Are you sure you want to continue connecting (yes/no/[fingerprint])?
```

Type `yes` and press Enter.

Enter the root password from the **Dashboard** when prompted. The password won't be displayed as you type—this is normal terminal behavior.

![Hermes 2026 08 03 17 34](https://content.hostman.com/assets/8bc3fbb3-636f-4e9f-b7c7-278371bb9bdb.png?width=1577&height=1152)

_Server root password in the Dashboard_

**Step 3. Exit Hermes to access the server console**

The Hermes text interface opens automatically once you connect. 

To run the setup script in the next step, you need to return to the server console first.

To do this, type `/exit` and press **Enter**.

**Step 4. Run the setup script**

Run this command in the terminal:

```shell
curl -fsSL https://st.hostman.com/cloud-static/hostman-hermes-autoinstall.sh -o /tmp/hostman-hermes-autoinstall.sh && bash /tmp/hostman-hermes-autoinstall.sh
```

**Step 5. Enter your configuration details**

The script will prompt you for:

-   **Base URL**: The base URL of your AI agent or AI Gateway
-   **API Key**: The access key

**Step 6. Review and confirm**

After you enter these values, the script checks the connection and displays the resulting configuration.

Review the values. If everything looks correct, type `y` and press **Enter**.

The script will add the `ai-agent` provider and open the chat interface.

![Hql Y53 Nkti](https://content.hostman.com/assets/654341eb-16ea-4e94-8b08-c43e5b3905d2.png?width=1103&height=639)

_[Hermes Agent](https://hermes-agent.nousresearch.com/) interface in [Windows PowerShell](https://learn.microsoft.com/en-us/powershell/)_

## Selecting a Model in AI Gateway

This step is only needed if you're connecting through AI Gateway. When using an AI agent, Hermes always talks to the model selected in the agent's settings.

In the Hermes interface, run:

```shell
/model
```

This opens the model selection window. Choose the `ai-agent` provider, then select the model you want to use.

You can change the model at any time during your session using the same `/model` command.

## Working with Hermes

To manually launch the Hermes text interface, run:

```shell
hermes --tui
```

From this interface, you can send requests to the agent, view its responses, and track tool executions.

Useful commands:

| **Command** | **Action** |
| --- | --- |
| `/help` | Open the list of commands |
| `/model` | Select a model |
| `/sessions` | Switch between open sessions or start a new one |
| `/usage` | View token usage and context fill level |
| `/new` | Start a new conversation |
| `/details` | Show or hide tool call details |

To resume your last session after exiting, run:

```shell
hermes --tui --continue
```

To open a specific saved session by its ID or name, use:

```shell
hermes --tui --resume "<id_or_name>"
```

Key keyboard shortcuts:

| **Shortcut** | **Action** |
| --- | --- |
| `Enter` | Send a message |
| `Alt+Enter` or `Ctrl+J` | Add a new line |
| `Ctrl+C` | Cancel the current operation; pressing it again exits Hermes |
| `Ctrl+D` | Exit Hermes |

Once everything is set up, send the agent a test request to confirm it responds correctly. If you're using AI Gateway, select a model with `/model` first.

For other commands and interface features, see the [official Hermes documentation](https://hermes-agent.nousresearch.com/docs/user-guide/tui).
