Want to install and manage OpenClaw without repeatedly searching through documentation? Here’s a practical command reference covering installation, onboarding, configuration, models, channels, Gateway management and troubleshooting.
Commands may change between releases, so check your installed version with:
openclaw --versionopenclaw --helpopenclaw <command> --help
1. Install OpenClaw
macOS, Linux or WSL2:
curl -fsSL https://openclaw.ai/install.sh | bash
Windows PowerShell:
iwr -useb https://openclaw.ai/install.ps1 | iex
The installer detects the operating system, provisions Node.js when necessary, installs OpenClaw and launches onboarding.
To install without starting onboarding:
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
Manual npm installation:
npm install -g openclaw@latest --allow-scripts=openclawopenclaw onboard --install-daemon
OpenClaw currently requires Node.js 24.16+ or 26.1+, with Node 26 recommended. Full installation options are documented in the official installation guide.
2. First-time setup
Run the guided onboarding process:
openclaw onboard
Install OpenClaw’s managed Gateway service during onboarding:
openclaw onboard --install-daemon
Other useful setup options:
openclaw setupopenclaw setup --wizardopenclaw setup --classicopenclaw setup --baselineopenclaw setup --workspace ~/my-openclaw-workspaceopenclaw setup --json
What they do:
setup— chat-based setup assistantsetup --wizard— complete interactive onboardingsetup --classic— traditional multi-step wizardsetup --baseline— create only the base configuration and workspaceonboard— configure authentication, models, Gateway, workspace, channels and skills
Remote Gateway setup is also supported:
openclaw setup \ --non-interactive \ --accept-risk \ --mode remote \ --remote-url wss://gateway.example.com \ --remote-token '<token>'
Never publish real API keys, passwords or Gateway tokens in screenshots, posts or shell history. The internet already contains enough avoidable excitement.
3. Reconfigure an existing installation
Launch the interactive configuration wizard:
openclaw configure
Configure only selected areas:
openclaw configure --section workspaceopenclaw configure --section modelopenclaw configure --section webopenclaw configure --section gatewayopenclaw configure --section daemonopenclaw configure --section channelsopenclaw configure --section pluginsopenclaw configure --section skillsopenclaw configure --section health
Multiple sections can be combined:
openclaw configure \ --section model \ --section channels \ --section health
The available configuration sections and their behaviour are covered in the configure command reference.
4. Non-interactive configuration
Find the active configuration file:
openclaw config file
Read a setting:
openclaw config get gateway.portopenclaw config get agents.defaults.model --json
Change a setting:
openclaw config set gateway.port 18789openclaw config set agents.defaults.heartbeat.every "2h"
Remove a setting:
openclaw config unset agents.defaults.fastModeDefault
Apply several changes from a JSON5 patch:
openclaw config patch \ --file ./openclaw.patch.json5 \ --dry-run
Validate before restarting anything:
openclaw config validateopenclaw config validate --json
Inspect the complete configuration schema:
openclaw config schemaopenclaw config schema --json
Use --dry-run where supported before making important changes. Full examples are in the configuration CLI reference.
5. Configure models and providers
Inspect model status:
openclaw models statusopenclaw models status --json
List available models:
openclaw models listopenclaw models list --provider ollama
Set the primary model:
openclaw models set openai/gpt-5.6-sol
Manage authentication:
openclaw models auth listopenclaw models auth login --provider openai
Manage fallbacks:
openclaw models fallbacks --help
Other model commands include:
openclaw models refreshopenclaw models aliases --helpopenclaw models accounts --helpopenclaw models set-image <provider/model>openclaw models image-fallbacks --help
Use the models command reference for provider-specific authentication and model routing.
6. Optional local models with Ollama
Install Ollama, then download a model:
ollama pull gemma4
Run OpenClaw onboarding and select Ollama:
openclaw onboard
Verify model discovery:
openclaw models list --provider ollama
Make the local model your primary:
openclaw models set ollama/gemma4
OpenClaw’s onboarding supports local-only, cloud-only and combined Ollama configurations. See the official Ollama setup guide.
7. Configure messaging channels
List configured channels:
openclaw channels list
Show available and installable channels:
openclaw channels list --all
Add a channel using guided setup:
openclaw channels add
Examples:
openclaw channels login --channel whatsappopenclaw channels add --channel telegram --token '***'
Inspect live channel health:
openclaw channels statusopenclaw channels status --probe
Useful channel commands:
openclaw channels capabilitiesopenclaw channels logs --channel allopenclaw channels resolve --channel slack "#general"openclaw channels dead-letters list
Channel configuration and troubleshooting are covered in the channels CLI guide.
8. Manage the Gateway
Check the service:
openclaw gateway status
Start, stop or restart it:
openclaw gateway startopenclaw gateway stopopenclaw gateway restart
Install or remove the managed service:
openclaw gateway installopenclaw gateway uninstall
Run it directly in the foreground:
openclaw gateway run
Replace an existing listener on the configured port:
openclaw gateway run --force
Test connectivity:
openclaw gateway healthopenclaw gateway probeopenclaw gateway stability
Export support information:
openclaw gateway diagnostics
Discover Gateways on the network:
openclaw gateway discover
The Gateway is OpenClaw’s WebSocket service for channels, sessions, nodes and hooks. Its complete command set is documented in the Gateway CLI reference.
9. Health checks and diagnosis
Start with the quick checks:
openclaw healthopenclaw statusopenclaw gateway status
Run a detailed read-only diagnosis:
openclaw status --allopenclaw status --deepopenclaw status --usageopenclaw status --json
Check configuration and runtime health:
openclaw doctoropenclaw doctor --lintopenclaw doctor --lint --severity-min warningopenclaw doctor --deepopenclaw doctor --json
Apply recommended repairs only after reviewing the findings:
openclaw doctor --fix
Non-interactive repair:
openclaw doctor --fix --non-interactive
Additional diagnostic commands:
openclaw logsopenclaw channels logs --channel allopenclaw channels status --probeopenclaw models statusopenclaw config validateopenclaw security --helpopenclaw update --help
doctor can inspect configuration, model routing, plugins, skills, channels, Gateway services, local state and migrations. See the official Doctor guide.
10. The “something is broken” checklist
Run these in order:
openclaw config validateopenclaw healthopenclaw gateway statusopenclaw models statusopenclaw channels status --probeopenclaw status --allopenclaw doctor --lint
If the findings recommend repairs:
openclaw doctor --fixopenclaw gateway restartopenclaw status --deep
That gives you a complete OpenClaw toolkit: installation, onboarding, targeted configuration, scripted configuration, local Ollama models, channel management, Gateway control and diagnostics.
Full CLI index:
https://docs.openclaw.ai/cli
#OpenClaw #Ollama #LocalAI #SelfHostedAI #OpenSourceAI #ArtificialIntelligence #Automation #Linux #DevOps #AIInfrastructure






