#openclaw setup
1 messages ยท Page 1 of 1 (latest)
Happy to help! ๐ฆ
Fastest setup path:
macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw gateway status
openclaw dashboard
Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex
openclaw onboard --install-daemon
openclaw gateway status
openclaw dashboard
Youโll need Node.js installed first โ Node 24 is recommended, Node 22.14+ is supported โ and an API key for a model provider.
Docs: https://docs.openclaw.ai/start/getting-started
If you hit any error, paste these outputs and Iโll walk you through it:
openclaw --version
node --version
openclaw status --all
why is the iwr -useb https://openclaw.ai/install.ps1 | iex takes so long to respond?
the last output was [*] Installing OpenClaw (openclaw@latest)...
That line is the npm global install step (openclaw@latest). It can be pretty quiet for a while on Windows, especially if itโs also downloading/building dependencies or Windows Defender is scanning node_modules.
If itโs been only a few minutes: Iโd let it run.
If itโs been 10โ15+ minutes with no CPU/network activity, try this in a new PowerShell window to see whatโs happening:
node --version
npm --version
npm view openclaw version
Then check whether npm itself is stuck by running:
npm install -g openclaw@latest --loglevel verbose
Common Windows blockers:
- slow npm registry/network
- antivirus scanning the install folder
- Git missing or not on PATH
- npm global prefix not writable / PATH weirdness
If you cancel and rerun, use the explicit script form so we can add flags:
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
Docs: https://docs.openclaw.ai/install/installer
If it errors, paste the last ~30 lines โ especially anything containing npm ERR!.
Hello everyone, I'm the logistics engineering student who introduced myself earlier. My teacher has asked me to record a video demonstrating OpenClaw's features as an assignment, but I haven't downloaded or installed it yet. Would anyone be kind enough to give me a small hand?
What I need you to do is very simple: open your browser, use OpenClaw's web control panel to ask the AI to perform a browser task for meโfor example, automatically open a logistics website's homepage and take a screenshot.
Just record your screen and send it to me. It'll take about 3 minutes. This assignment is quite important to me. Thank you in advance!
Iโd avoid asking someone to record their own OpenClaw control panel โ it can expose private config, chats, tokens, workspace paths, or browser state pretty easily.
But you can make this demo yourself pretty quickly:
- Install OpenClaw:
iwr -useb https://openclaw.ai/install.ps1 | iex
macOS/Linux:
curl -fsSL https://openclaw.ai/install.sh | bash
- Run onboarding:
openclaw onboard --install-daemon
- Open the dashboard:
openclaw dashboard
- For your video, ask something like:
Open a browser, navigate to a logistics company homepage, take a screenshot, and summarize what is on the page.
Docs: https://docs.openclaw.ai/start/getting-started
If install gets stuck or errors, paste:
openclaw --version
node --version
openclaw status --all
and we can help you get it running. Thatโll also make your assignment more credible because itโs your own setup/demo.
please create your own thread
dont message on my thread
,sorry,ok
its ok
so i am using it as discord bot so what all permission and scopes i need it to work in DMs?
For DMs, the OAuth invite scopes are simple:
Scopes
botapplications.commands
Bot permissions for a basic setup:
- View Channels
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Add Reactions โ optional, but nice
For DMs specifically, also make sure:
- In Discord Developer Portal โ Bot โ enable Message Content Intent โ required
- Server Members Intent is recommended, especially if you use allowlists / name matching
- Presence Intent is optional, only if you want presence/status features
- Your Discord client/server privacy allows DMs from server members/bots: right-click server โ Privacy Settings โ enable Direct Messages
Then DM the bot once the gateway is running. OpenClaw should give you a pairing code; approve it with:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
so i accident give brave seach. how cna i change it and also tell me which web seach is free
Yep โ easiest way is just rerun the web config wizard and pick a different provider:
openclaw configure --section web
openclaw gateway restart
If you want the free / no API key option, pick DuckDuckGo. Itโs key-free, but itโs an unofficial HTML-based integration, so it can be less reliable than API-backed providers.
Other free-ish options:
- DuckDuckGo: no key, easiest
- SearXNG: no search API key, but you need a SearXNG instance / URL
- Ollama Web Search: key-free only if you have Ollama configured and signed in with
ollama signin - Brave: has a free tier, but still needs a
BRAVE_API_KEY
Also: web_fetch works without an API key; only web_search depends on the provider.
how to maek the bot work
To make the Discord bot work, the usual flow is:
-
Create bot in Discord Developer Portal
- Enable Message Content Intent
- Recommended: enable Server Members Intent
-
Invite it with scopes
botapplications.commands
Permissions:
- View Channels
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Add Reactions optional
- Configure OpenClaw with the bot token โ donโt paste the token here:
openclaw configure --section channels
Choose Discord and enter the token when prompted.
- Restart/check gateway
openclaw gateway restart
openclaw status
- DM the bot
It should send a pairing code. Approve it:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
If it still doesnโt work, paste these outputs:
openclaw --version
openclaw status --all
openclaw pairing list discord
โ Plugin install โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Failed to install @openclaw/discord: plugin already exists: โ
โ C:\Users\Somegh.openclaw\npm\node_modules@openclaw\discord (delete it first) โ
โ Returning to selection. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Plugin install failed: plugin already exists: C:\Users\Somegh.openclaw\npm\node_modules@openclaw\discord (delete it first)
That means Discord plugin is already installed, but the wizard tried to install it again. Donโt delete anything yet โ try the safer path first:
openclaw plugins update @openclaw/discord
openclaw configure --section channels
openclaw gateway restart
openclaw status
If it still complains, reinstall/overwrite the existing plugin:
openclaw plugins install @openclaw/discord --force
openclaw configure --section channels
openclaw gateway restart
Only if --force fails, then remove the stale plugin folder and reinstall:
Remove-Item -Recurse -Force "C:\Users\Somegh\.openclaw
pm
ode_modules\@openclaw\discord"
openclaw plugins install @openclaw/discord
After that, DM the bot and approve the pairing code:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
Docs: https://docs.openclaw.ai/channels/discord and https://docs.openclaw.ai/cli/plugins
still showing the error
Got it โ if it still says plugin already exists, the wizard is probably retrying the install path instead of using the already-installed plugin.
First, please paste this output so we can see the exact state/version:
openclaw --version
openclaw plugins list
openclaw plugins inspect @openclaw/discord
Then try this repair path:
openclaw doctor --fix
openclaw plugins update @openclaw/discord
openclaw gateway restart
After that, skip plugin install and configure Discord directly:
openclaw configure --section channels
If the wizard again asks to install Discord and fails, use the manual config route instead of the wizard. Put your bot token in C:\Users\Somegh\.openclaw\.env like this:
DISCORD_BOT_TOKEN=your_bot_token_here
Then run:
openclaw gateway restart
openclaw status --all
Donโt paste the bot token here. Paste only the command outputs/errors.
there is no .evn file in openclaw
Thatโs okay โ it wonโt exist until you create it. Also tiny typo: itโs .env, not .evn.
On Windows PowerShell, create it like this:
notepad "$env:USERPROFILE\.openclaw\.env"
If Notepad asks to create the file, click Yes. Add this line:
DISCORD_BOT_TOKEN=your_real_bot_token_here
Save, close Notepad, then restart OpenClaw:
openclaw gateway restart
openclaw status --all
Donโt paste the token here โ itโs a secret. If it still fails, paste the openclaw status --all output with tokens redacted.
then?
Then you need to make sure OpenClawโs config actually enables Discord and reads that env token.
Create a small patch file:
@'
{
channels: {
discord: {
enabled: true,
token: { source: "env", provider: "default", id: "DISCORD_BOT_TOKEN" },
},
},
}
'@ | Set-Content "$env:USERPROFILE\discord.patch.json5"
Apply it:
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5" --dry-run
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5"
openclaw gateway restart
openclaw status --all
Then in Discord, DM your bot. It should reply with a pairing code. Approve it:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
If the bot doesnโt DM back, paste openclaw status --all here โ it redacts secrets.
where?
In PowerShell on the same Windows PC where OpenClaw is installed.
Press Start โ search PowerShell โ open it, then paste that command. It creates this file:
C:\Users\Somegh\discord.patch.json5
Then, in the same PowerShell window, run:
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5" --dry-run
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5"
openclaw gateway restart
So: .env goes here:
C:\Users\Somegh\.openclaw\.env
discord.patch.json5 goes here:
C:\Users\Somegh\discord.patch.json5
Both are on your PC, not in Discord.
is there any problem if the discord bot is offline?
Yes โ if the Discord bot shows offline, OpenClaw is probably not connected to Discord yet, so DMs/pairing wonโt work.
Check these in PowerShell:
openclaw status --all
openclaw gateway status
Common causes:
- Gateway isnโt running
- Discord token is missing/wrong in
C:\Users\Somegh\.openclaw\.env - Config doesnโt enable Discord
- Bot token was reset in Developer Portal but
.envstill has the old token - The Discord plugin/config failed to load
After creating/updating .env, always restart:
openclaw gateway restart
Once itโs connected, the bot should show online, and then you can DM it to get the pairing code.
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Item โ Value โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ 2026.5.7 โ
โ OS โ windows 10.0.26200 (x64)โ
โ Node โ 24.13.0 โ
โ Config โ ~.openclaw\openclaw.json โ
โ Dashboard โ http://127.0.0.1:18789/ โ
โ Tailscale exposure โ off โ
โ Channel โ stable (default) โ
โ Update โ pnpm ยท up to date ยท npm latest 2026.5.7 โ
โ Gateway โ local ยท ws://127.0.0.1:18789 (local loopback) ยท reachable 902ms ยท auth token โ
โ Security โ Run: openclaw security audit --deep โ
โ Gateway self โ unknown โ
โ Gateway service โ Scheduled Task installed ยท registered ยท running (pid 19104, Startup-folder login item โ
โ โ installed; listener detected on port 18789.) โ
โ Node service โ Scheduled Task not installed โ
โ Agents โ 1 total ยท 0 bootstrapping ยท 0 active ยท 0 sessions โ
โ Secrets โ none โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Good news: Gateway is running. The suspicious part is Secrets: none and thereโs no Discord/channel line shown โ so OpenClaw probably still isnโt seeing your Discord bot token/config.
Do this in PowerShell:
Test-Path "$env:USERPROFILE\.openclaw\.env"
Get-Content "$env:USERPROFILE\.openclaw\.env"
Make sure it contains exactly one line like this โ donโt paste the real token here:
DISCORD_BOT_TOKEN=your_bot_token_here
Then apply Discord config again:
@'
{
channels: {
discord: {
enabled: true,
token: { source: "env", provider: "default", id: "DISCORD_BOT_TOKEN" },
},
},
}
'@ | Set-Content "$env:USERPROFILE\discord.patch.json5"
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5" --dry-run
openclaw config patch --file "$env:USERPROFILE\discord.patch.json5"
openclaw gateway restart
openclaw status --all
After restart, the bot should come online. If it still stays offline, paste the Discord/channel part of openclaw status --all or the latest relevant logs โ but redact tokens.
how to find gateywa token?
Run this on your own PC in PowerShell:
openclaw config get gateway.auth.token
If it prints nothing / missing, generate one:
openclaw doctor --generate-gateway-token
openclaw config get gateway.auth.token
openclaw gateway restart
Important: donโt paste the gateway token here โ itโs a secret. Use it only in your local dashboard if it asks for โGateway Tokenโ.
For Discord bot setup, this is separate from your Discord bot token. The Discord token goes in:
C:\Users\Somegh\.openclaw\.env
as:
DISCORD_BOT_TOKEN=...
how to restart
In PowerShell, run:
openclaw gateway restart
Then check it came back:
openclaw gateway status
openclaw status --all
If restart doesnโt work on Windows, try stopping/starting from the installed service path:
openclaw gateway install --force
openclaw gateway restart
After that, check Discord โ the bot should come online if the token/config is correct.
the bot is still offline
If Gateway is running but the bot is still offline, Discord isnโt being loaded or the token isnโt being resolved.
Please run these in PowerShell and paste the output โ do not paste the token:
openclaw config get channels.discord.enabled
openclaw config get channels.discord.token
openclaw plugins list
openclaw status --all
Also check the log for Discord errors:
openclaw logs --tail 120
Look for lines mentioning discord, token, 401, Unauthorized, or Privileged intent.
Most likely fixes:
- If
channels.discord.enabledis nottrue, re-apply the patch. - If
channels.discord.tokenis missing, OpenClaw is not reading your.envtoken. - If logs say
401 Unauthorized, reset/copy the bot token again from Discord Developer Portal and update:
C:\Users\Somegh\.openclaw\.env
with:
DISCORD_BOT_TOKEN=your_new_token_here
Then:
openclaw gateway restart
bot is still offline
Gotcha โ at this point we need the actual Discord startup error, otherwise weโre guessing.
Run these in PowerShell and paste the output here. They should not print your bot token, but if anything secret appears, redact it:
openclaw config get channels.discord
openclaw plugins inspect @openclaw/discord
openclaw logs --tail 200
Also confirm this file exists and has your bot token line:
Test-Path "$env:USERPROFILE\.openclaw\.env"
Select-String -Path "$env:USERPROFILE\.openclaw\.env" -Pattern "DISCORD_BOT_TOKEN" | ForEach-Object { "DISCORD_BOT_TOKEN is present" }
If the logs show 401 Unauthorized, the token is wrong/old โ reset it in Discord Developer Portal โ Bot โ Reset Token, update C:\Users\Somegh\.openclaw\.env, then:
openclaw gateway restart
If logs show Privileged intent, enable Message Content Intent in the Developer Portal โ Bot page, save, then restart gateway.
bot token is present
Good โ token file exists. Next we need to check whether OpenClaw is actually using it.
Run these and paste the output:
openclaw config get channels.discord
openclaw status --all
openclaw logs --tail 200
In the logs, look for discord. Common results:
401 Unauthorizedโ token is present but wrong/old. Reset token in Discord Developer Portal and update.env.Privileged intentโ enable Message Content Intent on the bot page, then restart.- No Discord lines at all โ Discord channel isnโt enabled in config.
Also restart once after confirming .env:
openclaw gateway restart
showing error: unknown option '--tail'
My bad โ the option is --limit, not --tail.
Run this instead:
openclaw logs --limit 200
Or follow live logs while you restart / DM the bot:
openclaw logs --follow
For the Discord issue, please run:
openclaw config get channels.discord
openclaw logs --limit 200
Then paste the parts mentioning discord, 401, Unauthorized, token, or intent โ but redact any secrets/tokens.
Install:
Source: npm
Spec: @openclaw/discord
Install path: ~.openclaw\npm\node_modules@openclaw\discord
Recorded version: 2026.5.7
Installed at: 2026-05-11T05:30:31.560Z
06:15:06+00:00 info gateway/health-monitor {"subsystem":"gateway/health-monitor"} [discord:default] health-monitor: restarting (reason: disconnected)
06:15:11+00:00 info channels/discord {"subsystem":"channels/discord"} [default] starting provider
06:15:13+00:00 warn fetch-timeout {"subsystem":"fetch-timeout"} {"timeoutMs":2500,"elapsedMs":2509,"operation":"fetchWithTimeout","url":"https://discord.com/api/v10/users/@me"} fetch timeout reached; aborting operation
06:15:13+00:00 info channels/discord {"subsystem":"channels/discord"} discord client initialized as 1503254248626982922; awaiting gateway readiness
06:15:14+00:00 info channels/discord {"subsystem":"channels/discord"} discord gateway: Gateway websocket closed: 4014
06:15:15+00:00 error channels/discord {"subsystem":"channels/discord"} discord: gateway closed with code 4014 (missing privileged gateway intents). Enable the required intents in the Discord Developer Portal or disable them in config.
06 25 12+00:00 info gateway/health-monitor {"subsystem":"gateway/health-monitor"} [discord:default] health-monitor: restarting (reason: disconnected)
06 25 20+00:00 info channels/discord {"subsystem":"channels/discord"} [default] starting provider
06 25 24+00:00 warn fetch-timeout {"subsystem":"fetch-timeout"} {"timeoutMs":10000,"elapsedMs":19412,"timerDelayMs":9412,"eventLoopDelayHint":"timer delayed 9412ms, likely event-loop starvation","operation":"fetchWithTimeout","url":"https://discord.com/api/v10/users/@me"} fetch timeout reached; aborting operation
Found it โ the real error is:
gateway closed with code 4014 (missing privileged gateway intents)
Fix in Discord Developer Portal:
- Go to https://discord.com/developers/applications
- Select your bot application
- Left sidebar โ Bot
- Scroll to Privileged Gateway Intents
- Enable:
- Message Content Intent โ required
- Server Members Intent โ recommended
- Click Save Changes
- Restart OpenClaw:
openclaw gateway restart
After that the bot should come online. Then DM it to get the pairing code.
the bot come online then i praired it
output:
๐ฆ OpenClaw 2026.5.7 (eeef486) โ I'll refactor your busywork like it owes me money.
Approved discord sender 1345958430153641984.
Config overwrite: C:\Users\Somegh\.openclaw\openclaw.json (sha256 60013cd17fae9bdc69fd927389f31c4de079cd42563da46ac6fa6952570484f2 -> 63b53013a1a427654d4a3cc783cff37208917c268c8814070c1110f8bb537b04, backup=C:\Users\Somegh\.openclaw\openclaw.json.bak)
Command owner configured discord:1345958430153641984 (commands.ownerAllowFrom was empty). ```
now the bot is offline
Nice, pairing worked โ that output is good. If it went offline right after, the config reload/restart probably disconnected Discord again.
Run these now and paste the output:
openclaw gateway restart
openclaw status --all
openclaw logs --limit 200
In the logs, check if the old error is back:
4014 missing privileged gateway intents
If yes, go back to Discord Developer Portal โ your app โ Bot โ make sure Message Content Intent is still enabled, click Save Changes, then restart again:
openclaw gateway restart
Also verify OpenClaw still has Discord enabled after the pairing config overwrite:
openclaw config get channels.discord
If channels.discord.token is missing or Discord isnโt enabled anymore, weโll re-apply the Discord config patch.
nvm its online again
Awesome ๐ Youโre past the hard part.
Now DM the bot a normal message. If it replies, youโre set. If it asks for pairing again, approve the new code the same way.
If this fixed it, please right-click the solution message โ Apps โ โ Mark Solution so Answer Overflow indexes it for the next person.
its just typing and not gicing reply
That means Discord is receiving the DM, but the agent run is hanging/failing before it sends a final reply. Usually itโs model/auth, not Discord now.
Run these in PowerShell and paste the output:
openclaw models status
openclaw status --all
openclaw logs --limit 250
Look especially for errors like:
No API key found401/Unauthorizedmodel not foundrate limittool ... not foundsession/bootstraperrors
Quick thing to try first:
openclaw doctor
openclaw gateway restart
Then DM the bot again with a simple message like hi. If it still only types, the logs will tell us exactly where itโs stuck.
the bot give reply and said โ ๏ธ API provider returned a billing error โ your API key has run out of credits or has an insufficient balance. Check your provider's billing dashboard and top up or switch to a different API key.
Good โ Discord is working now. That error is from your AI/model provider billing, not the bot.
Fix options:
- Top up the provider account for the API key you configured.
- Switch to a different provider/API key:
openclaw configure --section model
openclaw models status
openclaw gateway restart
- If you selected the wrong model/provider, check whatโs configured:
openclaw models status
openclaw config get agents.defaults.model
Donโt paste API keys here. If you paste openclaw models status, redact anything secret.
which is the best and freee model
There isnโt a single โbest freeโ model โ free tiers change a lot, and most good cloud models eventually require billing/credits.
Best practical options:
- Free / local: Ollama or LM Studio models. No API bill, but you need decent hardware, and tool-calling can be unreliable on weaker/local models.
- Cloud free tier: depends on what providers currently offer in your region/account. Check the provider dashboards.
- For OpenClaw actually working well: cloud models are usually much more reliable than local free models, especially for tools/browser/Discord workflows.
Run this to switch provider/model:
openclaw configure --section model
openclaw models status
openclaw gateway restart
For current model recommendations, ask in #models โ people there will have fresher hands-on advice than I can safely list here.