---
title: "Deploy Hermes Agent Discord"
description: "Hermes Agent messaging gateway on Discord"
category: "AI/ML"
url: https://railway.com/deploy/deploy-hermes-agent-discord-bot
---

# Deploy Hermes Agent Discord

Hermes Agent messaging gateway on Discord

**[Deploy Hermes Agent Discord on Railway](https://railway.com/template/deploy-hermes-agent-discord-bot)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-hermes-agent-discord-bot/manifest.json

- **Creator:** onepush
- **Category:** AI/ML

## Template content

### hermes-agent

- **Image:** nousresearch/hermes-agent:v0.22.0@sha256:c69536a39e885b8943329bda68cdf44492458b96aa74a212239bde9d2aeb406a
- **Start command:** `sh -c "mkdir -p /opt/data && chown -R 10000:10000 /opt/data && exec /opt/hermes/docker/entrypoint-dispatch.sh hermes gateway run"`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted Hermes Agent Discord (Open-Source AI Agent) on Railway

This template runs Hermes Agent's Discord gateway as a bot in one Railway service. Add a bot token and an allowlist, redeploy, then DM it. A silent bot usually means no access policy.

## About Hosting Hermes Agent Discord open-source software on Railway (self hosted Hermes Agent template)

This template runs the Hermes messaging gateway in one Railway service, connected straight to your Discord bot token. Your messages, agent memory, and skills live in the /opt/data volume, not on a third-party relay. You still own the Discord app, bot, and every allowlist decision in DISCORD_ALLOWED_USERS or DISCORD_ALLOWED_ROLES.

## Why Deploy Hermes Agent Discord, the ChatGPT agent alternative on Railway (Railway Free Trial)

Self-hosting Hermes gives you the bot token, allowlists, and transcript volume, so the agent only answers who you say and you pay only model API usage, not a platform fee. The $5 trial is enough to test role gating.

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 Discord 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 Discord self hosting

Railway turns the Hermes Agent Discord bot into a one-click deploy, while VPS providers leave you with a bare Linux box.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Managed Docker, instant env vars, logs, and public health checks | A droplet you must configure with Docker and reverse proxy yourself |
| AWS | A template service with automatic builds and fail-closed Discord access policy | EC2 or ECS setup with IAM, networking, and manual token handling |
| Hetzner | No server patching; gateway runs with one variable set | Cheap VPS but you install, secure, and restart the bot manually |

## Common Use Cases for hosted Hermes Agent Discord

- **Private DM assistant:** Each DM becomes its own session, so you can keep a running research thread without @mentions or server noise.
- **Team research channel:** With group_sessions_per_user on by default, two people in one channel do not share a transcript, keeping parallel work separate.
- **Role-gated helper for moderators:** Set DISCORD_ALLOWED_ROLES to a moderator role ID so only staff can invoke agent actions in admin channels.
- **Cron reports into a home channel:** Point DISCORD_HOME_CHANNEL at an ops channel and let scheduled jobs post summaries there while DMs stay clean.
- **Installed skills as slash commands:** Skills register as native Discord slash commands, so a research skill becomes /research for anyone with access.

## Dependencies for Hermes Agent Discord Docker hosted on Railway

The container needs a model provider key and a persistent volume; Discord needs a bot with the right intents and a token. The template handles the container, but you create the bot, then add `DISCORD_BOT_TOKEN` and an allowlist before redeploying.

### Deployment Dependencies for Managed Hermes Agent Discord Service (AI Agent)

- One service runs `hermes gateway run` on port 8642, health at `/health`.
- Persistent volume at `/opt/data` holds memory, skills, and the FTS5 index.
- API server variables are preset: enabled, host 0.0.0.0, port 8642, generated key.
- Set at least one provider key (`OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`, or `OPENAI_API_KEY`).
- No Discord variables are preset; add `DISCORD_BOT_TOKEN` plus `DISCORD_ALLOWED_USERS` or `DISCORD_ALLOWED_ROLES`.

### Implementation Details for Hermes Agent Discord (Using Hermes Agent official docker image)

The image runs the gateway in the same process as the API server. Minimum permissions: View Channels, Send Messages, Embed Links, Attach Files, Read Message History. The gateway fails closed: with no allowlist, every message is denied and `gateway.log` says no policy. Message Content is required; otherwise the bot stays offline.

## How does Hermes Agent Discord compare against other AI agent platforms

### Hermes Agent vs OpenClaw

- **Discord-first:** Hermes runs its gateway in-process, so Discord gets slash commands, auto-threads, and per-user sessions. OpenClaw treats it as a connector.
- **Fail-closed:** Hermes denies all messages without an allowlist; OpenClaw gates DMs with pairing codes instead.
- **Where OpenClaw wins:** A bigger channel and plugin ecosystem plus a web Control UI.

### Hermes Agent vs Letta

- **Memory:** Letta's explicit blocks beat Hermes' FTS5 notes for rigid state, so Letta wins for long research agents.
- **Discord fit:** Hermes has slash commands, a home channel, and auto-threads; Letta has no built-in Discord gateway.
- **Deployment:** Hermes is one container with one gateway command; Letta needs a server plus database.

### Hermes Agent vs n8n AI agents

- **Agent loop:** Hermes runs a real agent with tools, memory, and cron in one process; n8n agents stop when the workflow ends.
- **Discord integration:** Hermes has built-in auth, sessions, and slash commands; n8n needs webhooks and node logic for a mention.
- **Where n8n wins:** Visual automation for non-coders who prefer branching over autonomy.

### Hermes Agent vs ChatGPT agent

- **Data control:** Hermes is self-hosted, transcripts stay on your volume; ChatGPT agent goes through OpenAI's cloud.
- **Model freedom:** Hermes takes OpenRouter, Anthropic, or OpenAI keys and /model swaps; ChatGPT agent locks you to OpenAI.
- **Where ChatGPT agent wins:** Zero hosting effort and simpler if you already pay for ChatGPT.

## How to use Hermes Agent Discord (the OSS AI agent)?

1. Add a model provider key: OPENROUTER_API_KEY, ANTHROPIC_API_KEY, or OPENAI_API_KEY as a Railway variable.
2. Create a Discord application and bot in the Developer Portal.
3. On the Bot page, enable Message Content and Server Members intents.
4. Click Reset Token, copy the token once, and save it.
5. Invite the bot with scopes bot and applications.commands plus Send Messages, Embed Links, and Attach Files.
6. In Discord, enable Developer Mode and copy your numeric user ID.
7. Set DISCORD_BOT_TOKEN to the token and DISCORD_ALLOWED_USERS to your ID, then redeploy.
8. DM the bot; it replies without a mention and each DM is its own session.
9. @mention the bot in a server channel; it starts a thread by default.
10. Run /sethome in the channel that should receive cron output.

## How to self host Hermes Agent Discord on other VPS Services (Hermes Agent self hosting guide)

### Clone the Repository

Clone the source and enter the directory:

```bash
git clone https://github.com/NousResearch/hermes-agent
cd hermes-agent
```

### Install Dependencies

Run the official installer, which puts hermes on PATH, then run setup once:

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

### Configure Environment Variables

Create `~/.hermes/.env` with at least a model provider and Discord access:

```env
OPENROUTER_API_KEY=your-openrouter-key
DISCORD_BOT_TOKEN=your-discord-token
DISCORD_ALLOWED_USERS=your-user-id
```

Set `DISCORD_ALLOWED_ROLES` instead of users if you prefer role IDs. Without an allowlist the bot denies every message.

### Start the Hermes Agent Discord Application

Launch the gateway; Discord connects in the same process:

```bash
hermes gateway run
```

## Official Pricing of Hermes Agent Discord (Hermes Agent pricing)

Hermes Agent Discord is free and open source under the MIT license, so there is no license or seat fee. The optional Nous Portal is separate and paid, but this template does not require it.

## Hermes Agent Discord cloud vs self hosted comparison (Pricing, features, costs, and more)

The software is MIT licensed and free. You pay for a small container or VPS, plus whatever your model provider charges per token; Discord itself adds no hosting cost.

### Monthly cost of self hosting Hermes Agent Discord on Railway

Expect roughly $5 to $10 a month on Railway for a 512 MB to 1 GB service, not counting model API usage. Since Hermes calls external models, token spend usually dominates if you run it often.

### System Requirements for Hosting Hermes Agent Discord on a VPS

One process runs the API server and Discord gateway, so a 1 vCPU VPS with 512 MB to 1 GB RAM is enough. You need disk for the /opt/data volume and open port 8642. No GPU is required because inference happens at your model provider.

## Frequently Asked Questions (FAQs)

### Why is the bot offline?

Usually the Message Content intent is disabled or DISCORD_BOT_TOKEN is stale. Enable the intent, reset and copy the token, set it as a Railway variable, and redeploy.

### Why does it ignore me?

The gateway fails closed: with no users, roles, or channels allowlisted and no allow-all flag, it denies every message. Add your numeric user ID to DISCORD_ALLOWED_USERS and redeploy.

### Does it answer without a mention?

Yes in DMs and in channels listed in DISCORD_FREE_RESPONSE_CHANNELS. Otherwise it waits for an @mention unless DISCORD_REQUIRE_MENTION is set to false.

### Do people in one channel share context?

No by default. group_sessions_per_user is true, so each person gets a separate session; threads get their own transcript too.

### Can it read files or voice messages?

Yes. Uploaded files are cached and passed to the agent with a 32 MiB cap. Voice messages are transcribed with local faster-whisper, Groq, or OpenAI Whisper.

### What does it cost?

Hermes is MIT licensed and free. You pay only Railway hosting and your model provider; a small service runs about $5-10 a month plus API usage.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/deploy-hermes-agent-discord-bot
