First, make sure you have installed the Node.js 24+ environment, and then execute the following in the terminal:OpenClaw installation method:Method 1: npm installation (recommended)
npm install -g openclaw
Method 2: One-click installation script
After the installation is complete, run the guide (complete the basic settings according to the prompts) openclaw onboard --install-daemon
Choose yes and quick start
Select Custom Provider here under the model providerCreate a token on the TreeRouter website. If you already have a token, check whether the grouping matches the model you want to callFill in the URL and paste the key of the token above Note: Use URL: https://treerouter.com or https://treerouter.com/v1Pay attention to the compatible endpoint selection, except for claude which selects the second one, generally choose Open AI compatible for othersCopy the model name from the model plazaPaste the model nameSuccessful verification means successful connection to the site If it fails, add /v1 to the end of the url Note that there is an optional model alias, just press enterThen choose skipFinally restart the gatewaySelect web uiIf it cannot run successfully, execute the following in order
openclaw gateway run
openclaw dashboard
Successful operation is as follows(Optional) If the gateway log reports a warning that the context window is too small, you can modify the following configurationModify these two parameters in the openclaw.json file in the .openclaw directory