You've heard about OpenClaw — the open-source, self-hosted AI assistant that handles Telegram, WhatsApp, Discord, browser automation, and local AI inference. Now you want to set it up.
Good news: the OpenClaw setup process is straightforward. I've done it on multiple devices and can walk you through it in about 10 minutes (less if you're on pre-configured hardware).
Let's go from zero to a working AI assistant.
Prerequisites
Before we start, you need:
- Hardware — any always-on Linux machine (more on this below)
- Node.js 20+ — OpenClaw's runtime
- At least one messaging account — Telegram bot token, WhatsApp, or Discord bot
- An AI API key — OpenAI, Anthropic, or a local model endpoint
- 10 minutes of your time
Step 0: Choose Your Hardware
If you haven't picked hardware yet, here's the quick version:
| Budget | Device | Best For |
|---|---|---|
| ~€95 | Raspberry Pi 5 | Experimenting, cloud-only AI |
| ~€200 | Intel N100 Mini PC | Standard Linux, no local AI |
| €399 | ClawBox (Jetson Orin Nano) | Local AI inference, plug-and-play |
| €650+ | Mac Mini M4 | Maximum local model performance |
The ClawBox comes with OpenClaw pre-installed — if you're using one, skip to Step 5. For everyone else, let's start from scratch.
For a detailed hardware comparison, see the best hardware for OpenClaw guide. If you're considering the Mac Mini but want something more affordable and purpose-built, the Mac Mini alternative page breaks down the trade-offs.
Step 1: Prepare Your System
Start with a fresh Linux install. Ubuntu 22.04/24.04 or Debian 12 are recommended. On a Jetson, use NVIDIA's JetPack OS.
# Update your system
sudo apt update && sudo apt upgrade -y
# Install essential dependencies
sudo apt install -y curl git build-essential
Install Node.js 20+ (using nvm is cleanest):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install 20
nvm use 20
Verify:
node --version # Should show v20.x.x or higher
npm --version # Should show 10.x.x or higher
Step 2: Install OpenClaw
Clone the repository and install dependencies:
# Clone OpenClaw
git clone https://github.com/OpenClaw/openclaw.git
cd openclaw
# Install dependencies
npm install
# Copy the example config
cp .env.example .env
The .env file is where all your configuration lives. Open it in your editor:
nano .env
Step 3: Configure Your AI Provider
OpenClaw supports multiple AI backends. Set at least one:
Option A: Anthropic (Claude)
ANTHROPIC_API_KEY=sk-ant-your-key-here
DEFAULT_MODEL=anthropic/claude-sonnet-4-20250514
Option B: OpenAI
OPENAI_API_KEY=sk-your-key-here
DEFAULT_MODEL=openai/gpt-4o
Option C: Local Model (Ollama)
OLLAMA_BASE_URL=http://localhost:11434
DEFAULT_MODEL=ollama/llama3
If you're on a Jetson (or the ClawBox), local models with GPU acceleration work great. On a Pi or low-end mini PC, stick with cloud APIs.
Step 4: Connect a Messaging Channel
You need at least one channel. Telegram is the easiest to start with.
Telegram Setup (Recommended First Channel)
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the bot token
Add to your .env:
TELEGRAM_BOT_TOKEN=your-bot-token-here
TELEGRAM_ALLOWED_USERS=your-telegram-user-id
To find your Telegram user ID, message @userinfobot.
WhatsApp Setup
WhatsApp requires the WhatsApp Business API or a bridge like Baileys:
WHATSAPP_ENABLED=true
Follow the on-screen QR code pairing process when OpenClaw starts.
Discord Setup
Create a bot at the Discord Developer Portal:
DISCORD_BOT_TOKEN=your-discord-token-here
Step 5: Start OpenClaw
# Start OpenClaw
npm start
You should see output like:
✓ OpenClaw v1.x.x starting...
✓ AI provider connected: anthropic/claude-sonnet-4-20250514
✓ Telegram bot connected: @YourBotName
✓ Gateway listening on port 3000
✓ Ready.
That's it. Message your Telegram bot and you should get a response.
Step 6: Set Up Auto-Start (Keep It Running)
You want OpenClaw to survive reboots and crashes. Create a systemd service:
sudo nano /etc/systemd/system/openclaw.service
Paste:
[Unit]
Description=OpenClaw AI Assistant
After=network.target
[Service]
Type=simple
User=your-username
WorkingDirectory=/home/your-username/openclaw
ExecStart=/home/your-username/.nvm/versions/node/v20.*/bin/node src/index.js
Restart=always
RestartSec=10
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
Check status:
sudo systemctl status openclaw
Your AI assistant is now running as a system service. It'll auto-start on boot and restart if it crashes.
Step 7: Optional Enhancements
Once the basics work, consider these additions:
Browser Automation
Install Chromium for web browsing and automation:
sudo apt install -y chromium-browser
Add to .env:
BROWSER_ENABLED=true
OpenClaw can now browse the web, fill forms, take screenshots, and automate web tasks on your behalf.
Local Database (Persistent Memory)
By default, OpenClaw uses file-based storage. For better performance with conversation history:
sudo apt install -y postgresql
sudo -u postgres createuser openclaw
sudo -u postgres createdb openclaw -O openclaw
DATABASE_URL=postgresql://openclaw@localhost/openclaw
Multiple AI Models
You can configure different models for different tasks:
DEFAULT_MODEL=anthropic/claude-sonnet-4-20250514
THINKING_MODEL=anthropic/claude-opus-4-6
FAST_MODEL=anthropic/claude-haiku-3
Troubleshooting Common Issues
"Cannot connect to Telegram"
→ Check your bot token. Make sure the bot isn't already running elsewhere.
"AI provider error"
→ Verify your API key. Check that you have credits/quota on the provider.
"Out of memory"
→ If on 8GB RAM, reduce the number of concurrent services. Disable browser automation if not needed.
"Permission denied"
→ Make sure your user owns the openclaw directory: sudo chown -R $USER:$USER ~/openclaw
Node.js version mismatch
→ Run nvm use 20 or install the correct version.
What's Next?
Once your OpenClaw setup is running:
-
Explore the workspace — OpenClaw has a file-based memory system. Check the
workspace/folder. - Add more channels — Connect WhatsApp, Discord, or email.
-
Customize your assistant — Edit
SOUL.mdto define your AI's personality and behavior. - Set up cron jobs — Automate recurring tasks like email checks or calendar reminders.
- Browse the community — Join the OpenClaw Discord/GitHub discussions for tips and integrations.
For more detailed configuration options and advanced features, visit the complete OpenClaw setup documentation.
The 10-Minute Promise
If you're on a ClawBox or similar pre-configured device, you literally just plug it in, connect to Wi-Fi, add your API key and bot token, and you're done. Under 10 minutes.
On a fresh Linux install, add maybe 15-20 minutes for system prep and Node.js installation. Still faster than setting up most self-hosted applications.
The barrier to running your own AI assistant has never been lower. No cloud dependency, no monthly subscription beyond your AI API costs, full control over your data.
Welcome to self-hosted AI. It's better over here.
Need help choosing hardware? Check the setup guide for hardware-specific instructions, or explore the Mac Mini alternative if you're comparing options.
Top comments (0)