Note: This article was generated by AI in OpenClaw. Nusendra only asked the AI to create a new article in WhatsApp, then AI in his Raspberry Pi home server will do the rest.
OpenClaw is an AI assistant that handles messaging, file operations and web browsing locally on your machine. Here’s how to install and configure it on Ubuntu.
If Node.js isn’t installed yet, use the NodeSource repository:
# Update package list
sudo apt update
# Install curl if not present
sudo apt install -y curl
# Install Node.js 18
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
npm --version OpenClaw ships on npm. Install it globally:
# Install OpenClaw globally
sudo npm install -g openclaw
# Verify installation
openclaw --version Create a workspace for your instance:
# Create workspace directory
mkdir -p ~/openclaw-workspace
cd ~/openclaw-workspace
# Initialize OpenClaw
openclaw init init creates the basic structure, including SOUL.md, USER.md and AGENTS.md.
Edit IDENTITY.md to define who your assistant is:
# IDENTITY.md - Who Am I?
- **Name:** OpenClaw
- **Creature:** AI Assistant
- **Vibe:** Helpful and efficient
- **Emoji:** 🐺
- **Avatar:** /path/to/avatar.png Edit USER.md with your own information:
# USER.md - About Your Human
- **Name:** Your Name
- **Timezone:** Asia/Jakarta
- **Notes:** Any preferences or special instructions OpenClaw supports several messaging platforms. For WhatsApp:
# Start WhatsApp configuration
openclaw whatsapp setup That generates a QR code. Scan it with WhatsApp to link your account.
# Start OpenClaw
openclaw start The output should show OpenClaw running and ready to receive messages.
Send a message to the WhatsApp number linked to OpenClaw and you should get a reply. Something like “Who are you?”, “What can you do?” or “Tell me a joke” is enough to confirm it’s working.
For persistent operation, set OpenClaw up as a systemd service:
# Create systemd service file
sudo nano /etc/systemd/system/openclaw.service Add the following:
[Unit]
Description=OpenClaw AI Assistant
After=network.target
[Service]
Type=simple
User=nusendra
WorkingDirectory=/home/nusendra/openclaw-workspace
ExecStart=/usr/bin/openclaw start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target Enable and start it:
sudo systemctl enable openclaw
sudo systemctl start openclaw
# Check status
sudo systemctl status openclaw Create a .env file in your workspace for custom configuration:
# OpenClaw environment variables
OPENCLAW_MODEL=openrouter/arcee-ai/trinity-large-preview:free
OPENCLAW_THINKING=off
OPENCLAW_DEFAULT_CHANNEL=whatsapp Change the default port:
# Set custom port
export OPENCLAW_PORT=3001
openclaw start If OpenClaw crashes under memory pressure, cap its usage:
# Reduce memory usage
export OPENCLAW_MEMORY_LIMIT=2048
openclaw start Check what the machine actually has free with free -h.
sudo npm update -g openclaw Check the logs:
openclaw logs Verify the gateway:
openclaw whatsapp status Keep the workspace file permissions tight:
# Set secure permissions
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub And if you’re exposing OpenClaw to the internet, open only the port it needs:
# Allow OpenClaw port
sudo ufw allow 3000/tcp From here you can customise the assistant by editing the .md files in your workspace, install additional OpenClaw skills, integrate services like calendars and email, and build automation workflows with the built-in tools.