Blog / channel guide

Hermes Agent Mattermost Setup for Self-Hosted Teams

Mattermost is the self-hosted Slack alternative, which makes it a natural home for Hermes Agent when message data has to stay on your own infrastructure. The assistant connects as a bot, answers direct messages immediately, and waits for a mention in public and private channels.

Updated Sep 15, 20268 min read
Deployment route
  1. 01

    Enable bot accounts on the server

    A system administrator has to turn on bot accounts in the Mattermost system console under integrations before any bot can be created.

  2. 02

    Create a bot and copy its token

    Create a dedicated bot account for the assistant with a clear name and description, then copy the generated token once and store it safely.

  3. 03

    Add the bot to the right teams and channels

    Add the bot only to the teams and channels where it should work. Least privilege is easier before rollout than after.

  4. 04

    Store the token in the deployment

    Paste the bot token into the Hermes Agent deployment screen and select Mattermost as the channel. The token is stored as a protected secret.

  5. 05

    Test a direct message first

    Send the bot a direct message, which needs no mention. A reply here proves the token, the server URL, and the runtime are all correct.

  6. 06

    Confirm mention gating in a channel

    Message a channel without mentioning the bot, then mention it. In channels the assistant should ignore the first message and answer the second.

Four-step path

How do you add Hermes Agent to Mattermost?

Five checkpoints: enable bot accounts on the server, create the bot, grant it channel access, store the token, then prove a direct message and a channel mention.

  1. Step 01

    Enable bot accounts on the server

    A system administrator has to turn on bot accounts in the Mattermost system console under integrations before any bot can be created.

  2. Step 02

    Create a bot and copy its token

    Create a dedicated bot account for the assistant with a clear name and description, then copy the generated token once and store it safely.

  3. Step 03

    Add the bot to the right teams and channels

    Add the bot only to the teams and channels where it should work. Least privilege is easier before rollout than after.

  4. Step 04

    Store the token in the deployment

    Paste the bot token into the Hermes Agent deployment screen and select Mattermost as the channel. The token is stored as a protected secret.

  5. Step 05

    Test a direct message first

    Send the bot a direct message, which needs no mention. A reply here proves the token, the server URL, and the runtime are all correct.

  6. Step 06

    Confirm mention gating in a channel

    Message a channel without mentioning the bot, then mention it. In channels the assistant should ignore the first message and answer the second.

Why run the assistant on Mattermost?

Because Mattermost is self-hosted, running the assistant there keeps conversations on infrastructure you control while still giving the team a familiar chat interface.

For teams that already rejected cloud chat for compliance reasons, Mattermost is the option that lets them adopt an assistant without reopening that decision.

How is the bot created?

A system administrator enables bot accounts on the server, then creates a bot account for the assistant. The bot gets its own identity and token, separate from any human login.

  • Bot accounts must be enabled server-side first; there is no per-team override.
  • Use a dedicated bot rather than a shared human account, so revocation is clean.
  • Store the token once and never leave it in a channel or ticket.
  • Give the bot a recognisable display name so colleagues know what they are talking to.

When does the Mattermost bot answer?

Direct messages are always answered, and each direct message keeps its own session. In public and private channels the assistant answers only when it is mentioned.

  • Direct messages: always answered, one session per conversation.
  • Channels: mention required, otherwise the assistant stays quiet.
  • Threads: each thread keeps its own context namespace.
  • Shared channels: session history is isolated per user by default.

Should the assistant reply in threads or flat?

Threads are usually the better default in active channels, because replies stay attached to the question instead of interleaving with unrelated conversation.

Flat replies keep a channel readable when traffic is low, but in a busy channel they make the assistant look noisy. Changing the reply mode later is a configuration change, so start with whichever your team already expects.

How are shared channels handled?

Each user in a shared channel gets their own session by default, so colleagues do not accidentally share one transcript or one growing context window.

Sharing one session across a channel is possible but changes the economics and the experience: everyone pays for the context growth, and one person's long task can interrupt another person's follow-up.

Which primary sources support this page?

Product behavior is checked against the current deployment flow. These external links provide the upstream project or channel documentation used for setup details.

Direct answers

Frequently asked questions

Do I need a public URL for Mattermost?

No. The bot uses the Mattermost API and a WebSocket connection, so it works on an internal server that is not exposed to the internet.

Can the bot work in several teams?

Yes, as long as it has been added to them. Start with one team, confirm the behaviour, then expand deliberately.

Why does the bot ignore messages in a channel?

Because a mention is required there. Either mention the bot or change the configuration for that specific channel.

What happens if the bot token is rotated?

The deployment stops working until the stored token is replaced. Update the secret in the deployment screen and restart it.

Key takeaways

  • Mattermost is the self-hosted Slack alternative, which makes it a natural home for Hermes Agent when message data has to stay on your own infrastructure. The assistant connects as a bot, answers direct messages immediately, and waits for a mention in public and private channels.
  • Start with one model, one channel, and one controlled test conversation.
  • Use managed hosting when deployment speed matters more than operating the server yourself.

Put Hermes Agent in the channel where the work already happens.