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.
| Item | Details | Where | Status |
|---|---|---|---|
| VPS | Ubuntu 24.04, min 2GB RAM | Hetzner CX22 — €3.79/mo | Required |
| Domain | Any subdomain pointing to VPS | Namecheap / Porkbun | Required |
| Anthropic API Key | Powers Claude AI brain | console.anthropic.com | Required |
| Telegram Bot Token | From @BotFather | t.me/BotFather | Required |
| postmypost.io Account | For social media posting API | postmypost.io | For Automation |
| Node.js 20+ | Runtime for OpenClaw | Auto-installed in Step 6 | Auto |
Check Node.js version
node --version # needs v20+ npm --version
nvm install 20 && nvm use 20
Clone & install
git clone https://github.com/openclaw/openclaw.git ~/openclaw cd ~/openclaw npm install
found 0 vulnerabilities
node openclaw.mjs configure"bind": "0.0.0.0" which crashes the gateway. Open ~/.openclaw/openclaw.json and delete the "bind" line from the gateway section.nano ~/.openclaw/openclaw.json # Delete this line from "gateway" section: "bind": "0.0.0.0", ← DELETE # Ctrl+X → Y → Enter to save
node openclaw.mjs gateway startTelegram channel: connected
| Provider | Plan | Specs | Price |
|---|---|---|---|
| Hetzner | CX22 | 2 vCPU, 4GB RAM | €3.79/mo Best |
| DigitalOcean | Basic | 1 vCPU, 2GB RAM | $12/mo |
| Vultr | Cloud | 1 vCPU, 2GB RAM | $12/mo |
ssh root@YOUR_VPS_IP adduser openclaw usermod -aG sudo openclaw rsync --archive --chown=openclaw:openclaw ~/.ssh /home/openclaw
# 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
node openclaw.mjs configure node openclaw.mjs doctor --fix nano ~/.openclaw/openclaw.json # remove "bind" line!
Add an A record at your domain registrar:
| Type | Host | Value | TTL |
|---|---|---|---|
| A | openclaw | Your VPS IP | 300 |
dig openclaw.yourdomain.xyz +short # Should return your VPS IP
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
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} } }
sudo systemctl enable caddy && sudo systemctl start caddysudo systemctl start caddy
systemctl --user enable openclaw-gateway.service systemctl --user start openclaw-gateway.service systemctl --user status openclaw-gateway.service
Most likely: "gateway.bind" still in config → remove it
cat ~/.openclaw/openclaw.json | grep -A2 '"auth"'https://openclaw.yourdomain.xyz/overviewwss://openclaw.yourdomain.xyzGateway Token: paste from step 1 → click Connect
node openclaw.mjs devices listnode openclaw.mjs devices approve <ID>node openclaw.mjs configure # add Telegram bot token systemctl --user restart openclaw-gateway.service
loginctl enable-linger openclaw # Now OpenClaw starts automatically on every reboot
Step 1 — Get your postmypost.io credentials
curl -L 'https://api.postmypost.io/v4.1/projects' -H 'Authorization: Bearer YOUR_TOKEN'Note the
id value from response.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
mkdir -p ~/openclaw/scripts nano ~/openclaw/scripts/post-linkedin.sh
Paste this (replace the token and IDs with yours):
#!/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\" }] }"
chmod +x ~/openclaw/scripts/post-linkedin.sh # Test it bash ~/openclaw/scripts/post-linkedin.sh "Your first automated post #buildinpublic"
4 = Draft · 5 = Pending/Scheduled · 1 = Published · 3 = ErrorStep 3 — Set up BOOT.md so Telegram triggers posts
mkdir -p ~/openclaw/workspace nano ~/openclaw/workspace/BOOT.md
Paste this inside:
# 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.
systemctl --user restart openclaw-gateway.servicenpx clawhub inspect <name> before installing.npx clawhub inspect <name> first and review the code. When in doubt, skip and use built-in browser automation instead.node openclaw.mjs browser --help
node openclaw.mjs skills list
npx clawhub inspect notion
npx clawhub inspect gog
npx clawhub inspect blogwatcher
npx clawhub inspect nano-pdf
npx clawhub inspect himalaya
npx clawhub inspect trello
How to safely install a skill
# 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
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.
# 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
502 Bad Gateway
gateway.bind: Invalid input
Delete: "bind": "0.0.0.0",
systemctl --user restart openclaw-gateway.service
Disconnected: 1008 pairing required
2. node openclaw.mjs devices list
node openclaw.mjs devices approve <ID>
postmypost.io 422 Errors
Allowed values for creation: 4=draft, 5=pending, 10=template, 11=workflow, 12=approval
Diagnostic commands
# 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.