Blog

OpenClaw Discord Setup: How to Run Your AI Assistant in a Private Server

April 5, 2026OpenClawCrew8 min read
OpenClaw Discord Setup: How to Run Your AI Assistant in a Private Server

Discord is one of the best OpenClaw channels if you want a private workspace with separate rooms for separate kinds of work.

That is the real appeal. You are not just adding a bot to a server. You are creating an environment where #ops, #research, #content, #ideas, and private threads can each become their own agent conversation with their own context. If you set it up well, Discord becomes a clean control surface for a personal or team assistant.

This guide covers the practical OpenClaw Discord setup from start to finish: creating the bot, enabling the right intents, inviting it to your server, pairing the first DM, allowlisting the guild, and deciding when the assistant should speak freely versus only when @mentioned.

For official references, see the Discord docs, the OpenClaw getting started guide, and the GitHub repository. For the surrounding operating model, also read Setup Guide, Multi-Agent, Memory, and OpenClaw for developers.

Why Discord works so well for OpenClaw

Discord gives you structure out of the box.

You already have:

  • separate channels
  • private and shared rooms
  • threads
  • server-level access control
  • a place to keep ongoing project conversations separated

OpenClaw's session model maps neatly onto that. According to the docs, guild channels are isolated session keys, so different channels do not all share one giant context buffer.

That means you can use Discord as a real workspace, not just another inbox.

What you need before setup

Before you touch Discord settings, make sure OpenClaw itself is installed and running.

The official getting started flow is still the same:

curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw gateway status

You will also need:

  • a Discord account
  • a private server you control
  • a bot token from the Discord Developer Portal
  • your Server ID and User ID

The docs recommend starting with your own private server. That is good advice. Discord gets much easier when you test in a space you control.

Step 1: create the Discord application and bot

Go to the Discord Developer Portal and create a new application.

Then:

1. open the Bot section
2. create or enable the bot
3. choose a bot username
4. copy the bot token

Again, treat that token like a password.

Do not paste it into a chat. Do not drop it into a public note. Store it as a secret or env reference.

Step 2: enable the right privileged intents

This is one of the most important Discord-specific steps.

The OpenClaw docs call out these privileged gateway intents:

  • Message Content Intent, required
  • Server Members Intent, recommended
  • Presence Intent, optional

If Message Content Intent is off, your agent will not see what it needs to see. If Server Members Intent is off, some allowlist and member-resolution behavior becomes harder.

A lot of broken Discord bot setups trace back to missing intents, not bad OpenClaw logic.

Step 3: generate the invite URL and add the bot to your server

In the OAuth2 URL Generator, enable:

  • bot
  • applications.commands

Then give the bot the permissions it needs. The docs list these as a practical minimum:

  • View Channels
  • Send Messages
  • Read Message History
  • Embed Links
  • Attach Files
  • Add Reactions, optional

Invite the bot into your server once the URL is generated.

At this point, the bot exists in Discord, but OpenClaw still needs to be told how to use it.

Step 4: collect your IDs and configure the token securely

Enable Developer Mode in Discord so you can copy:

  • your Server ID
  • your User ID

Then set the token securely on the machine running OpenClaw. The docs show this pattern:

export DISCORD_BOT_TOKEN="YOUR_BOT_TOKEN"
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN --dry-run
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
openclaw config set channels.discord.enabled true --strict-json
openclaw gateway

That is a good setup because the token is referenced rather than copied inline into chat.

The docs also note that plain text channels.discord.token is supported, but env-backed or secret-backed config is the better habit.

Step 5: approve the first Discord DM pairing

Once the gateway is running, DM your bot in Discord.

By default, Discord DMs use pairing mode in OpenClaw. That means the bot will answer with a pairing code first.

Approve it with:

openclaw pairing list discord
openclaw pairing approve discord <CODE>

That opens the DM path cleanly. If you are already using another OpenClaw channel, you can also ask the agent to approve the pairing code for you, which is a nice touch in multi-channel use.

Step 6: turn your server into a real workspace

This is where Discord becomes more than just another messaging channel.

The docs recommend adding the guild to the allowlist so the agent can respond inside server channels, not just in DMs.

A practical config looks like this:

{
  "channels": {
    "discord": {
      "groupPolicy": "allowlist",
      "guilds": {
        "YOUR_SERVER_ID": {
          "requireMention": true,
          "users": ["YOUR_USER_ID"]
        }
      }
    }
  }
}

That means:

  • only this guild is allowed
  • only the allowed user can trigger the bot there
  • the bot only replies when mentioned

This is a very good starting posture for a private work server.

Step 7: decide whether your server should require mentions

The docs also show how to turn requireMention off for a private server.

{
  "channels": {
    "discord": {
      "guilds": {
        "YOUR_SERVER_ID": {
          "requireMention": false
        }
      }
    }
  }
}

Should you do that?

Usually only if:

  • the server is private
  • the channels have clear roles
  • your workspace files are already strong
  • you want the assistant to feel like an active participant

If the server is shared or experimental, keep mentions required.

Mention gating is not a nuisance. It is the thing that keeps the agent from becoming socially clumsy.

Step 8: use channel isolation to your advantage

This is where Discord shines.

OpenClaw routes guild channels into isolated channel sessions. In plain English, that means your #research channel can carry a different conversation context than #ops or #ideas.

That lets you set up a server like this:

  • #inbox for quick questions
  • #content for writing drafts
  • #ops for recurring tasks and process notes
  • #research for analysis and source collection
  • #home for non-work personal use

That kind of separation is hard to fake in a plain DM-only workflow.

If you want even more separation by role or team, that is when you start reading Multi-Agent and planning different agent bindings.

Step 9: remember how memory works in guild channels

The Discord docs make an important point: long-term memory files like MEMORY.md are not automatically loaded in guild channels the same way they can be in direct contexts.

That is not a bug. It is a safety and scope choice.

If you need long-term context in Discord channels, the docs recommend either:

  • putting stable shared instructions into AGENTS.md or USER.md
  • or using memory tools on demand when deeper context is needed

This is a good design. It prevents every shared channel from accidentally inheriting the full private memory layer.

Step 10: use Discord like a workspace, not a novelty bot server

Here is the setup pattern I would actually recommend.

1. Start with one private server.
2. Pair DMs first.
3. Allowlist the server.
4. Keep mentions required in most channels.
5. Create only a few channels at first.
6. Put clear channel-purpose rules in your workspace.

For example:

# AGENTS.md

Discord rules:
- In shared channels, be concise.
- Stay on the topic of the channel.
- Do not answer every message unless the channel is explicitly open.
- Draft before external actions.
- If context is missing, ask instead of guessing.

That is enough to make the assistant feel much more intentional.

Optional: forum channels and structured thread workflows

The Discord docs also note that forum and media channels only accept thread posts. OpenClaw supports those through forum-parent sends and explicit thread creation.

That matters if you want setups like:

  • one forum for research requests
  • one forum for bug triage
  • one forum for content topics

It is not required for most people, but it is a good reminder that OpenClaw's Discord support is much deeper than simple channel replies.

Common Discord mistakes

Forgetting Message Content Intent

This is the classic one. If the agent seems blind, check intents first.

Testing in a big shared server too early

Start in your own private server. Debug there.

Turning off mention gating immediately

Do this only when the server is private and your instructions are already strong.

Using Discord for everything without channel purpose

If every room is general chat, the assistant has nowhere to anchor its behavior.

Treating guild channels like private memory spaces

Remember that guild channels are shared environments. Use AGENTS.md for stable behavior, and pull deeper memory only when it is actually needed.

FAQ

Is Discord a good OpenClaw channel for solo use?

Yes, especially if you like the idea of separate rooms for different kinds of work.

What Discord intents do I need?

Message Content Intent is required. Server Members Intent is recommended. Presence Intent is optional.

Does OpenClaw support Discord DMs and server channels?

Yes. DMs and guild channels are both supported.

Should I keep requireMention on?

Usually yes at first. Turn it off only in private servers where you want more ambient behavior.

Do Discord channels get separate sessions in OpenClaw?

Yes. Guild channels are isolated sessions, which is one of the biggest benefits of using Discord as a workspace.

Can OpenClaw work with forum channels?

Yes. The docs include support for sending to forum parents and creating threads explicitly.

Where should I learn more about the broader OpenClaw setup?

Read Setup Guide, Memory, Multi-Agent, and OpenClaw for developers.

Final take

OpenClaw Discord setup is worth doing when you want an assistant that lives inside a structured workspace instead of a single endless chat thread.

Set up the bot properly, enable the right intents, keep the guild allowlist narrow, and use mentions plus channel separation on purpose. Do that, and Discord becomes one of the cleanest ways to run OpenClaw for ongoing projects, personal operations, or small team collaboration.

Related posts

View all