Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NemoClaw Discord Setup

Run a nemoclaw sandbox with openclaw as the harness, connected to a Discord channel. All config lives in configs/ — replicate to any Linux machine in two commands.

flowchart TD
    User(["👤 User\n(Discord)"])
    Bot["Discord Bot\n(token in .env)"]
    OpenClaw["OpenClaw\nAgent Runtime\n(port 18789)"]
    NemoClaw["NemoClaw\nSandbox Manager"]
    OpenShell["OpenShell\nDocker Sandbox"]
    Inference["NVIDIA Build\nInference API\n(integrate.api.nvidia.com)"]
    Web["Web\n(DuckDuckGo · Jina\nWikipedia · Open-Meteo)"]
    Config["configs/\nopenclaw.json\npolicy.yaml"]

    User -- "message in channel" --> Bot
    Bot -- "Discord Gateway\n(WebSocket)" --> OpenClaw
    OpenClaw -- "LLM calls" --> Inference
    OpenClaw -- "web search / fetch" --> Web
    OpenClaw -- "runs inside" --> OpenShell
    NemoClaw -- "manages" --> OpenShell
    Config -- "merged by\ninstall.sh / run.sh" --> OpenClaw

    style OpenShell fill:#1a1a2e,color:#fff
    style OpenClaw fill:#16213e,color:#fff
    style NemoClaw fill:#0f3460,color:#fff
    style Inference fill:#76b900,color:#000
Loading

Requirements

  • Linux with Docker Engine installed
  • Node.js 22.16+ (installed automatically if missing)

Part 1 — Discord Bot Setup (one-time, in browser)

1. Create the bot

  1. Go to https://discord.com/developers/applications → New Application → name it
  2. Go to Bot tab → Reset Token → copy the token → save as DISCORD_BOT_TOKEN in .env
  3. Under Privileged Gateway Intents, enable:
    • Server Members Intent
    • Message Content Intent
  4. Click Save Changes

2. Invite the bot to your server

Build the invite URL using your Application ID (found under General Information):

https://discord.com/oauth2/authorize?client_id=YOUR_APP_ID&scope=bot+applications.commands&permissions=274877975552

Open the URL → select your server → Authorise.

Developer Mode (to copy IDs): Discord Settings → Advanced → Developer Mode

3. Get IDs

Variable How to get it
DISCORD_SERVER_ID Right-click server name → Copy Server ID
DISCORD_CHANNEL_IDS Right-click channel → Copy Channel ID (comma-separate multiple)

Part 2 — Install and Run

4. Clone and fill in credentials

git clone https://github.com/ansjindal/nemoclaw-discord.git && cd nemoclaw-discord
cp .env.template .env
nano .env

Fill in all variables in .env:

Variable Description
NVIDIA_API_KEY https://integrate.api.nvidia.com → API Keys
DISCORD_BOT_TOKEN From step 1 above
DISCORD_SERVER_ID From step 3 above
DISCORD_CHANNEL_IDS From step 3 above
NEMOCLAW_MODEL Default: nvidia/nemotron-3-super-120b-a12b
SANDBOX_NAME Any name, e.g. nemoclaw-assistant

5. Install and onboard

./install.sh

Does everything in one shot:

  • Checks Node.js 22+ and Docker (installs Node via fnm if missing)
  • Installs nemoclaw and runs non-interactive onboard
  • Applies network policy presets (DuckDuckGo, Jina Reader, Wikipedia, Open-Meteo, nous-web)
  • Merges configs/openclaw.json — model list, channel restriction, Discord groupPolicy
  • Bot is locked to the channels listed in DISCORD_CHANNEL_IDS

6. Pair your Discord account (one-time)

After install, the bot is in your server but doesn't know who you are yet:

  1. Open a DM with the bot in Discord and send: /pair The bot replies with a 6-character pairing code (e.g. ABC123).
  2. Approve it on the server:
nemoclaw <SANDBOX_NAME> connect
openclaw pairing approve discord <CODE>

Pairing codes expire after 1 hour. After pairing, you become the command owner and can send messages directly in allowed channels.

7. Access the agent

nemoclaw <SANDBOX_NAME>          # opens browser dashboard (port 18789)
nemoclaw <SANDBOX_NAME> connect  # terminal TUI
nemoclaw <SANDBOX_NAME> logs --follow

Remote access: dashboard binds to 127.0.0.1 only. To access from your laptop:

ssh -L 18789:127.0.0.1:18789 ubuntu@<server-ip> -N

Then open http://127.0.0.1:18789


Updating configs later

Edit configs/openclaw.json or configs/policy.yaml, then:

./run.sh   # applies changes without a full rebuild

Re-deploying to a new machine

git clone https://github.com/ansjindal/nemoclaw-discord.git && cd nemoclaw-discord
cp .env.template .env && nano .env
./install.sh

All config is version-controlled in configs/ — nothing is hardcoded in the scripts.


Troubleshooting

Problem Fix
The application did not respond Enable Message Content Intent in Discord Dev Portal → Bot → Privileged Gateway Intents
Bot in server but not responding Check groupPolicy is open: nemoclaw <name> exec -- bash -c "openclaw config set channels.discord.groupPolicy open"
Port 8080 not available systemctl --user stop openclaw-gateway.service && pkill -f openshell-gateway
NEMOCLAW_PROVIDER error Use build not nvidia-endpoints
Gateway scope upgrade loop Edit /sandbox/.openclaw/devices/paired.json and add operator.admin, operator.write to scopes, then clear /sandbox/.openclaw/devices/pending.json
Bot says "outbound network is deny-by-default" Policy preset not active. Run ./run.sh or manually: echo Y | nemoclaw <name> policy-add nous-web

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Sponsor
SponsoredKunjungi sekarang
Promo