This page looks best with JavaScript enabled

OpenClaw Installation and Configuration

 ·  ☕ 3 min read

1. Preparing the Node Environment

  • Install nvm
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"
  • Install Node
1
nvm install 22 default

2. Installing OpenClaw

  • Install the package
1
npm install -g openclaw@latest
  • Uninstall
1
npm uninstall -g openclaw
  • Set environment variables
1
vim ~/.openclaw/.env

You can add KEY=VALUE entries here for Plugins, Channels, Skills, and so on to use.

  • Initialize the configuration
1
openclaw onboard

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
1
openclaw tui
  • Chat with the Bot in the browser
1
openclaw dashboard

4. gateway Management

gateway is OpenClaw’s gateway module, and mainly just needs to be started and stopped.

  • Start
1
openclaw gateway
  • Stop
1
openclaw gateway stop
  • Restart
1
openclaw gateway restart

5. plugins Management

plugins are OpenClaw’s feature extension modules, and mainly just need to be installed and enabled.

  • List installed plugins
1
openclaw plugins list
  • Install a plugin
1
openclaw plugins install telegram
  • Enable a plugin
1
openclaw plugins enable telegram
  • Disable a plugin
1
openclaw plugins disable telegram

6. skills Management

skills are OpenClaw’s skill modules, and mainly just need to be installed and enabled.

  • List installed skills
1
openclaw skills list
  • Check whether the skills are working properly
1
openclaw skills check
  • Show skill information
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.

  • Add a channel
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.

  • List channels
1
openclaw channels list
  • Check channel connection status
1
openclaw channels status
  • Log out of a channel
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.

  • List agents
1
openclaw agents list
  • Create an agent
1
openclaw agents add test
  • Modify agent information
1
openclaw agents  set-identity --agent test --name test2

Modify name/theme/emoji/avatar and so on.

  • Delete an agent
1
openclaw agents delete test
  • Talk to an agent
1
openclaw agent --agent main --message "hello"

9. Operations Tasks

  • Check OpenClaw status
1
openclaw status
  • View live logs
1
openclaw logs --follow
  • Install the daemon
1
openclaw daemon install
  • Uninstall the daemon
1
openclaw daemon uninstall
  • Check
1
openclaw doctor
  • Uninstall all services
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.


微信公众号
WRITTEN BY
微信公众号