Deploy a self-hosted AI assistant on Ubuntu in under 10 minutes. OpenClaw connects to WhatsApp, Telegram, Discord, and other messaging platforms with persistent memory and full system access.


Note: This article was written and tested using OpenClaw itself, deployed on BinaryLane infrastructure using the BinaryLane CLI. All commands and steps have been verified for accuracy as of February 2026.



TABLE OF CONTENTS



What is OpenClaw?


OpenClaw is an open-source, self-hosted AI assistant that runs on your own server. Unlike cloud-based chatbots, OpenClaw provides:


  • Persistent memory — conversations continue across sessions
  • Full system access — execute commands, manage files, automate tasks
  • Multi-platform support — WhatsApp, Telegram, Discord, Slack, and more
  • Extensible skills — add custom capabilities and integrations
  • Privacy — your data stays on your server


ℹ️ Name History: OpenClaw was previously known as "Moltbot" and "Clawdbot". The functionality remains identical — only the branding has changed.



Security Considerations


⚠️ Important: OpenClaw has full system access and connects to your messaging accounts. Treat this server as a high-value target.


Recommended security measures:

  • SSH: Use key-based authentication only (Ed25519 or RSA 4096-bit), disable root login
  • External Firewall: If you're connecting from a static IP address, use the External Firewall to whitelist only your IP address for SSH (port 22). This ensures only connections from your known location can access the server
  • Secrets: Store API keys in a password vault, never in version control
  • Network: Consider deploying inside a VPC, or use a VPN/WireGuard for additional access control
  • Updates: Keep the system patched and consider unattended-upgrades + fail2ban


Tip: If you've locked down SSH to your home IP and need to access your bot while away, simply message it via a connected service (e.g. WhatsApp). Your phone number is allowlisted by default during setup, so you can manage your OpenClaw instance from anywhere you have internet access — no SSH required.


For general guidance on improving the security posture for your servers on BinaryLane, see Securing Your Servers.



Prerequisites


RequirementDetails
BinaryLane AccountSign up at home.binarylane.com.au
VPS SpecificationsMinimum: 1 vCPU, 2GB RAM (std-1vcpu) — Recommended: 2 vCPU, 4GB RAM (std-2vcpu)
Operating SystemUbuntu 24.04 LTS (recommended)
AI Provider API KeyAnthropic, OpenAI, or Google



Deployment Methods


Method 1: BinaryLane CLI (Recommended)


The fastest way to deploy OpenClaw — using the BinaryLane CLI with cloud-init to automatically install OpenClaw on first boot.


Step 1: Install the BinaryLane CLI

pip install binarylane-cli


Step 2: Configure Authentication

Create an API token from the BinaryLane Dashboard → Developer API → Create Token, then:

bl configure

Verify with bl account get


Step 3: Get Your SSH Key ID

bl ssh-key list

If you don't have one registered:

bl ssh-key create --name "My Key" --public-key "ssh-rsa AAAA..."


Step 4: Create the Cloud-Init Script

Save this as openclaw-init.yaml:

#cloud-config
package_update: true
package_upgrade: true

runcmd:
  # Disable interactive prompts
  - export DEBIAN_FRONTEND=noninteractive
  
  # Install Node.js 22 from NodeSource
  - curl -fsSL https://deb.nodesource.com/setup_22.x -o /tmp/nodesource_setup.sh
  - bash /tmp/nodesource_setup.sh
  - apt-get install -y nodejs
  
  # Install OpenClaw
  - npm install -g openclaw@latest

This installs Node.js 22 and OpenClaw automatically on first boot (~5 minutes).


Step 5: Deploy the Server

bl server create \
  --name openclaw \
  --region syd \
  --image ubuntu-24.04 \
  --size std-1vcpu \
  --ssh-keys YOUR_SSH_KEY_ID \
  --user-data "$(cat openclaw-init.yaml)"


Step 6: Get Your Server IP

bl server list

Wait for status to show active. Cloud-init will run automatically on first boot (takes 2-3 minutes).


Step 7: Run the Onboarding Wizard

SSH in and launch the interactive setup wizard:

ssh root@YOUR_SERVER_IP
openclaw onboard --install-daemon

The onboarding TUI will guide you through:

  • Configuring your AI provider (API key)
  • Setting up messaging channels (WhatsApp, Telegram, Discord, etc.)
  • Installing the background service (daemon)


Tip: If cloud-init is still running, check progress with: tail -f /var/log/cloud-init-output.log


Available Regions

SlugLocation
sydSydney
melMelbourne
bneBrisbane
perPerth
adlAdelaide
sinSingapore


Available Sizes
= Recommended

SlugvCPUsMemoryDiskPrice/Month*
std-min11 GB20 GB$3.75
std-1vcpu12 GB40 GB$7.50
std-2vcpu24 GB60 GB$15.00
std-4vcpu48 GB100 GB$30.00

*Prices displayed are subject to change at any time


If you find the performance insufficient for your use case, you can upgrade your server via the Change Plan page in the BinaryLane Dashboard at any time, subject to resource availability.



Method 2: BinaryLane API


Deploy directly via the REST API with the same cloud-init script for automatic installation.


Get Your SSH Key ID

curl -s --request GET \
  'https://api.binarylane.com.au/v2/account/keys' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'


Create Server with Cloud-Init

curl --request POST \
  'https://api.binarylane.com.au/v2/servers' \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "openclaw",
    "region": "syd",
    "image": "ubuntu-24.04",
    "size": "std-1vcpu",
    "ssh_keys": [YOUR_SSH_KEY_ID],
    "user_data": "#cloud-config\npackage_update: true\npackage_upgrade: true\n\nruncmd:\n  - export DEBIAN_FRONTEND=noninteractive\n  - curl -fsSL https://deb.nodesource.com/setup_22.x -o /tmp/nodesource_setup.sh\n  - bash /tmp/nodesource_setup.sh\n  - apt-get install -y nodejs\n  - npm install -g openclaw@latest"
  }'

Once the server is active, SSH in and run openclaw onboard --install-daemon to complete setup.


Get Server IP

curl -s --request GET \
  'https://api.binarylane.com.au/v2/servers' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'


Full API Reference: api.binarylane.com.au/reference



Method 3: Manual Installation


For users who prefer step-by-step control or are installing on an existing server.


  1. Create a VPS via the BinaryLane Dashboard with Ubuntu 24.04 LTS.


  2. SSH into your server:

    ssh root@YOUR_SERVER_IP

  3. Update system packages:

    apt update && apt upgrade -y

  4. Install Node.js 22+:

    curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
    apt install -y nodejs

  5. Install OpenClaw:

    npm install -g openclaw@latest

  6. Run the onboarding wizard:

    openclaw onboard --install-daemon

Alternatively, use the one-liner installer:

curl -fsSL https://openclaw.ai/install.sh | bash




Configuration


AI Provider Setup


The onboarding wizard will prompt for your AI provider. Supported providers:


ProviderRecommended ModelGet API Key
Anthropic (Recommended)claude-sonnet-4-5console.anthropic.com
OpenAIgpt-4oplatform.openai.com
Googlegemini-2.0-flashaistudio.google.com


To manually set your API key:

export ANTHROPIC_API_KEY="your-api-key-here"

Add to ~/.bashrc for persistence.


Connecting Messaging Platforms


WhatsApp:

openclaw channels login

Scan the QR code with WhatsApp → Settings → Linked Devices.


Telegram: Create a bot via @BotFather and enter the token during onboarding.


Discord: Create an application at the Discord Developer Portal and enter the bot token.




Managing Your Installation


Check Status:

openclaw status
openclaw doctor


Service Commands:

# Check service status
systemctl status openclaw-gateway

# View live logs
journalctl -u openclaw-gateway -f

# Restart the gateway
systemctl restart openclaw-gateway

# Stop the gateway
systemctl stop openclaw-gateway


Update OpenClaw:

npm update -g openclaw@latest
systemctl restart openclaw-gateway


Test the Agent:

openclaw agent --message "Hello, are you working?"




Securing Remote Access


The OpenClaw Control UI runs on port 18789 at http://127.0.0.1:18789/.


⚠️ Important: Do not expose port 18789 directly to the internet. Set up a reverse proxy with authentication for remote access.


Example using Caddy:

# Install Caddy
apt install -y caddy

# Generate password hash
caddy hash-password

# Edit /etc/caddy/Caddyfile
your-domain.com {
    basicauth * {
        username YOUR_HASHED_PASSWORD
    }
    reverse_proxy localhost:18789
}

# Restart Caddy
systemctl restart caddy




Troubleshooting


IssueSolution
Gateway won't startCheck Node.js version: node --version (must be 22+)
AI not respondingVerify API key is set. Run openclaw doctor
WhatsApp disconnectsRe-link: openclaw channels login
openclaw not foundexport PATH="$(npm prefix -g)/bin:$PATH"
Cloud-init failedCheck logs: cat /var/log/cloud-init-output.log


View detailed logs:

journalctl -u openclaw-gateway -n 100 --no-pager




Additional Resources




If you require assistance, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane