Deploy OpenClaw on CentOS 8 VM: Install, Configure, and Security Analysis
This guide walks through installing OpenClaw on a CentOS 8 virtual machine, covering Node.js setup, OpenClaw installation, interactive configuration with DeepSeek API, web UI access via gateway binding and CORS fixes, and a critical analysis of security vulnerabilities like ClawJacked and high token consumption.
Reading font

Installing Node.js 24.13.0 on CentOS 8
OpenClaw requires npm version 22.0 or higher, which is not supported on older systems like CentOS 7. The author chooses CentOS 8 as the base OS.
#cd /usr/local/src
wget https://nodejs.org/dist/v24.13.0/node-v24.13.0-linux-x64.tar.xz
# Extract
tar -xf node-v24.13.0-linux-x64.tar.xz
# Move to /usr/local
mv node-v24.13.0-linux-x64 /usr/local/node
# Create global symlinks
ln -s /usr/local/node/bin/node /usr/bin/node
ln -s /usr/local/node/bin/npm /usr/bin/npmVerification shows Node.js v24.13.0 and npm 11.6.2.
node --version
# v24.13.0
npm --version
# 11.6.2Installing OpenClaw
Install the latest version globally via npm. Missing dependencies (git, cmake, python3-devel) are installed via dnf as errors appear.
npm install -g openclaw@latest
# Install dependencies
dnf install git -y
git --version
# git version 2.27.0
dnf install cmake python3-devel -yInstallation takes about 30 minutes. A symlink is created for the openclaw binary and the installation is verified.
sudo ln -s /usr/local/node/bin/openclaw /usr/bin/openclaw
openclaw --help
# OpenClaw 2026.3.2 (85377a2) — Your .zshrc wishes it could do what I do.Configuring OpenClaw
1. Onboarding
Run the onboarding command with daemon installation: openclaw onboard --install-daemon Accept the disclaimer and acknowledge risks by selecting Yes .
2. Onboarding Mode: QuickStart
Choose QuickStart (first option) to configure later via openclaw configure.
3. Model Configuration
Select an AI provider. For DeepSeek API, choose Custom Provider and enter:
URL: https://api.deepseek.com/v1 API Key: sk-xxxx (from DeepSeek console)
Model ID: deepseek-chat (DeepSeek-V2)
The system validates the API key; a 402 error indicates insufficient token balance.
4. Channel Selection
Choose the last option to skip channel configuration.
5. Skills Configuration
Select YES to configure skills, then skip the presented list.
6. Hooks Configuration
Enable all three hooks:
boot-md : Loads a markdown file as default prompt on startup (rules, preferences, project context).
command-logger : Logs executed commands and key operations for debugging and review; disable if privacy is a concern.
session-memory : Persists session state for contextual continuity across runs.
7. Interaction Mode
Select Web UI as the incubation method.
8. Verify Status
openclaw statusConfiguring Web UI Access
Because the VM runs CentOS, the default loopback binding prevents external browser access. The gateway configuration must be changed.
1. Change Bind to LAN
Edit ~/.openclaw/openclaw.json and set gateway.bind to "lan":
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "***********"
},
"port": 18789,
"bind": "lan",
"tailscale": {
"mode": "off",
"resetOnExit": false
}
}Restart the gateway: openclaw gateway restart Access via http://192.168.112.145:18789/ (replace with your VM IP).
2. Fix CORS: Add allowedOrigins
Browser reports origin not allowed . Add gateway.controlUi.allowedOrigins:
"gateway": {
"port": 18789,
"mode": "local",
"bind": "lan",
"controlUi": {
"allowedOrigins": [
"http://localhost:18789",
"http://127.0.0.1:18789",
"http://192.168.112.145:18789"
]
}
}Restart gateway again.
3. Secure Context Requirement
Next error: control ui requires device identity (use HTTPS or localhost secure context) . Append the token to the URL: http://192.168.112.145:18789/#token=xx The dashboard loads and interactive queries work (e.g., "OpenClaw process resource usage" returns a detailed analysis).
Security and Token Consumption Analysis
Security Vulnerabilities
"ClawJacked" vulnerability : The gateway defaults to loopback and trusts all local connections, exempting them from rate limits. A malicious website visited in the browser can open a WebSocket to the local gateway and brute-force the admin password at hundreds of attempts per second. Once cracked, the attacker gains full admin rights, can steal credentials, API keys, chat histories, files, and execute arbitrary commands.
Overly permissive default permissions : OpenClaw requires high OS privileges for automation, blurring trust boundaries. If the agent is hijacked, it becomes a broad data exfiltration and destruction vector.
Uncontrolled third-party Skills ecosystem : Many Skills plugins have vulnerabilities or are outright malicious.
Token Consumption
By default, every request loads all tool definitions, system prompts, and skill summaries, wasting tokens. A simple command consumed over 40,000 tokens in the author's test, making heavy usage costly for paid APIs.
Emergent Behavior Risk
Complex AI systems can exhibit unpredictable "emergent behavior." Users cannot fully foresee what a long-running agent will decide, and the execution process is a black box, introducing uncontrollable risk.
References:
https://blog.csdn.net/solihawk/article/details/158804994
https://blog.csdn.net/qq_31292011/article/details/157899970
For questions about attribution, corrections or content rights, please contactand we will review it promptly.