DEV Community

Jon Davis
Jon Davis

Posted on

Install Clawdbot (OpenClaw) on Linux: A Local-First AI Assistant in ~10 Minutes

TL;DR — Clawdbot (aka OpenClaw) is an open-source, self-hosted AI assistant by Peter Steinberger that runs fully on your Linux box. No prompts, file paths, or code snippets get shipped to a third party. Install Node.js 22+ via nvm, then:

curl -fsSL https://clawd.bot/install.sh | bash
openclaw onboard --install-daemon
Enter fullscreen mode Exit fullscreen mode

That's it. Below is the full walkthrough — trade-offs, troubleshooting, headless server setup, and how it compares to Ollama/LM Studio/Aider/etc.


Why local-first matters (the 30-second pitch)

Most AI tooling is a remote API call in a trench coat. Every command, file path, and code fragment you feed it becomes a log line somewhere you don't own. For anyone with a proprietary codebase, production access, or just healthy paranoia, that's a non-starter.

OpenClaw flips the architecture: the assistant runs on your machine, talks to your shell, reads your files, and optionally bridges into Discord/Telegram/WhatsApp/Slack. You can back it with a local LLM (Ollama, llama.cpp) for fully air-gapped operation, or route to OpenAI/Anthropic when quality > privacy for a given task. Your call, per query.

What you actually get

Feature Description
Local execution All processing stays on the host
Shell execution Runs commands on your behalf (with review)
Filesystem access Reads/writes/indexes local files
Chat bridges Discord, Telegram, WhatsApp, Slack
Plugin support Custom scripts + community plugins
Cross-platform Linux native, macOS, Windows via WSL2
Daemon mode systemd user service for always-on access


System requirements

The critical dependency is Node.js 22+, which is newer than what most distro package managers ship. Don't fight apt/dnf — use nvm.

Requirement Minimum Recommended
OS Any modern Linux Ubuntu 22.04 LTS / Debian 12
Node.js 22.0+ Latest 22.x LTS
Package manager npm 9+ / pnpm 8+ pnpm
RAM 2 GB free 4+ GB
Disk 500 MB 2+ GB (plugins/cache)
Permissions sudo for daemon install

Confirmed working on: Ubuntu 20.04/22.04/24.04, Debian 11/12, Fedora 38–40, Arch (current), Linux Mint 21+, Pop!_OS 22.04, Raspberry Pi OS (64-bit). Anywhere else: you just need glibc 2.31+ and Node 22.


Step 1: Get Node.js 22 via nvm

# Check what you have
node -v
Enter fullscreen mode Exit fullscreen mode

If it's not v22.x.x, install nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# Reload your shell (pick one)
source ~/.bashrc
source ~/.zshrc

# Verify
nvm --version
Enter fullscreen mode Exit fullscreen mode

Then install and pin Node 22:

nvm install 22
nvm use 22
nvm alias default 22

node -v   # v22.x.x
npm -v    # 9.x+
Enter fullscreen mode Exit fullscreen mode

Don't skip the alias default. Without it, every new terminal session drops back to whatever Node the system had, and the daemon will misbehave.

Why strictly 22+?

OpenClaw leans on ES2023+ features and native fetch. On Node 18/20 the installer may appear to succeed, but the daemon fails to start or behaves unpredictably. Treat node -v showing 22+ as a hard precondition.


Step 2: Install OpenClaw

You have two paths. Pick one.

# Path A — automated installer (recommended)
curl -fsSL https://clawd.bot/install.sh | bash

# Path B — manual, via npm
npm install -g openclaw@latest
Enter fullscreen mode Exit fullscreen mode

Then register the background service:

openclaw onboard --install-daemon
Enter fullscreen mode Exit fullscreen mode

The onboarding wizard will walk you through LLM provider (local Ollama/llama.cpp or cloud), chat integrations, and permission scopes.


What you can actually do with it

These are the workflows that tend to stick once the daemon is running.

1. Natural-language sysadmin

Describe intent, let OpenClaw generate the command, review it, run it.

"Clean up log files in /var/log older than 30 days, keeping the last 5 GB"
"List all systemd services that have failed in the last hour"
"Check disk usage across all mounted volumes; alert if any > 85%"
Enter fullscreen mode Exit fullscreen mode

Community benchmarks in the OpenClaw GitHub discussions report 30–60 minutes/day saved on routine maintenance once scopes are dialed in.

2. Coding assist with real repo access

Unlike Copilot or browser-based ChatGPT, it reads your actual tree. No copy-paste into a web UI, no source leaving the host.

"Summarize what the auth/ directory does"
"Generate a test for processPayment in src/payments.js"
"Find all TODO comments grouped by file"
"What changed in the last 10 commits?"
Enter fullscreen mode Exit fullscreen mode

3. Searchable personal knowledge base

Point it at your notes, PDFs, and markdown. grep stops being your only option.

4. ChatOps from your phone

Wire it into Discord or Telegram, DM the bot, execute ops from anywhere. No VPN, no exposed SSH.

A 2024 State of DevOps report by DORA Research found ChatOps-enabled teams resolve incidents 30% faster on average.

5. Scheduled reports

Cron + OpenClaw + Telegram = daily disk reports, weekly git summaries, CPU alerts pushed to a channel instead of you SSH-ing in to check.

6. Dev environment scaffolding

"Set up a new Python venv for project X with these deps"
"Run the test suite and summarize failures"
"Start the local frontend dev server"
Enter fullscreen mode Exit fullscreen mode


ChatOps: wiring up Discord and Telegram

Discord

  1. Create a Discord Application at discord.com/developers/applications
  2. Add a Bot, copy the token
  3. In onboarding (or openclaw config), pick Discord and paste the token
  4. Invite the bot to your server with message/command permissions
  5. Type in the designated channel — OpenClaw replies with output

Security reality check: anyone with write access to that channel can execute commands on your box. Treat it like SSH. Use a private channel with a tight membership list.

Telegram

# After creating a bot via @BotFather and copying the token:
openclaw config --chat telegram --token YOUR_TOKEN
Enter fullscreen mode Exit fullscreen mode

Telegram is the fastest integration because BotFather handles registration inside the chat. Personal setup: under 5 minutes to first command.

Access control

openclaw config --allowlist  # restrict to specific user IDs
Enter fullscreen mode Exit fullscreen mode

Audit allowlists regularly on shared bots.

Integration Setup complexity Best for
Discord Medium (dev portal) Team/DevOps channels
Telegram Low (BotFather) Personal, mobile control
WhatsApp High (Meta Business API) Enterprise
Slack Medium (App directory) Enterprise dev teams


How it compares to other local AI tools

Tool Chat integration Terminal exec File indexing Setup
OpenClaw (Clawdbot) Discord, Telegram, WhatsApp Full Yes Low–Medium
Open WebUI + Ollama None (web UI) No Limited Medium
LM Studio None No No Low
Jan.ai None No Limited Low
Aider None Yes (git-focused) Yes (git repos) Low
Continue.dev None (IDE plugin) Via IDE Yes (project) Low

Trade-off summary: if you want terminal exec + chat bridges in one package, OpenClaw is the only game in town as of 2026. If you just want a conversational UI over a local model and nothing touches your shell, Open WebUI + Ollama or Jan.ai is a smaller attack surface.


Troubleshooting

Most install failures land in one of: PATH, Node version, daemon permissions, port conflicts, incomplete onboarding.

openclaw: command not found

npm's global bin isn't in PATH.

npm config get prefix
# e.g. /home/you/.local/share/nvm/versions/node/v22.x.x

echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
openclaw --version
Enter fullscreen mode Exit fullscreen mode

node: version not supported

nvm install 22
nvm use 22
openclaw onboard --install-daemon
Enter fullscreen mode Exit fullscreen mode

Permission denied during daemon install

The daemon registers as a systemd user service, not system-wide. You need lingering enabled:

loginctl enable-linger $USER
openclaw onboard --install-daemon
Enter fullscreen mode Exit fullscreen mode

Daemon status: failed

journalctl --user -u openclaw -n 50
Enter fullscreen mode Exit fullscreen mode

Usual suspects: port 3147 in use (lsof -i :3147), Node version mismatch, missing env vars from a half-finished onboarding.

Quick reference

Error Cause Fix
command not found PATH missing Add npm bin to PATH
version not supported Node < 22 nvm install 22
EACCES: permission denied Global install perms Use nvm (no sudo)
Port 3147 in use Conflict Kill process or reconfigure port
Daemon failed to start Missing env vars Re-run openclaw onboard

Running OpenClaw headless (VPS, home server, Pi)

The daemon architecture was built for this. Install identically via SSH; the only difference is how you interact afterward.

Three interaction paths:

# 1. SSH into the interactive CLI
ssh user@server openclaw

# 2. Localhost API
curl http://localhost:3147/api/query -d '{"query":"disk usage"}'

# 3. Chat apps (Discord/Telegram) — the primary recommended path
Enter fullscreen mode Exit fullscreen mode

Hardening checklist

Measure Implementation
API localhost-only Default; never expose 3147 externally
Chat allowlist openclaw config user ID allowlist
Read-only sensitive dirs Filesystem perms + OpenClaw scope
Audit logs openclaw config --audit-log
Firewall Block 3147 externally at the firewall

The non-negotiable one: port 3147 must stay on localhost. It's an unauthenticated command executor — internet-exposing it is equivalent to handing out root shells.


Updating and a few notes on naming

# Via npm
npm install -g openclaw@latest

# Or built-in
openclaw update

# Restart the daemon (npm path requires this manually)
systemctl --user restart openclaw
openclaw --version
Enter fullscreen mode Exit fullscreen mode

"Clawdbot" vs "OpenClaw": same software. The project originally shipped as Clawdbot and was rebranded to OpenClaw as it outgrew its chatbot origins. npm package: openclaw. Binary: openclaw. Site: clawd.bot. Older tutorials using "Clawdbot" refer to the same thing you install with npm install -g openclaw@latest.

Multi-user: per-user installation, user-space daemon. Each user gets an isolated instance, config, scopes, and chat integrations. No cross-contamination.

Pointing it at a local LLM: pick "Local LLM" in onboarding, choose Ollama or llama.cpp. Ollama is the path of least resistance — ollama pull llama3 and OpenClaw auto-detects the running server.


Summary

  • Local-first AI assistant with terminal + filesystem + chat app integration in one package
  • Node.js 22+ via nvm is the only gotcha
  • curl -fsSL https://clawd.bot/install.sh | bashopenclaw onboard --install-daemon
  • Headless works great; keep 3147 on localhost, use chat apps as the front door
  • When things break: check node -v, check PATH, check loginctl enable-linger, check journalctl --user -u openclaw

Install OpenClaw →

Reference: https://videodubber.ai/blogs/how-to-install-clawdbot-linux/.

Top comments (0)