Complete · Production Ready · 2026

The Complete
OpenClaw Guide

From zero to a fully automated Telegram bot that posts to LinkedIn, fills forms, and runs 24/7 on your own VPS. Local setup + VPS deployment + real automation.

Local Setup
VPS Deployment
Telegram Bot
LinkedIn Auto-Post
Error → Fix Patterns
postmypost.io API
13Steps
~45mSetup Time
24/7Always On
Automations
~
What is OpenClaw?
A self-hosted AI gateway that turns Telegram into your personal automation control center.

OpenClaw lets you run an AI agent on your own server. You talk to it via Telegram, it connects to Claude AI, and can automate anything — posting to LinkedIn, filling forms, scheduling content, web browsing, and more. You own everything. No subscriptions, no limits.

Telegram
Your phone
Your Domain
openclaw.you.xyz
Caddy
HTTPS proxy
OpenClaw
:18789
Claude AI
Your API key
LinkedIn
via postmypost
~
Requirements
ItemDetailsWhereStatus
VPSUbuntu 24.04, min 2GB RAMHetzner CX22 — €3.79/moRequired
DomainAny subdomain pointing to VPSNamecheap / PorkbunRequired
Anthropic API KeyPowers Claude AI brainconsole.anthropic.comRequired
Telegram Bot TokenFrom @BotFathert.me/BotFatherRequired
postmypost.io AccountFor social media posting APIpostmypost.ioFor Automation
Node.js 20+Runtime for OpenClawAuto-installed in Step 6Auto
Local Setup — Test Before Deploying
1
Clone & Install
Get OpenClaw running on your local machine first before touching the VPS.

Check Node.js version

local terminal
node --version   # needs v20+
npm --version
Node not found or < v20
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20 && nvm use 20

Clone & install

terminal
git clone https://github.com/openclaw/openclaw.git ~/openclaw
cd ~/openclaw
npm install
Success
added 847 packages in 23s
found 0 vulnerabilities

2
Configure
Run the wizard to set API keys, Telegram token, and port.
~/openclaw
node openclaw.mjs configure
Remove the "bind" field after wizard
The wizard writes "bind": "0.0.0.0" which crashes the gateway. Open ~/.openclaw/openclaw.json and delete the "bind" line from the gateway section.
fix config
nano ~/.openclaw/openclaw.json
# Delete this line from "gateway" section:
"bind": "0.0.0.0",   ← DELETE
# Ctrl+X → Y → Enter to save

3
Run Locally
Start the gateway and test Telegram replies before deploying.
~/openclaw
node openclaw.mjs gateway start
Running
OpenClaw Gateway running on ws://127.0.0.1:18789
Telegram channel: connected
"Invalid config: gateway.bind"
Remove the "bind" line from ~/.openclaw/openclaw.json (see Step 2)
VPS Deployment — 24/7 Production
4
Get a VPS
ProviderPlanSpecsPrice
HetznerCX222 vCPU, 4GB RAM€3.79/mo Best
DigitalOceanBasic1 vCPU, 2GB RAM$12/mo
VultrCloud1 vCPU, 2GB RAM$12/mo
Always choose Ubuntu 24.04 LTS
Note your public IP after creation — you'll use it for DNS.

5
SSH & Create User
local terminal
ssh root@YOUR_VPS_IP
adduser openclaw
usermod -aG sudo openclaw
rsync --archive --chown=openclaw:openclaw ~/.ssh /home/openclaw
Then SSH as the new user
ssh openclaw@YOUR_VPS_IP

6
Install on VPS
VPS terminal
# Update & install Node.js 20
sudo apt update && sudo apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install -y nodejs git

# Clone OpenClaw
git clone https://github.com/openclaw/openclaw.git ~/openclaw
cd ~/openclaw && npm install

7
Configure on VPS
VPS terminal
node openclaw.mjs configure
node openclaw.mjs doctor --fix
nano ~/.openclaw/openclaw.json  # remove "bind" line!
Domain & Reverse Proxy
8
DNS Setup

Add an A record at your domain registrar:

TypeHostValueTTL
AopenclawYour VPS IP300
verify DNS
dig openclaw.yourdomain.xyz +short
# Should return your VPS IP

9
Install Caddy
Auto HTTPS — no certbot needed.
VPS terminal
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
  | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
  | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install -y caddy

Caddyfile config

/etc/caddy/Caddyfile
openclaw.yourdomain.xyz {
    reverse_proxy localhost:18789 {
        header_up Host {host}
        header_up X-Real-IP {remote}
        header_up Upgrade {http.request.header.Upgrade}
        header_up Connection {http.request.header.Connection}
    }
}
start caddy
sudo systemctl enable caddy && sudo systemctl start caddy
"Address already in use :80 or :443"
sudo systemctl stop nginx && sudo systemctl disable nginx
sudo systemctl start caddy
Go Live
10
Start Gateway
VPS terminal
systemctl --user enable openclaw-gateway.service
systemctl --user start openclaw-gateway.service
systemctl --user status openclaw-gateway.service
Active
Active: active (running) since ...
exit-code / crash
journalctl --user -u openclaw-gateway.service -n 30 --no-pager
Most likely: "gateway.bind" still in config → remove it

11
Pair Dashboard
1
Get your gateway token
cat ~/.openclaw/openclaw.json | grep -A2 '"auth"'
2
Open dashboard
Visit https://openclaw.yourdomain.xyz/overview
3
Set WebSocket URL + Token
WebSocket URL: wss://openclaw.yourdomain.xyz
Gateway Token: paste from step 1 → click Connect
4
Approve pairing on VPS
node openclaw.mjs devices list
node openclaw.mjs devices approve <ID>
Dashboard shows Health Online

12
Connect Telegram
VPS terminal
node openclaw.mjs configure   # add Telegram bot token
systemctl --user restart openclaw-gateway.service
Test it
Send a message to your Telegram bot. If it replies — you're live!

13
Survive Reboots
VPS terminal
loginctl enable-linger openclaw
# Now OpenClaw starts automatically on every reboot
Automation — LinkedIn + Social Posting
LinkedIn Auto-Posting
Post to LinkedIn from Telegram using postmypost.io API. Tested and working.

Step 1 — Get your postmypost.io credentials

1
Sign up at postmypost.io
Create account → connect your LinkedIn account
2
Get your API token
Settings → API → Generate Access Token. Save it securely — you only see it once!
3
Get your Project ID
curl -L 'https://api.postmypost.io/v4.1/projects' -H 'Authorization: Bearer YOUR_TOKEN'
Note the id value from response.
4
Get your LinkedIn Account ID
curl -L 'https://api.postmypost.io/v4.1/accounts?project_id=YOUR_PROJECT_ID' -H 'Authorization: Bearer YOUR_TOKEN'
Note the id value — this is your LinkedIn account ID.

Step 2 — Create the posting script on VPS

VPS terminal
mkdir -p ~/openclaw/scripts
nano ~/openclaw/scripts/post-linkedin.sh

Paste this (replace the token and IDs with yours):

post-linkedin.sh
#!/bin/bash
TOKEN="YOUR_POSTMYPOST_TOKEN"
ACCOUNT_ID=2086922       # your LinkedIn account ID
PROJECT_ID=331570        # your project ID
POST_AT=$(date -u -d '+5 minutes' '+%Y-%m-%dT%H:%M:%S+00:00')
TEXT="$1"

curl -s -X POST 'https://api.postmypost.io/v4.1/publications' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d "{
  \"project_id\": $PROJECT_ID,
  \"account_ids\": [$ACCOUNT_ID],
  \"publication_status\": 5,
  \"post_at\": \"$POST_AT\",
  \"details\": [{
    \"publication_type\": 1,
    \"content\": \"$TEXT\"
  }]
}"
make executable & test
chmod +x ~/openclaw/scripts/post-linkedin.sh

# Test it
bash ~/openclaw/scripts/post-linkedin.sh "Your first automated post #buildinpublic"
Success response
{"id":28477006,"publication_status":5,"post_at":"...","details":[...]}
publication_status values
4 = Draft · 5 = Pending/Scheduled · 1 = Published · 3 = Error

Step 3 — Set up BOOT.md so Telegram triggers posts

VPS terminal
mkdir -p ~/openclaw/workspace
nano ~/openclaw/workspace/BOOT.md

Paste this inside:

BOOT.md
# LinkedIn Automation Instructions

When the user says anything like:
- "post this on LinkedIn"
- "share on LinkedIn"  
- "post to LinkedIn: [content]"

Do exactly this:
1. Extract the post content from their message
2. Run: bash ~/openclaw/scripts/post-linkedin.sh "[extracted content]"
3. Reply: "Posted to LinkedIn! Will go live in ~5 minutes."

If the user says "run this command: bash ~/openclaw/scripts/post-linkedin.sh [text]"
Just run that exact command directly.
restart gateway
systemctl --user restart openclaw-gateway.service
Now test on Telegram!
Message your bot: "Post this on LinkedIn: Just automated my social media with AI #buildinpublic"
Skills to Install for Full Automation
Skills to Install
These skills are available via clawhub. Check them with npx clawhub inspect <name> before installing.
VirusTotal Warning on clawhub skills
Many clawhub skills get flagged by VirusTotal. Always run npx clawhub inspect <name> first and review the code. When in doubt, skip and use built-in browser automation instead.
Built-in
browser
Full browser automation — navigate, fill forms, click, screenshot, take PDFs. Already installed and ready. Use for press release form filling.
node openclaw.mjs browser --help
Built-in
weather
Get weather and forecasts without any API key. Ready to use out of the box.
node openclaw.mjs skills list
Install
notion
Read client SOPs from Notion. Create, search and manage Notion pages — great for reading Will's SOP document automatically.
npx clawhub inspect notion
Install
gog
Google Workspace CLI — Gmail, Calendar, Drive, Docs, Sheets. Read client SOPs from Google Docs automatically.
npx clawhub inspect gog
Install
blogwatcher
Monitor RSS/Atom feeds for updates. Auto-generate social posts from new blog content or news.
npx clawhub inspect blogwatcher
Install
nano-pdf
Edit and read PDFs with natural language. Useful when client SOPs are in PDF format.
npx clawhub inspect nano-pdf
Optional
himalaya
Manage emails via IMAP/SMTP. Read, write, reply emails directly from OpenClaw. Great for email automation.
npx clawhub inspect himalaya
Optional
trello
Manage Trello boards, lists, and cards. Good for project management automation for clients.
npx clawhub inspect trello

How to safely install a skill

VPS terminal
# 1. Inspect first — check description and author
npx clawhub inspect notion

# 2. If looks clean — install
npx clawhub install notion

# 3. If VirusTotal warning appears → Cancel (select No)
# 4. Verify installed skills
node openclaw.mjs skills list
BOOT.md — The Brain
BOOT.md is loaded on every gateway startup. It tells OpenClaw how to behave and what commands to run.

Located at ~/openclaw/workspace/BOOT.md — this is where you write instructions for your AI agent. The more specific you are, the better it works.

BOOT.md — full example
# My OpenClaw Agent Instructions

## LinkedIn Posting
When user says "post to LinkedIn: [text]" or "share on LinkedIn":
- Run: bash ~/openclaw/scripts/post-linkedin.sh "[text]"
- Confirm: "Scheduled on LinkedIn!"

## Form Filling  
When user says "fill the press release form":
- Run: node openclaw.mjs browser navigate [FORM_URL]
- Use browser fill to fill required fields
- Submit and screenshot for confirmation

## Daily Summary
When user says "generate my daily LinkedIn post":
- Create a professional post about AI automation / building in public
- Max 200 words, 3-5 hashtags
- Then run the LinkedIn posting script

## General Rules
- Always confirm actions with a brief message
- If a command fails, show the error to the user
- Keep responses short and clear
Pro tip
The more detailed your BOOT.md, the smarter OpenClaw behaves. Update it anytime — just restart the gateway for changes to take effect.
All Possibilities
What You Can Automate
Everything you can do now that OpenClaw is live on your VPS.
LinkedIn Auto-Posting
Message bot → posts to LinkedIn via postmypost.io. Works with Twitter, Instagram, Facebook too.
Press Release Form Filling
Browser automation fills any web form daily. Navigate → fill → submit → screenshot confirmation.
Scheduled Daily Posts
Cron job runs at 9am, Claude generates a post from your SOP, posts automatically. Zero manual work.
Web Search & Research
Ask bot to search the web and summarize results directly in Telegram. Built-in, no setup needed.
Read Client SOP Docs
Install gog or notion skill → bot reads SOP from Google Docs/Notion and acts on it automatically.
Webhook Notifications
Receive smart alerts from GitHub, Stripe, forms, server events — delivered to Telegram instantly.
Multi-Client Setup
Run multiple automations for different clients on same VPS. Each client = their own script + BOOT.md section.
AI Content Generation
Tell bot a topic → Claude writes LinkedIn post, tweet thread, or press release — ready to publish.
Troubleshooting
?
Common Errors & Fixes

502 Bad Gateway

Error
Browser shows 502 when visiting your domain
Fix
systemctl --user start openclaw-gateway.service

gateway.bind: Invalid input

Error
journalctl shows: "Invalid config: gateway.bind: Invalid input"
Fix
nano ~/.openclaw/openclaw.json
Delete: "bind": "0.0.0.0",
systemctl --user restart openclaw-gateway.service

Disconnected: 1008 pairing required

Error
Dashboard shows "disconnected (1008): pairing required"
Fix
1. Check Caddyfile has WebSocket headers (Upgrade + Connection)
2. node openclaw.mjs devices list
node openclaw.mjs devices approve <ID>

postmypost.io 422 Errors

Error
Validation error in field 'publication_status'
Fix
Use publication_status: 5 (pending) not 1 or 3
Allowed values for creation: 4=draft, 5=pending, 10=template, 11=workflow, 12=approval

Diagnostic commands

quick debug
# Gateway status & logs
systemctl --user status openclaw-gateway.service
journalctl --user -u openclaw-gateway.service -n 50 --no-pager

# Caddy status & logs
sudo systemctl status caddy
sudo journalctl -u caddy -n 30 --no-pager

# Port conflicts
sudo lsof -i :80
sudo lsof -i :443

# OpenClaw health check
node openclaw.mjs health
node openclaw.mjs doctor

You're Fully Live!

Gateway running 24/7 · Telegram connected · LinkedIn posting working
Close your terminal — your VPS handles everything from here.