OpenClaw gateway running on a Linode server with Telegram as a chat channel.
- Host: Linode VPS
- Networking: Tailscale for secure access
- Chat channel: Telegram bot (built-in OpenClaw channel)
- Gateway port: 18789
Provision a fully configured instance from your local machine:
- Install the Linode CLI:
pip3 install linode-cli - Copy
.env.exampleto.envand fill in your values - Run
scripts/provision.sh— creates a Linode, installs everything, starts OpenClaw - Message your Telegram bot to start chatting
- To tear down:
scripts/teardown.sh <label>
Set up on an existing server via SSH:
- Copy
.env.exampleto.envand fill in your values - Run
scripts/setup.shon a fresh Linode instance - Run
scripts/deploy.shto sync config and restart the gateway
provision.sh uploads stackscript.sh to Linode as a StackScript, then creates an instance that runs it on first boot. Secrets (API keys, bot token) are passed as StackScript parameters — they never touch git. The StackScript installs Node.js, OpenClaw, and Tailscale, writes the full config with tokens, and starts the gateway. No interactive steps.
config/
openclaw.json — OpenClaw config reference (channels, agents, gateway)
scripts/
provision.sh — LOCAL: create a new Linode with OpenClaw configured
teardown.sh — LOCAL: destroy a Linode instance
stackscript.sh — Linode StackScript (runs on first boot, non-interactive)
setup.sh — Manual server bootstrap (interactive)
deploy.sh — Sync config to a running server
sync-runbook.sh — Fetch latest runbook guidance and diff against local
The main config file is config/openclaw.json (JSON5 format). For manual deployments, deploy.sh copies it to ~/.openclaw/openclaw.json on the server. For automated provisioning, the StackScript writes the config directly with secrets included.
See the configuration reference for all available options.
- Message @BotFather on Telegram and run
/newbot - Save the bot token to
TELEGRAM_BOT_TOKENin.env - After provisioning, the bot is ready — message it to start a pairing request
- To use in groups: disable privacy mode via
/setprivacyin BotFather, or make the bot a group admin
This config follows patterns from the OpenClaw Runbook (Non-Hype Edition). Sections used:
| Config area | Runbook source |
|---|---|
| Model routing (cheap defaults, scoped fallbacks) | config-example-guide.md § Model Configuration |
| Memory search (cheap embeddings) | config-example-guide.md § Memory Search |
| Context pruning (cache-ttl) | config-example-guide.md § Context Pruning |
| Compaction / memory flush | config-example-guide.md § Compaction |
| Heartbeat model | config-example-guide.md § Heartbeat Model |
| Concurrency limits | config-example-guide.md § Concurrency Limits |
| Gateway auth + binding | config-example-guide.md § Security: Gateway Binding |
| Log redaction | config-example-guide.md § Logging |
| Tool policies (default-deny) | security-hardening.md |
| File permissions | security-hardening.md |
| Agent roles (main/monitor/researcher) | agent-prompts.md |
| Full sanitized reference config | sanitized-config.json |
Run scripts/sync-runbook.sh to check for upstream changes to these files.