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.
This guide will walk you through the complete installation and setup of OpenClaw, an AI assistant that can handle messaging, file operations, web browsing, and more, all running locally on your Ubuntu system.
Before we begin, make sure you have:
If you don’t have Node.js installed, you can install it using 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 is available through npm. Install it globally:
# Install OpenClaw globally
sudo npm install -g openclaw
# Verify installation
openclaw --version Create a new workspace for your OpenClaw instance:
# Create workspace directory
mkdir -p ~/openclaw-workspace
cd ~/openclaw-workspace
# Initialize OpenClaw
openclaw init The init command will create the basic structure with essential files like SOUL.md, USER.md, and AGENTS.md.
Edit the IDENTITY.md file 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 the USER.md file with your information:
# USER.md - About Your Human
- **Name:** Your Name
- **Timezone:** Asia/Jakarta
- **Notes:** Any preferences or special instructions OpenClaw supports multiple messaging platforms. Let’s set up WhatsApp:
# Start WhatsApp configuration
openclaw whatsapp setup This will generate a QR code. Scan it with your WhatsApp to link your account.
Now you’re ready to start your OpenClaw assistant:
# Start OpenClaw
openclaw start You should see output indicating that OpenClaw is running and ready to receive messages.
Send a message to your WhatsApp number that’s linked to OpenClaw. You should receive a response from your assistant.
Try asking:
For persistent operation, you can configure OpenClaw to run as a system service:
# Create systemd service file
sudo nano /etc/systemd/system/openclaw.service Add the following content:
[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 the service:
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 If you encounter port conflicts, you can change the default port:
# Set custom port
export OPENCLAW_PORT=3001
openclaw start If OpenClaw crashes due to memory constraints, try:
# Reduce memory usage
export OPENCLAW_MEMORY_LIMIT=2048
openclaw start To update to the latest version:
sudo npm update -g openclaw Ensure your workspace files have appropriate permissions:
# Set secure permissions
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub If you’re exposing OpenClaw to the internet, configure your firewall:
# Allow OpenClaw port
sudo ufw allow 3000/tcp Now that OpenClaw is running, you can:
.md files in your workspaceCheck the logs:
openclaw logs Verify the WhatsApp gateway:
openclaw whatsapp status Monitor memory usage:
free -h You now have a fully functional AI assistant running on your Ubuntu system! OpenClaw can handle messaging, file operations, web browsing, and much more, all while keeping your data private and secure.
Enjoy your new AI companion!