How to Install OpenClaw Securely
Three installation methods with security verification for each approach.
Prerequisites
You need Homebrew and Node.js 18+ installed.
Install Homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install Node.js
$ brew install nodeVerifies Homebrew is installed and up to date
Checks Node.js version meets minimum requirements
Method 1: npm Native Install
The simplest approach — installs OpenClaw directly on your host machine.
Install OpenClaw globally
$ npm install -g @anthropic-ai/openclawVerify the installation
$ openclaw --versionConfirm you see a version number like 0.2.x or later.
Run your first scan
$ npx clawkeeper scanDetects native OpenClaw installation path and version
nvm or fnm to avoid global npm permission issues.Method 2: Docker (Recommended)
Docker isolates OpenClaw from your host, reducing the attack surface.
Install Docker
$ brew install --cask dockerThen launch Docker Desktop from Applications.
Checks Docker is installed and the daemon is running
Pull and run OpenClaw
$ docker run -it --rm -v $(pwd):/workspace anthropic/openclawVerify with Clawkeeper
$ npx clawkeeper scanValidates Docker group membership and daemon status on Linux
Method 3: VPS / Cloud Server
Running OpenClaw on a remote server requires additional hardening.
Secure SSH access
$ ssh-keygen -t ed25519 -C openclaw-serverCopy the public key to your server and disable password authentication.
Audits SSH config: key auth, root login, port settings
Configure the firewall
$ sudo ufw allow 22/tcp && sudo ufw allow 443/tcp && sudo ufw enableEnsures UFW/firewalld is active with sensible rules
Create a dedicated user
$ sudo adduser openclaw --disabled-password && sudo usermod -aG docker openclawNever run OpenClaw as root.
Verifies a non-root user account is in use
Install and scan
$ su - openclaw -c 'npm install -g @anthropic-ai/openclaw && npx clawkeeper scan'What a First Scan Looks Like
$ npx clawkeeper scan
Running 55 security checks...
PASS homebrew — Homebrew is installed
PASS node — Node.js v20.11.0
PASS docker_installed — Docker 24.0.7
FAIL firewall — macOS firewall is disabled
FAIL filevault — FileVault is not enabled
─────────────────────────────────
Security Grade: C (72/100)
2 critical issues found. Run with --fix for remediation steps.
Common Mistakes
sudo npm install -g can lead to permission issues and weakens the security boundary between OpenClaw and your system.openclaw --version after installation. A failed install can leave a partial binary that silently breaks skills.