1. Preparing the Node Environment
1
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
|
- Set the nvm environment variables
You need to edit Bash’s config file and add the following:
1
2
3
| export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
2. Installing OpenClaw
1
| npm install -g openclaw@latest
|
1
| npm uninstall -g openclaw
|
- Set environment variables
You can add KEY=VALUE entries here for Plugins, Channels, Skills, and so on to use.
- Initialize the configuration
Add the --install-daemon flag and the service starts automatically after a reboot. openclaw onboard --force forces the configuration to be re-initialized.
- Adjust configuration parameters
Modify the following parameters in the ~/.openclaw/openclaw.json file:
1
2
3
4
5
6
| {
...
"contextWindow": 262144,
"maxTokens": 65536
...
}
|
Restart the gateway service for the configuration to take effect.
1
| openclaw gateway restart
|
3. Using Commands
- Chat with the Bot in the terminal
- Chat with the Bot in the browser
4. gateway Management
gateway is OpenClaw’s gateway module, and mainly just needs to be started and stopped.
1
| openclaw gateway restart
|
5. plugins Management
plugins are OpenClaw’s feature extension modules, and mainly just need to be installed and enabled.
1
| openclaw plugins install telegram
|
1
| openclaw plugins enable telegram
|
1
| openclaw plugins disable telegram
|
6. skills Management
skills are OpenClaw’s skill modules, and mainly just need to be installed and enabled.
- Check whether the skills are working properly
1
| openclaw skills info weather
|
7. channel Management
channel is how OpenClaw communicates with the outside world / the user, and mainly just needs to be enabled and configured.
1
| openclaw channels add --channel telegram --token <token>
|
You can also run it with no arguments to enter an interactive page and configure the channel information.
- Check channel connection status
1
| openclaw channels status
|
1
| openclaw channels logout --channel telegram
|
8. agent Management
agent is OpenClaw’s agent module, and mainly just needs to be created and managed. The agent subcommand lets you create agents with multiple roles.
1
| openclaw agents add test
|
1
| openclaw agents set-identity --agent test --name test2
|
Modify name/theme/emoji/avatar and so on.
1
| openclaw agents delete test
|
1
| openclaw agent --agent main --message "hello"
|
9. Operations Tasks
1
| openclaw daemon install
|
1
| openclaw daemon uninstall
|
1
| openclaw uninstall --all --yes --non-interactive
|
10. Troubleshooting
- Channel conversation error
1
2
| 400 Invalid JSON payload received. Unknown name "patternProperties" at 'tools[0].function_declarations[3].parameters.properties[4].value': Cannot find field.
Invalid JSON payload received. Unknown name "additionalProperties" at 'tools[0].function_declarations[5].parameters.properties[20].value.properties[3].value.items': Cannot find field.
|
This is a model configuration problem, and the model needs to be changed.