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
- Linux with Docker Engine installed
- Node.js 22.16+ (installed automatically if missing)
- Go to https://discord.com/developers/applications → New Application → name it
- Go to Bot tab → Reset Token → copy the token → save as
DISCORD_BOT_TOKENin.env - Under Privileged Gateway Intents, enable:
- Server Members Intent
- Message Content Intent
- Click Save Changes
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
| 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) |
git clone https://github.com/ansjindal/nemoclaw-discord.git && cd nemoclaw-discord
cp .env.template .env
nano .envFill 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 |
./install.shDoes everything in one shot:
- Checks Node.js 22+ and Docker (installs Node via fnm if missing)
- Installs
nemoclawand 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
After install, the bot is in your server but doesn't know who you are yet:
- Open a DM with the bot in Discord and send:
/pairThe bot replies with a 6-character pairing code (e.g.ABC123). - 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.
nemoclaw <SANDBOX_NAME> # opens browser dashboard (port 18789)
nemoclaw <SANDBOX_NAME> connect # terminal TUI
nemoclaw <SANDBOX_NAME> logs --followRemote access: dashboard binds to
127.0.0.1only. To access from your laptop:ssh -L 18789:127.0.0.1:18789 ubuntu@<server-ip> -NThen open http://127.0.0.1:18789
Edit configs/openclaw.json or configs/policy.yaml, then:
./run.sh # applies changes without a full rebuildgit clone https://github.com/ansjindal/nemoclaw-discord.git && cd nemoclaw-discord
cp .env.template .env && nano .env
./install.shAll config is version-controlled in configs/ — nothing is hardcoded in the scripts.
| 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 |