Techvoyage
Home
A step-by-step guide to deploying Hermes Agent on a remote Linux VPS and integrating it with a custom Telegram bot for 24/7 uptime.

How to Deploy Hermes Agent on a Linux VPS

Deploy the Hermes Agent on a remote VPS for 24/7 uptime. Follow our step-by-step guide to integrate it with a custom Telegram bot.

Jun 19, 2026 - 5 MIN READ
Table of contents

Why Host Hermes Agent on a Remote VPS?

Since the Hermes Agent is capable of running background tasks, scheduling tasks, and responding to webhook calls, we need a machine to be on standby 24/7. Local machines can lose power, get disconnected from Internet or having the resources maxed out. A remote server guarantees 99% uptime and makes it easy to scale computation resources when needed.

There are several affordable virtual private server(VPS)) providers out there such as Hetzner, Hostinger and Contabo. We have been using Contabo for a while, and so far so good.

How to Set Up Hermes Agent on a Linux VPS

Step 1: Connect to Your VPS

Open the terminal and SSH into your remote machine:

ssh root@your_server_ip

Ensure your server packages are up to date:

sudo apt update && sudo apt upgrade -y

Add a new user, hermes, or your preferred username:

sudo adduser hermes 
sudo passwd hermes

Turn off root password login:

  1. Open the SSH configuration file:
sudo nano /etc/ssh/sshd_config
  1. Locate the PermitRootLogin line and change its value to no:
PermitRootLogin no
  1. Save the file and restart the SSH service:
sudo systemctl restart ssh

Step 2: Install Hermes Agent

Run the following command:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

Once installed, verify the installation by typing:

hermes --version

Run hermes setup to configure the Hermes Agent:

Select an LLM provider, start with DeepSeek and add others later.

Enter DeepSeekAPI key: Select local machine for running the Hermes Agent: Select Telegram in the channels. Other channels can be configured later.

Step 3: Integrating with Telegram

Select [2] for using Telegram bot.

Head to Telegram and search for 'BotFather'.

Click Open to open 'BotFather'.

Click Create a New Bot.

Fill in the names and create the bot.

Click Copy to copy the token and paste it back to the terminal.

Find the Telegram user account ID and add it to the 'Allowed user list':

  • Search '@raw_data_bot' on Telegram
  • Click on RawDataBot then click Start button. The user ID will be shown behind P.S. Your ID:.
  • Copy the user ID and paste to the terminal.

Since we are running on the cloud, we want the service to be started automatically. Leave everything as default:

Testing Your Hermes Agent with Telegram Bot

Run the following command to start the hermes gateway:

hermes gateway

Head to Telegram and add the created bot, '@tech_cloud_hermes_bot', to our chats.

  • type '/new' in Telegram to start a new Hermes Agent session.
  • type /commands will list all available commands.
  • type /model to see a list of available LLMs.

Running Hermes Gateway as a Background Service

Create service file:

sudo nano /etc/systemd/system/hermes-gateway.service

Paste the following, replace hermes in '/home/hermes' with your preferred username:

[Unit]
Description=Hermes Gateway
After=network.target

[Service]
User=hermes
WorkingDirectory=/home/hermes
ExecStart=/home/hermes/.local/bin/hermes gateway
Restart=always
RestartSec=10
Environment=PATH=/home/hermes/.local/bin:/usr/local/bin:/usr/bin:/bin

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable hermes-gateway
sudo systemctl start hermes-gateway
sudo systemctl status hermes-gateway

Conclusion

In this article, we focused on how to set up the Hermes Agent and use Telegram to communicate with it. Having the Hermes Agent running on a remote server provides a true digital assistant that runs 24/7.

Related Articles