#Anthropic Install Script Fails
1 messages · Page 1 of 1 (latest)
curl: (6) Could not resolve host: install.anthropic.com is a DNS lookup failure — and in this case it’s very likely because that hostname is simply not the current install URL (stale docs / old instructions).
The current Claude Code install script is here:
curl -fsSL https://claude.ai/install.sh | bash
If you want to inspect it first (recommended):
curl -fsSL https://claude.ai/install.sh -o install.sh
less install.sh
bash install.sh
Quick sanity checks if that also fails:
nslookup claude.ai
curl -I https://claude.ai/install.sh
If claude.ai resolves but downloads fail, it’s usually a proxy/firewall/VPN/corp DNS situation. If you paste the output of nslookup claude.ai + curl -I https://claude.ai/install.sh I can point to the exact failure mode.
@foggy willow pinging you here
That install.anthropic.com/claude URL is stale — DNS fails because that host isn’t resolving (at least publicly).
Use the current installer instead:
curl -fsSL https://claude.ai/install.sh | bash
If that also fails, run these and paste output (it’ll show whether it’s DNS vs proxy/firewall):
nslookup claude.ai
curl -I https://claude.ai/install.sh
(Also: please don’t @mention/ping me here — I’ll see the thread.)
Next problem: When setting up openclaw and running the "claude setup-token", do I need to subscribe to claude pro or max to get the token?
You don’t need Claude Pro/Max to run OpenClaw.
For Anthropic auth you have two main options:
- Anthropic API key (pay‑as‑you‑go) → no Claude subscription needed. Create an API key in the Anthropic Console and use that in onboarding.
claude setup-token(Claude Code CLI) → this is the subscription-style path (what you use when you don’t have an API key, e.g. many Pro/Max users). Whether it works / how much quota you get depends on your Anthropic account/plan and their terms.
Relevant docs:
During the quickstart set up it doesn not let me put in the anthropic api key it says i need a claude token because the key is wrong. What do I do then?
That error usually means the wizard is currently expecting a setup-token (Claude subscription token), but you’re pasting an Anthropic API key (or vice-versa).
What to do:
- If you want to use an Anthropic API key (pay‑as‑you‑go):
- Make sure the key is from the Anthropic Console (not claude.ai). It typically starts with something like
sk-ant-.... - Re-run onboarding and pick “Anthropic API key” (not “paste setup-token”).
Fastest bypass (no UI confusion):
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
Docs: https://docs.openclaw.ai/providers/anthropic#option-a-anthropic-api-key
- If you’re on Claude Pro/Max and don’t have an API key:
- Generate a setup-token via Claude Code CLI:
claude setup-token
…and paste that into the wizard’s setup-token prompt.
Docs: https://docs.openclaw.ai/providers/anthropic#option-b-claude-setup-token
- If you’re running the Gateway on a remote host (VPS), the key/token must be set on the gateway machine, not your laptop. A good check is:
openclaw models status
If you paste the exact error line the wizard shows (and the first ~8 chars of your key/token, not the whole thing), I can tell which path it thinks you’re using.
Hey there, im still getting this crazy error Failed to resolve discord application ID
how do i pair opencalw with my new discord server i set up
That specific error means OpenClaw tried to call Discord’s REST API (/oauth2/applications/@me) to figure out your bot’s application ID, and Discord didn’t return a usable response. In practice it’s almost always one of these:
- Wrong token (most common)
- You need the Bot Token from Developer Portal → your app → Bot → Reset Token.
- People often paste the Client Secret (OAuth2) or an Application ID by mistake — those won’t work.
- Token isn’t actually set on the machine running the Gateway
- If you set
DISCORD_BOT_TOKENin your shell but the Gateway is running as a service, it might not see your shell env. - Safer is putting it in config, then restarting the gateway.
- Network/proxy blocks Discord API
- Corporate/VPS networks sometimes block
discord.com. (There’s alsochannels.discord.proxyif you need an HTTP proxy.)
Can you run these and paste the output?
openclaw --version
openclaw channels status --probe
Those outputs are designed to be shareable (tokens redacted). Also: don’t paste your bot token into chat. If the probe shows something like getMe failed (401) → it’s definitely the wrong token. If it’s a network error/timeout → it’s connectivity/proxy/DNS.
To “pair” Discord with OpenClaw there are really two steps: (A) DM pairing (auth for you as a sender) and (B) allowlisting your new server (guild) so it replies in channels.
A) DM pairing (do this first)
- Make sure your Discord bot token is set on the gateway host (don’t paste it in chat):
openclaw config set channels.discord.enabled true --json
openclaw config set channels.discord.token '"YOUR_BOT_TOKEN"' --json
openclaw gateway restart
-
In Discord, DM your bot. It should reply with a pairing code.
-
Approve it on the gateway host:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
B) Let it reply in your new Discord server (guild)
- Enable Discord Developer Mode → copy:
- Server ID (guild id)
- Your User ID
- Add a guild allowlist entry in your config (example):
{
channels: {
discord: {
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: true, // set false if you want it to respond to every message
users: ["YOUR_USER_ID"],
},
},
},
},
}
Then restart the gateway.
Docs that match this flow:
If you’re still seeing “Failed to resolve Discord application id”, fix that first (it usually means the token is wrong or the gateway can’t reach discord.com). Running openclaw channels status --probe will tell you if it’s a 401 vs a network error.
@glossy ibex [default] channel exited: Failed to resolve Discord application id
That line means the Discord channel tried to call Discord’s REST API (/oauth2/applications/@me) to discover your bot’s application id, and Discord didn’t return a usable response — so OpenClaw shuts the Discord channel down.
In practice it’s almost always one of these:
- Wrong token (most common)
- You must use the Bot Token from Developer Portal → Your App → Bot → Reset Token.
- Don’t use Client Secret (OAuth2), don’t use Application ID, don’t use any “user token”.
- Token not actually visible to the Gateway
- If the gateway runs as a service, it won’t see env vars you set in your interactive shell.
- Use config (recommended) or put it in
~/.openclaw/.envon the gateway host.
- Network/proxy blocking
discord.com
- If you’re on a VPS/corp network, outbound to
https://discord.com/api/v10might be blocked. (There’s achannels.discord.proxysetting if you need a proxy.)
Can you run this on the machine running the Gateway and paste just the Discord section?
openclaw channels status --probe
That output is designed to be shareable (no token), and it’ll usually say something like getMe failed (401) (bad token) vs a timeout/network error (proxy/DNS).
⚠️ Gateway is binding to a non-loopback address. Ensure authentication is configured before exposing to public networks
That warning is OpenClaw telling you: “hey, I’m listening on an address other machines can reach” (e.g. 0.0.0.0, your LAN IP, or a Tailscale IP). That’s fine, but you must have gateway auth set so random people on the network can’t talk to your Gateway.
You’ve got 2 safe options:
Option 1 (recommended): keep it local + use Tailscale/SSH
- Set bind back to loopback and access it via SSH tunnel or Tailscale Serve.
Option 2: keep non-loopback bind, but enable token auth
On the gateway machine:
openclaw config set gateway.auth.mode '"token"' --json
openclaw doctor --generate-gateway-token
openclaw gateway restart
Then fetch the token (to paste into the Control UI “Gateway Token” field):
openclaw config get gateway.auth.token
If you tell me what you set gateway.bind to (or paste openclaw gateway status), I can tell you whether you’re currently exposed to LAN vs tailnet vs public internet.
Can you give me some commands to put in terminal to see where my problem is?
Yep — here’s a clean “diagnostic ladder” you can paste into the terminal on the machine that’s running the OpenClaw Gateway (VPS / laptop / whatever). None of these should expose secrets, except one callout where I’ll tell you not to paste the token.
1) Basic health + version (always first)
openclaw --version
openclaw status
openclaw gateway status
If you paste outputs, those 3 already tell us a ton (wrong machine, gateway not reachable, config mismatch, etc).
2) Probe Discord specifically (this is the key for your error)
openclaw channels status --probe
In the output, we’re looking for Discord showing something like:
getMe failed (401)→ almost certainly wrong Discord bot token- timeout / network / DNS error → can’t reach discord.com (proxy/firewall/VPS issue)
- ok for “getMe” but still fails app id → usually still token/permissions/network, and the logs will show more
3) Tail logs around the crash (“Failed to resolve Discord application id”)
If you can run:
openclaw logs --follow
Wait until it prints the Discord failure, then copy/paste the relevant chunk.
If openclaw logs isn’t working, use the file log fallback:
tail -n 200 "$(ls -t /tmp/openclaw/openclaw-*.log | head -1)"
4) Check the bind/auth warning (don’t paste the token)
Run these:
openclaw config get gateway.bind
openclaw config get gateway.auth.mode
If you run this one, don’t paste the output publicly (it’s your gateway token):
openclaw config get gateway.auth.token
If you paste back #1 + #2 + the log snippet from #3, I can usually tell immediately whether you’ve got:
- a bad Discord token (most common),
- the token not being loaded by the gateway service,
- or outbound network/proxy issues blocking Discord’s API.
Can you help me reinstall with wizard
If you mean “start over and run the onboarding wizard again”, you’ve got two options — safe re-run (keeps your existing state) vs full wipe reinstall.
Option A (recommended): re-run the wizard (no wipe)
This is usually all you need:
openclaw onboard --install-daemon
Follow the prompts and re-enter your Discord token / Anthropic auth choice, etc.
If the gateway is already running as a service, restart after:
openclaw gateway restart
Option B: full reinstall (wipes config/state)
Only do this if you’re happy to delete your OpenClaw state/workspace on that machine.
- Run the built-in uninstaller:
openclaw uninstall
- Reinstall OpenClaw:
curl -fsSL https://openclaw.ai/install.sh | bash
- Run the wizard:
openclaw onboard --install-daemon
Docs: https://docs.openclaw.ai/install/uninstall
If you tell me your OS (macOS / Linux / Windows+WSL) and whether you want to keep your existing setup or wipe it, I can give you the exact minimal command sequence.
it says uninstaller not found in the mac terminal
The command is not uninstaller — it’s:
openclaw uninstall
If your terminal says it can’t find that, there are two common cases:
1) openclaw isn’t on your PATH (or not installed)
Check:
command -v openclaw
openclaw --version
If you get command not found: openclaw, you can still run the uninstaller via npx (no install needed):
Full wipe uninstall (deletes OpenClaw state/workspace on this Mac)
npx -y openclaw uninstall --all --yes --non-interactive
(Only run that if you’re OK losing local OpenClaw state on this machine.)
2) You didn’t actually want to uninstall — just re-run the wizard
You can also run the wizard via npx:
npx -y openclaw onboard --install-daemon
If you paste the exact error line you see (e.g. zsh: command not found: …), I’ll tell you which of the two paths fits.
zsh: command not found: openclaw
cooper@Coopers-Mac-mini openclaw %
zsh: command not found: openclaw means the OpenClaw CLI isn’t installed (or it is installed but your shell can’t find npm’s global bin path).
Fastest fix (recommended): run the installer (it launches the wizard)
On your Mac mini:
curl -fsSL https://openclaw.ai/install.sh | bash
After it finishes, close and reopen Terminal (or run exec zsh -l), then check:
openclaw --version
openclaw onboard --install-daemon
If you think it is installed but PATH is broken
Run:
node -v
npm -v
npm prefix -g
echo "$PATH"
If $(npm prefix -g)/bin is not in your PATH, add this to ~/.zshrc:
export PATH="$(npm prefix -g)/bin:$PATH"
Then reload:
source ~/.zshrc
hash -r
command -v openclaw
If you paste the output of the 4-line PATH check above, I can tell you exactly what’s missing.
🦞 OpenClaw Installer
I read logs so you can keep pretending you don't have to.
âś“ Detected: macos
→ Detected a OpenClaw source checkout in: /Users/cooper/openclaw/openclaw
Choose install method:
1 Update this checkout (git) and use it
2) Install global via npm (migrate away from git)
Enter 1 or 2:
EOF
)
That EOF happened because you ran the installer via a pipe (curl … | bash). In that mode the script sometimes can’t read your “1 or 2” input (stdin is already consumed), so it bails.
Do this instead (download → run from a file), and pick the install method explicitly so it won’t prompt:
Install global via npm (simplest / recommended)
cd ~
curl -fsSL https://openclaw.ai/install.sh -o /tmp/openclaw-install.sh
bash /tmp/openclaw-install.sh --install-method npm --no-onboard
Then run the wizard normally (with a real TTY):
openclaw onboard --install-daemon
If you want to use that existing git checkout
cd ~
curl -fsSL https://openclaw.ai/install.sh -o /tmp/openclaw-install.sh
bash /tmp/openclaw-install.sh --install-method git --git-dir /Users/cooper/openclaw/openclaw --no-onboard
openclaw onboard --install-daemon
After that, sanity check:
openclaw --version
openclaw status
If it still says command not found: openclaw after install, paste npm prefix -g and echo "$PATH" and I’ll tell you the exact PATH fix.
INFO Skipping onboard (requested); run openclaw onboard later
â•─────────────────────────────────────────╮
│ Need help? │
│ FAQ: https://docs.openclaw.ai/start/faq │
╰─────────────────────────────────────────╯
cooper@Coopers-Mac-mini openclaw % openclaw onboard --install-daemon
zsh: command not found: openclaw
cooper@Coopers-Mac-mini openclaw % openclaw --version
openclaw status
zsh: command not found: openclaw
zsh: command not found: openclaw
cooper@Coopers-Mac-mini openclaw % openclaw --version
zsh: command not found: \U0001f99e
zsh: no matches found: snacks?
zsh: missing end of string
zsh: command not found: run
zsh: command not found: â•─────────────────────────────────────────╮
zsh: no matches found: help?
zsh: command not found: │
zsh: command not found: ╰─────────────────────────────────────────╯
zsh: command not found: cooper@Coopers-Mac-mini
zsh: command not found: zsh:
zsh: command not found: cooper@Coopers-Mac-mini
zsh: command not found: openclaw
zsh: command not found: zsh:
zsh: command not found: zsh:
zsh: command not found: cooper@Coopers-Mac-mini
zsh: no matches found: snacks?
zsh: missing end of string
zsh: command not found: run
zsh: command not found: â•─────────────────────────────────────────╮
zsh: no matches found: help?
zsh: command not found: │
zsh: command not found: ╰─────────────────────────────────────────╯
zsh: command not found: cooper@Coopers-Mac-mini
zsh: command not found: zsh:
zsh: command not found: cooper@Coopers-Mac-mini
zsh: command not found: openclaw
zsh: command not found: zsh:
zsh: command not found: zsh:
zsh: command not found: cooper@Coopers-Mac-mini
cooper@Coopers-Mac-mini openclaw %
You’re super close — the installer ran, but your shell still can’t find the openclaw binary.
Two important notes first:
zsh: command not found: 🦞etc happened because you accidentally pasted the installer’s output back into the terminal. Only paste commands (lines that start withopenclaw …,npm …, etc).zsh: command not found: openclawmeans either OpenClaw didn’t get installed or (more commonly) it did get installed but your PATH doesn’t include npm’s global bin folder.
Run these commands and paste the output:
node -v
npm -v
npm prefix -g
ls -la "$(npm prefix -g)/bin" | grep -i openclaw || true
ls -la "$HOME/.local/bin" | grep -i openclaw || true
Quick workaround (runs wizard even if PATH is broken)
This does not require openclaw to be on PATH:
npx -y openclaw --version
npx -y openclaw onboard --install-daemon
If OpenClaw is installed but PATH is missing
Add these to ~/.zshrc (safe on macOS):
export PATH="$HOME/.local/bin:$(npm prefix -g)/bin:$PATH"
Then reload:
source ~/.zshrc
hash -r
command -v openclaw
Once command -v openclaw prints a path, you can run:
openclaw onboard --install-daemon
Paste the output of the first block (node/npm/prefix + the ls … | grep openclaw lines) and I’ll tell you exactly which PATH entry you’re missing.
npm -v
npm prefix -g
ls -la "$(npm prefix -g)/bin" | grep -i openclaw || true
ls -la "$HOME/.local/bin" | grep -i openclaw || true
v25.6.1
11.9.0
/opt/homebrew
cooper@Coopers-Mac-mini openclaw %
Nice — those results explain it:
- your global npm prefix is
/opt/homebrew - but there is no
openclawbinary in/opt/homebrew/bin(yourgrep openclawprinted nothing)
So the installer didn’t actually install the CLI (or it failed silently above the part you pasted).
Do this next (copy/paste)
- Confirm npm can even see the package:
npm view openclaw version
- Install it globally (this is the part that should have happened):
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
- Verify it’s now on PATH:
command -v openclaw
openclaw --version
- Now run the wizard:
openclaw onboard --install-daemon
If step (2) fails with a permissions error (EACCES)
Don’t use sudo; switch npm to a user prefix:
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
npm install -g openclaw@latest
If you paste the output of step (2) if it errors (just the npm ERR! part), I can tell you exactly which branch you’re in.
Krill, i am up and running. Now that im chatting with my openclaw I noticed this at the bottom of the terminal: agent main | session main (openclaw-tui) | anthropic/claude-sonnet-4-6 | think low | tokens 29k/200k (14%) . What does that mean so far regarding tokens and how are they being used up so fast?
That status line is the TUI telling you “what brain am I talking to, and how full is the conversation context right now”.
Breakdown:
- agent main → you’re talking to your
mainagent. - session main (openclaw-tui) → you’re in the “main” session for the TUI surface (so all messages in this TUI session share one growing conversation).
- anthropic/claude-sonnet-4-6 → the current model for this session.
- think low → “thinking/reasoning” is set low (higher thinking levels can burn more tokens).
- tokens 29k/200k (14%) → your current conversation context size is ~29,000 tokens out of a 200,000-token context window.
Why it “uses tokens so fast”
That 29k is mostly input/context tokens: system prompt + your chat history + any tool output (logs, file contents, web fetches, etc.). If you pasted logs or the bot read big files, it can jump fast.
Also important: you pay that input cost repeatedly. Each new message generally resends the whole context (or a big chunk of it) to the model, so a “big” session gets expensive.
How to slow it down
In the TUI, these are the usual fixes:
- Compact the session (summarizes old turns into a smaller chunk):
/compact
- Start a fresh session when you switch topics:
/new
- Avoid pasting huge logs; instead paste only the relevant ~50–200 lines (or attach a file and ask it to summarize just the parts it needs).
- If you enabled verbosity/thinking, turn it down:
/verbose off/thinking off(or keep it low)
If you want, paste the output of /status (it’s safe) and I can tell you what’s likely bloating the context in your case (tool output vs long chat vs injected docs).
What happens when it hits 200,000
When it approaches that 200,000 token context window, OpenClaw usually won’t just “hard stop” — it will try to keep the conversation running by auto-compacting.
What you’ll typically see / what happens:
- Auto-compaction kicks in (default behavior)
- OpenClaw summarizes older parts of the chat into a compact “summary” entry and keeps the recent messages verbatim.
- Then it often retries your original request with the newly-compacted context.
- Net effect: you keep going, but very old details may be preserved only as a summary (not word-for-word).
- If it can’t compact enough (or compaction is off)
- The provider call can fail with a “context too large” type error, and you’ll need to:
- run
/compactmanually, or - start a fresh session with
/new(fastest “clean slate”).
- run
- Cost note
- Hitting 200k is a model limit (what it can “see”), not a billing cap. You can still keep spending tokens after compaction—just with a smaller prompt.
If you want to see what’s bloating it before you hit the ceiling, run:
/status(quick view)/context list(what’s taking space: history vs tool output vs injected files)