Skip to main content
Content updated: 2026-06-09
Deploy the OpenClaw AI gateway on Linux or macOS using a one-click script, with Crazyrouter as the default backend. The installer will write a directly runnable ~/.openclaw/openclaw.json, register a system service, and pre-configure a set of models suitable for chatting, coding, and long-context tasks.

Overview

OpenClaw is suitable for turning Crazyrouter into your own controllable local AI access point:
  • Local WebUI/gateway, listening by default on 18789
  • Can directly reuse Crazyrouter’s models and quota
  • Supports Telegram and pre-enables plugin entries for DingTalk, WeCom, QQ Bot, Discord, Slack, and Feishu
  • Suitable for personal always-on bots, team internal assistants, home servers, or lightweight self-hosted scenarios

Who is it for

  • Those who want to connect Crazyrouter to a local AI gateway with a single command
  • Those who want to run a Telegram Bot on their own server
  • Those who want to manage chat, WebUI, and IM entries centrally
  • Those who want to deploy a resident assistant on a dev machine or small home host

Usage Agreement

Recommended agreement: OpenAI-compatible API
  • The installer by default points the crazyrouter provider to https://api.crazyrouter.com/v1
  • It will also write crazyrouter-claude and crazyrouter-minimax providers, making it easy to switch to the Anthropic Messages compatible path
  • OpenClaw itself exposes the local gateway and WebUI; authentication relies on the gateway.auth.token generated during installation
If you need to manually adjust the OpenClaw provider address later, first refer to API Endpoint documentation to confirm whether the current client should fill in the root domain or /v1.

Prerequisites

The OpenClaw installer binds the gateway to the local network address (bind: lan) by default. If your host is directly exposed to the public, be sure to set up firewall restrictions and properly keep your gateway login token safe at the same time.

5-Minute Quick Start

1

Create a dedicated Crazyrouter token

In Crazyrouter’s backend, create a sk-... token dedicated for OpenClaw. It is recommended to only open up the models you plan to use in the gateway, such as claude-opus-4-8, gpt-5.5, gemini-3.1-pro.
2

Run the installation script

If you want to skip language selection and API Key input, you can also do this:
3

Note down the 3 values output by the installer

  • WebUI address: http://<server IP>:18789
  • Auto-login address: http://<server IP>:18789?token=<gateway_token>
  • Config file: ~/.openclaw/openclaw.json
4

Open the WebUI for the initial verification

Visit the auto-login address with your browser, make sure you can access the OpenClaw console, and send a test message using the default model claude-opus-4-8, for example “Just reply ok”.
5

Complete the Telegram pairing if needed

The installer will ask if you want to immediately configure Telegram. If you choose to set up now, after entering the Bot Token, send your bot any message to complete the first owner pairing.
The installer defaults the main model to claude-opus-4-8. If you want to change the everyday default model, just modify ~/.openclaw/openclaw.json’s agents.defaults.model.primary directly. Example: Change the default model to gpt-5.5
If you explicitly want to use the Claude-compatible provider, do it like this:

Token Best Practices

There are at least two types of credentials in OpenClaw: one is Crazyrouter’s sk-... API Key, used to call models; the other is OpenClaw’s local gateway login token, used for accessing the WebUI. Do not mix the two.

First Successful Checklist

  • Browser can open http://<server IP>:18789?token=<gateway_token>
  • OpenClaw WebUI can enter normally, does not repeatedly ask for login
  • The default model can return the first message successfully
  • After changing the model, the service can still respond normally after restart
  • journalctl --user -u openclaw -f or tail -f ~/.openclaw/openclaw.log can see successful requests
  • If Telegram is enabled, messages sent to the bot can receive replies
  • ~/.openclaw/openclaw.json backup has been saved

Key Files and Configuration Items

File Locations

Most Frequently Modified Config Items

IM Integration

Telegram

This is the most fully supported channel by the installer, it is recommended to start with Telegram:
  1. Search @BotFather on Telegram
  2. Send /newbot to create a bot, and get the Bot Token
  3. When the installer asks Set up Telegram Bot now?, select Y
  4. Paste the Bot Token, the installer will write it into ~/.openclaw/openclaw.json
  5. After the installer automatically restarts the gateway, send any message to the bot
  6. The first person to send a message will be automatically paired as the owner
  7. If automatic pairing fails, execute:
When manually editing the Telegram config, refer to the structure written by the installer:

Other IM Platforms

The installer pre-enables these plugin entries:
  • dingtalk
  • openclaw-wecom
  • qqbot
  • discord
  • slack
  • feishu
However, these channels usually require you to fill in the platform credentials and corresponding channels.<name> config yourself. The recommended workflow is:
  1. First, create a bot or app on the relevant platform
  2. Write the platform credentials into ~/.openclaw/openclaw.json
  3. Make sure the corresponding plugins.entries.<name>.enabled is true
  4. Restart the OpenClaw service
  5. Check the logs to verify if the channel was successfully loaded
If you are preparing to connect OpenClaw to team IM, it is strongly recommended to create a separate Crazyrouter token for the team bot, and set a stricter model whitelist and quota.

Service Management and Logs

Note: The installer will try to execute loginctl enable-linger $(whoami), so that even if you exit SSH, user-level services outside the session can continue to run.

Performance and Cost Recommendations

  • Use claude-opus-4-8 by default first, then refine model separation after confirming the whole workflow
  • For high-frequency daily Q&A or bot notifications, switch back for cost to claude-opus-4-8 or gemini-3.1-pro
  • Use gpt-5.5 separately for coding workflows
  • In teams, assign Telegram / enterprise IM / WebUI different tokens for cost accounting and risk isolation
  • Keep only necessary plugins and models to reduce cost from misuse

Upgrade Guide

The most reliable way to upgrade is to rerun the installer, as it will update the OpenClaw package, patches, and service scripts together.
1

Back up the current configuration

2

Execute the installation script again

3

Check if custom configuration needs to be restored

If you have manually added any channels other than Telegram or changed the default model, re-compare openclaw.json to make sure these custom settings are still present.
4

Restart and verify

Reopen the WebUI and confirm that the model, logs, and connected IM channels are working properly.
If you clearly only want to upgrade the OpenClaw npm package, you can also execute npm install -g openclaw@latest first, then restart the service; but this method will not re-apply patches and script updates from the installer.

Uninstallation Guide

If you installed Node.js specifically for OpenClaw at the beginning, you can also manually remove Node.js after confirming that no other projects depend on it.

Common Errors and Fixes

FAQ

Which address should be used as the Crazyrouter backend?

Just keep the value set by the installer by default: OpenAI compatible provider uses https://api.crazyrouter.com/v1, Claude / MiniMax natively compatible providers use https://api.crazyrouter.com.

Which default model should I keep?

In most cases, keep claude-opus-4-8 first. If you mainly use OpenClaw as a code assistant, then switch to gpt-5.5.

Why can’t I see the model I want to use in the model list?

Usually because your Crazyrouter token hasn’t allowed that model, or you changed to a wrong provider prefix.

Why do private Telegram chats work but group chats don’t?

The installer sets the default Telegram group policy to allowlist. You need to further adjust the Telegram channel configuration according to your usage needs.

How do I open OpenClaw to the public most safely?

At a minimum, do three things: restrict source access, protect gateway.auth.token, and use a separate Crazyrouter token for OpenClaw. If exposing directly to the public internet, it’s recommended to add a reverse proxy and extra access control.

View the installation script repository

Check the installation script, submit issues, or manually review the one-click installation logic.