更新日: 2026-06-23Use the one-click installer to deploy OpenClaw on Linux or macOS with Crazyrouter as the default backend. The installer writes a ready-to-run
~/.openclaw/openclaw.json, registers the system service, and preloads a practical model set for chat, coding, and long-context work.
Overview
OpenClaw is a good fit when you want a self-controlled local AI entrypoint backed by Crazyrouter:- local WebUI and gateway, default port
18789 - reusable access to your Crazyrouter models and quota
- Telegram support out of the box, plus pre-enabled plugin entries for DingTalk, WeCom, QQ Bot, Discord, Slack, and Feishu
- a good match for persistent personal bots, internal team assistants, home servers, and light self-hosted deployments
Best For
- connecting Crazyrouter to a local AI gateway with one command
- running a Telegram bot on your own server
- managing WebUI, chat, and IM entrypoints in one place
- keeping an always-on assistant on a dev box or home mini server
Protocol Used
Recommended protocol:OpenAI-compatible API
- the installer points the default
crazyrouterprovider athttps://api.crazyrouter.com/v1 - it also writes
crazyrouter-claudeandcrazyrouter-minimaxproviders for native-compatible switching - OpenClaw itself exposes a local gateway and WebUI, authenticated with the generated
gateway.auth.token
Prerequisites
Quick Start In 5 Minutes
1
Create a dedicated Crazyrouter token
In Crazyrouter, create a dedicated
sk-... token for OpenClaw. Start with a small model allowlist such as claude-opus-4-8, gpt-5.5, and gemini-3.1-pro.2
Run the installer
3
Save the 3 values printed by the installer
- WebUI URL:
http://<server-ip>:18789 - auto-login URL:
http://<server-ip>:18789?token=<gateway_token> - config path:
~/.openclaw/openclaw.json
4
Validate the first successful response
Open the auto-login URL in a browser, confirm you can enter the OpenClaw control UI, and send a simple test prompt with the default model
claude-opus-4-8, such as Reply with ok.5
Optionally finish Telegram pairing
The installer can set up Telegram immediately. If you choose that path, paste your Bot Token and then send any message to the bot so the first owner pairing can complete.
Recommended Model Setup
The installer setsclaude-opus-4-8 as the default primary model. To change the day-to-day default, edit agents.defaults.model.primary in ~/.openclaw/openclaw.json.
Example: switch the default model to
gpt-5.5
Token Setup Best Practices
Verification Checklist
-
http://<server-ip>:18789?token=<gateway_token>opens successfully - the WebUI signs in without looping back to login
- the default model returns the first response successfully
- after a model change, a service restart still works
-
journalctl --user -u openclaw -fortail -f ~/.openclaw/openclaw.logshows successful requests - if Telegram is enabled, the bot can reply to a test message
- a backup of
~/.openclaw/openclaw.jsonis saved
Key Files And Config Fields
File Locations
Most Common Config Fields
IM Integrations
Telegram
Telegram is the most complete path supported by the installer and should be your first integration:- Open Telegram and search for
@BotFather - Send
/newbotand create your bot - When the installer asks
Set up Telegram Bot now?, chooseY - Paste the Bot Token so the installer can write it into
~/.openclaw/openclaw.json - After the installer restarts the gateway, send any message to the bot
- The first sender is auto-paired as the owner
- If auto-pairing fails, run:
Other IM Platforms
The installer pre-enables plugin entries for:dingtalkopenclaw-wecomqqbotdiscordslackfeishu
channels.<name> config. A safe rollout pattern is:
- create the bot or app in the target platform
- write the platform credentials into
~/.openclaw/openclaw.json - confirm
plugins.entries.<name>.enabledistrue - restart the OpenClaw service
- validate the channel by checking logs and sending a test message
If OpenClaw will be connected to a team IM workspace, create a separate Crazyrouter token for that bot and enforce a tighter model allowlist and quota cap.
Service Management And Logs
- Linux (systemd)
- macOS (launchd)
loginctl enable-linger $(whoami) so the user-level service can keep running after you disconnect your SSH session.Performance And Cost Tips
- start with
claude-opus-4-8until the whole flow is stable - keep routine bot traffic on
claude-opus-4-8or move selected tasks togemini-3.1-prowhen cost matters more - use
gpt-5.5for coding-heavy agent workflows - split WebUI, Telegram, and team IM usage across different tokens for better cost tracking
- keep only the models and plugins you actually need
Upgrade Guide
The safest upgrade path is to rerun the installer, because it refreshes the OpenClaw package, patches, and service script together:1
Back up the current config
2
Run the installer again
3
Re-check custom settings
If you manually added non-Telegram channels or changed the default model, compare the updated
openclaw.json with your backup and re-apply the custom sections if needed.4
Restart and verify
Open the WebUI again and confirm your models, logs, and IM channels still work.
npm install -g openclaw@latest and then restart the service, but that path will not re-apply installer-managed patches and script updates.
Uninstall Guide
- Linux
- macOS
Common Errors And Fixes
FAQ
Which Crazyrouter base URL should I keep?
Leave the installer defaults unless you are intentionally changing provider modes:https://api.crazyrouter.com/v1 for the OpenAI-compatible provider, and https://api.crazyrouter.com for Claude / MiniMax native-compatible providers.
Which default model should I keep first?
For most users, keepclaude-opus-4-8 first. If OpenClaw is mainly a coding assistant, switch to gpt-5.5.
Why is my expected model missing?
Usually the model is not allowed by the Crazyrouter token, or the config is pointing at the wrong provider prefix.Why does Telegram work in DM but not in groups?
The installer sets Telegram group policy toallowlist by default. Adjust the Telegram channel config if your rollout needs broader group behavior.
What is the safest way to expose OpenClaw externally?
At minimum: restrict inbound access, protectgateway.auth.token, and use a dedicated Crazyrouter token for OpenClaw. If the host is public, add a reverse proxy and extra access control.
View the installer repository
Review the installer source, file issues, or audit the one-click setup yourself.