Writing
How to Connect a Self-Hosted Hermes AI Agent on Hostinger VPS to VS Code
An exploratory guide to connecting VS Code to a VPS running Hermes Agent, with notes on SSH, container configuration and credentials.
By Ka Lun Chan · The lab · Learning / AI
Why explore a self-hosted agent?
This guide collects the steps for a learning environment: host Hermes on a VPS, open a remote workspace and inspect the service. A proposed job-search workflow gives the setup a concrete example.
Hermes Agent is an open-source, self-hosted AI agent from Nous Research. It runs as a long-lived process on your own server, loads small instruction files called skills when a task needs them, schedules recurring jobs with its own cron, and talks to you through a gateway that connects to Telegram and other messaging platforms. You bring the model: an Anthropic, OpenAI or OpenRouter key, a local model, or the credits a host bundles.
A self-hosted agent makes scheduling, storage and permissions visible. It offers a way to study the infrastructure around the model.
Remote-SSH gives the editor, file tree and terminal access to the remote workspace. Use it to inspect configuration and logs without editing the local copy by accident.
- MacBook to Hostinger VPS
- Hostinger VPS to Docker
- Docker to Hermes Agent
- Hermes Agent to Anthropic API
- Hermes Agent to nexos.ai credits
What you need
- A Hostinger VPS with Hermes Agent installed. In hPanel, open the VPS, then Docker Manager, then Catalog, search for Hermes Agent and select it. The wizard asks for an admin username and password and offers to connect nexos.ai credits if your plan included them. Hostinger’s own tutorial recommends at least 2 vCPU and 8 GB of RAM for the agent.
- Visual Studio Code on your laptop, with Microsoft’s Remote - SSH extension.
- SSH access to the VPS: its IP address, and the root password Hostinger set, which you will stop using once a key works.
- An SSH key pair. Password logins work, and keys are the right habit on a server that will hold API credentials.
- Basic Docker familiarity: what a container, an image and a volume are, and that a container’s filesystem is disposable unless a path is mounted.
Everything below is from a Mac. Linux is the same. Windows users can do all of it from PowerShell with OpenSSH, which ships with Windows.
Configure SSH access
Generate a key pair on the laptop. The comment is a label so you recognize the key later; it is not a secret.
ssh-keygen -t ed25519 -C "hermes-vps"
# accept the default path (~/.ssh/id_ed25519) and set a passphraseInstall the public key on the VPS. If password SSH works, the quickest route is the standard helper, which appends the key to the server’s authorized keys and fixes permissions:
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@YOUR_VPS_IPIf SSH does not work yet at all, which is common right after provisioning or after a firewall change, use the browser terminal in hPanel. Open the VPS, start the browser terminal, log in as root, and paste the key in by hand:
mkdir -p ~/.ssh && chmod 700 ~/.ssh
echo "ssh-ed25519 AAAA...your public key... hermes-vps" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keysThen give the host a short name on the laptop so you never type the IP again. The name is what VS Code will show.
Host hermes
HostName YOUR_VPS_IP
User root
Port 22
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yesTest it. The first connection asks you to confirm the server’s fingerprint; after that it should drop you at a prompt without a password.
ssh hermesOnce the key works, create a non-root user for day-to-day administration and use root only when something needs it. A mistake typed as root on a server that holds API keys has no safety net.
adduser kc
usermod -aG sudo,docker kc
mkdir -p /home/kc/.ssh && cp ~/.ssh/authorized_keys /home/kc/.ssh/
chown -R kc:kc /home/kc/.ssh && chmod 700 /home/kc/.ssh && chmod 600 /home/kc/.ssh/authorized_keysChange User root to User kc in the SSH config after that, and consider turning off password authentication in the server’s SSH daemon once you have confirmed the key login works from a second terminal. Adding the user to the docker group lets them run Docker commands without sudo; it also makes them effectively root for Docker, which is why the account still needs a strong key and nothing else on it.
Connect VS Code to the VPS
- Install the Remote - SSH extension from Microsoft in VS Code.
- Open the Command Palette (Cmd+Shift+P on a Mac).
- Run Remote-SSH: Connect to Host.
- Pick
hermes. VS Code reads it from the same SSH config file you edited. - A new window opens and installs the VS Code server on the VPS. The first time takes a minute. The status bar’s bottom-left corner shows SSH: hermes when it is connected.
- Open a folder with File, then Open Folder. Start with your home directory; you will add the agent’s paths once you know them.
- Open the integrated terminal (Ctrl+backtick). It is a shell on the VPS, not on your laptop.
In a remote window, the file tree, terminal and remote extensions operate on the server. Check the remote indicator before saving or running a command.
Find the Hermes container
Hostinger’s one-click install runs Hermes inside Docker, so the agent is not installed on the host the way a package would be. From the remote terminal:
docker psIn the container list, check the image, exposed ports, status and name. The image and container name can vary by template version.
Read the logs for the actual container name shown in the list:
docker logs --tail 100 CONTAINER_NAME
docker logs -f CONTAINER_NAME # follow live; Ctrl+C to stopTo get a shell inside the container:
docker exec -it CONTAINER_NAME /bin/sh
# or, if the image has it:
docker exec -it CONTAINER_NAME /bin/bashInside, you are in the agent’s environment, with the hermes command on the path. Two things to find out while you are there: where its configuration lives, by default the .hermes directory in the container user’s home, and which paths are volumes.
docker inspect CONTAINER_NAME --format '{{json .Mounts}}'Paths listed there survive a container restart or recreate. Anything you change elsewhere inside the container is gone the next time the template updates or the container is rebuilt. Put your configuration, skills and data on a mounted path, and if the config directory is not mounted, mount it before you spend an evening configuring the agent.
Configure Hermes to use Claude
Keep the product subscription, API billing, Hermes provider settings and any hosting credits distinct. Confirm which account is charged for the configured model.
A Claude subscription does not give you Anthropic API credits. For Hermes, the predictable route is an Anthropic API key, billed per token to the developer platform account. Hermes can also reuse a Claude Code login through OAuth, and its own docs say that path needs a Max plan with extra-usage credits; users on other plans report running into usage errors. Hostinger’s nexos.ai credits are the simplest start if your plan included them, and they are finite.
Hermes keeps non-secret settings in ~/.hermes/config.yaml and secrets in ~/.hermes/.env, and it has an interactive command that writes both. Run it inside the container:
hermes model
# choose Anthropic, paste the API key when asked, pick a Claude modelOr set the pieces directly. The config command writes keys to the env file, so the secret never lands in the YAML:
hermes config set ANTHROPIC_API_KEY sk-ant-... # written to ~/.hermes/.env
hermes config edit # opens config.yaml
hermes config check # validates what you havemodel:
provider: anthropic
default: claude-sonnet-4-6 # pick a current model from the Anthropic docsThe Hermes configuration and provider documentation are the source of truth for the exact keys, and they change between releases, so read the version that matches your container. If Hostinger’s wizard already connected nexos.ai credits, the provider is set for you and you can leave it until you want your own key.
On credentials: the env file is the only place the key belongs. Never put it in config.yaml, in a skill, in a Git repository, or in a screenshot of your terminal; if you paste a terminal into a post, redact the line first, and if you ever expose a key, revoke it in the Anthropic console and make a new one. Keep the file permissions tight (chmod 600), keep the directory on a volume, and prefer a key created for the agent alone, so revoking it affects nothing else.
Using Hermes from VS Code
With the remote window open, the work is ordinary. Open ~/.hermes from the container’s mounted volume on the host, or exec into the container, and edit config.yaml and your skills in the editor. Run hermes commands in the integrated terminal through docker exec: chat with it, list and add cron jobs, start the gateway. Keep a second terminal following the container logs while you try things, because the log is where a bad config or a rejected key shows up first. Write the scripts and skills for an automation on the host, in a project folder under version control, and bind-mount or copy them into the container where the agent can load them.
One expectation to set straight: Remote-SSH gives you remote development access to the machine Hermes runs on. It does not make Hermes a coding assistant inside VS Code. Hermes is an agent you talk to through its CLI, its gateway and its scheduled jobs; the editor is how you administer it and build around it. The companion post proposes developing and testing a Python pipeline before trying a scheduled run in Hermes.
Common problems
Permission denied (publickey,password). The server rejected both methods. Usually the public key is not in the right file, or permissions are wrong: the home directory must not be group-writable, ~/.ssh must be 700, and authorized_keys must be 600, all owned by the user you log in as. Check which key the client offered with ssh -v hermes; if it is offering the wrong one, IdentitiesOnly yes with the right IdentityFile fixes it. If you pasted the key through the browser terminal, confirm it is one line with no breaks.
Wrong private key. If you have several keys, ssh-add -l on the laptop shows what the agent holds, and the SSH config pins the one to use. The public key on the server must match that private key, which ssh-keygen -y -f ~/.ssh/id_ed25519 will print for comparison.
VS Code connects, then hangs. Usually the VS Code server failed to install on the VPS, often from a full disk or a missing tar. Check free space with df -h and read the Remote-SSH output panel.
Container not running. docker ps -a shows exited containers too. docker logs CONTAINER_NAME says why. docker start CONTAINER_NAME brings it back, and if it exits again immediately, the log holds a configuration error.
hermes: command not found. You are on the host, and Hermes lives in the container. Prefix the command with docker exec -it CONTAINER_NAME, or exec into the container first.
Missing or rejected API key. hermes config check inside the container, then look at the env file’s permissions and spelling of the variable name. An HTTP 401 in the log is a bad or revoked key; an error mentioning extra usage means the OAuth route is hitting the subscription billing limit described above.
Changes vanish after an update. They were written to the container’s own filesystem, not a volume. Re-check docker inspect mounts and move your configuration and skills onto a mounted path. Note that hermes update refuses to run inside Docker by design; updates come from pulling a new image.
Exposed ports. If docker ps shows a port published as 0.0.0.0:PORT, it is reachable from the whole internet unless the VPS firewall blocks it. An agent with shell access and your API keys should not have a public port. Bind management interfaces to localhost and reach them through an SSH tunnel, and keep the gateway’s user allow-list on; Hermes’s own deployment guidance warns against allowing all users.
A proposed workflow for the lab
The proposed job-search workflow would collect public postings, filter by location and seniority, compare them with an example profile, and generate a brief for human review.
Hermes could provide scheduling, skills, messaging and persistent state. Job-board clients, filtering, storage and scoring would still need implementation and verification. See the companion design.
Short answers
Does a Claude subscription give Hermes access to the Anthropic API?
No. A Claude Pro, Max or Team subscription pays for the Claude apps and Claude Code. The Anthropic API is a separate pay-per-token account with its own key, and that key is the predictable way to run Hermes on Claude. Hermes can reuse a Claude Code login through OAuth, but its docs say that path needs a Max plan with extra-usage credits.
Where does Hermes Agent store its configuration and API keys?
Non-secret settings live in ~/.hermes/config.yaml and secrets in ~/.hermes/.env, inside the container user’s home. The hermes model command writes both interactively, and hermes config set writes a key to the env file so it never lands in the YAML. Keep that directory on a Docker volume or the changes vanish when the container is recreated.
Why does “hermes: command not found” happen on a Hostinger VPS?
Because Hostinger’s one-click install runs Hermes inside a Docker container, so the command exists in the container, not on the host. Run it through docker exec -it CONTAINER_NAME hermes, or open a shell in the container first.
How can you troubleshoot “Permission denied (publickey,password)” when connecting to the VPS?
Check that your public key is in ~/.ssh/authorized_keys for the user you log in as, that ~/.ssh is mode 700 and authorized_keys is 600, and that the client is offering the right key, which ssh -v shows. Pin the key with IdentityFile and IdentitiesOnly yes in your SSH config. If SSH is unreachable, paste the key through the hPanel browser terminal.
Where this leaves the setup
With key-based access and a non-root account, a learner can inspect the container and find its data, configuration and logs from VS Code.
Next in the series: the first scheduled runs of the job-search agent, and what broke.