
Deploy Hermes Agent Claude
Run Hermes Agent on Anthropic Claude models
hermes-agent
Just deployed
/opt/data
Deploy and Host self hosted Hermes Agent Claude (Self-Hosted AI Agent on Anthropic Claude) on Railway
Hermes Agent Claude runs the Hermes Agent server on Railway with Anthropic Claude as the model provider, so you pay Anthropic per token with your own ANTHROPIC_API_KEY.
About Hosting Hermes Agent Claude open-source software on Railway (self hosted Hermes Agent with Claude models template)
This template runs one service built from the pinned nousresearch/hermes-agent:v0.22.0 image on port 8642, with a health check on /health and a persistent volume at /opt/data.
Why Deploy Hermes Agent Claude, the Claude Code alternative on Railway (Railway Free Trial)
Claude Code is a terminal coding agent that runs only while you sit in a session. Railway's $5 trial covers a first test.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Hermes Agent Claude on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Hermes Agent Claude self hosting
Hermes Agent Claude runs as one long-lived service, so the hosting choice depends on how much server work you want to own.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | A pinned image, port 8642, a volume at /opt/data, and a generated API_SERVER_KEY. | A Linux droplet where you manage the firewall, Docker, TLS, and volume permissions. |
| AWS | One service and one volume, with no VPC or IAM setup before the first API call. | Fine-grained networking and IAM control, at the cost of much more setup. |
| Hetzner | A managed deploy with the /health check and ANTHROPIC_API_KEY set in service settings. | Low-cost raw servers that suit steady workloads, with restarts and backups on you. |
Pick the option whose operational overhead you are willing to carry, since the Claude bill is about the same on every host.
Common Use Cases for hosted Hermes Agent Claude
- Claude behind an OpenAI-compatible API: Point your tools at the Hermes API server on port 8642 and they reach a Claude model with the request shape they already use.
- Moving from Claude.ai chats to a persistent agent: Hermes keeps skills and memory on the /opt/data volume, so the agent picks up where it left off next week.
- Cheaper auxiliary models for vision and summaries: Vision and summarization calls default to your Claude main model, so override the auxiliary settings to send them to a cheaper model.
- Team access over the API server: Share the URL and API_SERVER_KEY so teammates use one agent and one Claude bill.
- Scheduled agent jobs on Claude: Use Hermes cron for recurring tasks like daily digests, paying per run instead of keeping a chat open.
Dependencies for Hermes Agent Claude Docker hosted on Railway
This template runs one Railway service on the pinned Hermes Agent image, with a persistent volume so config, memory and skills survive redeploys.
Deployment Dependencies for Managed Hermes Agent Claude Service (AI Agent)
The stack is one service running nousresearch/hermes-agent:v0.22.0, listening on port 8642 with /health as the health path and a volume mounted at /opt/data. HERMES_API_URL should be https://your-domain/v1.
Implementation Details for Hermes Agent Claude (Using Hermes Agent official docker image)
The start command creates /opt/data, sets its owner to uid 10000, then execs the image entrypoint with hermes gateway run. If the health check fails on first boot, check the volume mount path first.
How does Hermes Agent Claude compare against other ways to run a Claude-powered agent
Hermes Agent Claude vs Claude Code (Anthropic Terminal Coding Agent)
- Scope: Claude Code is built for working in a code repository from a terminal, while Hermes is a general agent you run on a server and reach from chat apps or scheduled jobs.
- Persistence: Hermes keeps memory and skills on the volume at /opt/data between sessions.
- Where Claude Code wins: For focused coding in a local checkout, it is more direct with less setup.
Hermes Agent Claude vs OpenClaw (Self-Hosted Agent With Scheduling)
- Overlap: Both are self-hosted agents with scheduling that run on your host with your own model keys.
- Migration: Hermes can import OpenClaw settings, memories and skills with hermes import-agent openclaw.
- Where OpenClaw wins: If your setup and skills already live in OpenClaw, staying put avoids a migration.
Hermes Agent Claude vs Claude.ai Projects (Hosted Chat Workspace)
- Hosting: Projects is a browser chat workspace, while Hermes runs as a service you control and reach over its API server.
- Automation: Hermes runs cron jobs and messaging gateways in the background, which a chat workspace is not built for.
- Where Projects wins: For occasional chat and document work, it is simpler with no server to maintain.
Hermes Agent Claude vs OpenRouter (Multi-Model Routing Gateway)
- Role: OpenRouter routes requests across many models, while Hermes is the agent that calls whichever provider you configure.
- Claude access: Going direct with ANTHROPIC_API_KEY skips the gateway hop and keeps billing simple for a Claude-only agent.
- Where OpenRouter wins: If you want to swap among many models from one key, it covers that more easily.
How to use Hermes Agent Claude (the OSS AI agent)?
Once the service is up, the first day is about pointing it at Claude and confirming the API server answers. Here is the sequence we run on a fresh deploy.
- Add
ANTHROPIC_API_KEYon the service with your pay-per-token key, and leaveAPI_SERVER_KEYas generated. - Set the provider to
anthropicand pick a Claude model, either inconfig.yamlon the volume or withhermes modelin the Railway shell. - Redeploy so the gateway loads the new variable and config.
- Call the API server with
API_SERVER_KEYto confirm Claude replies. - Switch models mid-session with
/model, but only among providers you have configured.
model:
provider: "anthropic"
default: "claude-sonnet-4-6"
curl https://your-domain/v1/chat/completions \
-H "Authorization: Bearer $API_SERVER_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Reply with one sentence."}]}'
How to self host Hermes Agent Claude on other VPS Services (Hermes Agent self hosting guide)
Running Hermes Agent on your own VPS gives you full control over the host and the Claude key. These steps assume a fresh Ubuntu box with root access.
Clone the Repository
Pull the Hermes Agent source onto the server.
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
Install Dependencies
Install Docker and pull the pinned image.
curl -fsSL https://get.docker.com | sh
docker pull nousresearch/hermes-agent:v0.22.0
Configure Environment Variables
Create a data directory with an env file holding your Claude key and a server key.
mkdir -p /opt/hermes-data
cat > /opt/hermes-data/.env <<'EOF'
ANTHROPIC_API_KEY=sk-ant-your-key
API_SERVER_ENABLED=true
API_SERVER_KEY=your-long-random-string
EOF
Set provider "anthropic" and a Claude model id in config.yaml in the same directory.
Start the Hermes Agent Claude Application
Run the container with the volume mounted and port 8642 exposed, then front it with a TLS reverse proxy.
docker run -d --name hermes -p 8642:8642 \
-v /opt/hermes-data:/opt/data \
--env-file /opt/hermes-data/.env \
nousresearch/hermes-agent:v0.22.0
Railway handles the domain, TLS, volume and restarts for you, which is why the hosted template is the shorter path.
Official Pricing of Hermes Agent Claude (Hermes Agent pricing)
Hermes Agent is free and open source under the MIT license, so there is no Hermes subscription. You pay for infrastructure and Claude usage.
Hermes Agent Claude cloud vs self hosted comparison (Pricing, features, costs, and more)
Running Hermes Agent on Claude has two shapes: hosted on Railway, or self hosted on a VPS you manage yourself. Model API spend is billed by Anthropic either way.
Monthly cost of self hosting Hermes Agent Claude on Railway
Railway typically runs this template at about $5 to $10 per month for a 512 MB to 1 GB service, plus your Anthropic API usage. The $5 trial covers initial testing.
System Requirements for Hosting Hermes Agent Claude on a VPS
A VPS needs enough RAM for the gateway process, a persistent disk for ~/.hermes and the /opt/data volume, and outbound HTTPS to Anthropic.
Frequently Asked Questions (FAQs)
Should I use an API key or Claude Max OAuth?
Use ANTHROPIC_API_KEY for a pay-per-token setup that works on any plan.
Does a Claude Pro subscription cover my agent?
No. Pro subscribers cannot use the OAuth login path, so the agent needs an API key and bills separately from your Pro plan.
Which model ID should I use?
Start with claude-sonnet-4-6 in config.yaml under default:, then test it with hermes chat --provider anthropic --model claude-sonnet-4-6.
Do auxiliary tasks add to my bill?
Yes. Override auxiliary.* per task to a cheaper model to cut that cost.
How do I switch providers?
Run hermes model from a terminal outside a session to add providers, then use /model inside a chat to move between them.
Where are my keys stored?
On Railway, service variables hold ANTHROPIC_API_KEY and API_SERVER_KEY. Outside Railway, the keys live in ~/.hermes/.env, so keep that file out of version control.
Template Content
hermes-agent
nousresearch/hermes-agent:v0.22.0
