Fresh VPS
Use Ubuntu 24.04 on a new VPS with no unrelated data. The installer intentionally stops on other operating systems.
Ubuntu VPS setup
Set up a private sandbox in 15 minutes
When you are done, OpenClaw runs under a dedicated Linux user, the gateway stays on loopback, and the dashboard opens privately through Tailscale Serve.
Pinned install command
Review script firstcurl -fsSL https://raw.githubusercontent.com/LineZero-Studio/openclaw-diy/v0.1.2/install.sh | bash
This command is pinned to
v0.1.2. For a
first install, use this release instead of instructions
from main.
Before you start
Use Ubuntu 24.04 on a new VPS with no unrelated data. The installer intentionally stops on other operating systems.
You will complete browser login during live validation. The guide does not ask for a Tailscale auth key.
MiniMax is the recommended API-key path. Gemini API is the free-tier fallback. Skip-model mode is for testing only.
VPS checklist
Cost checkpoints
Cloud providers usually start charging while the VPS exists, even when OpenClaw is idle. Check the current plan page before you create it.
Provider backups, snapshots, reserved IPs, and extra storage can add charges. Leave paid extras off unless you intentionally choose them.
MiniMax or Gemini usage depends on the provider account, limits, and terms. Do not assume a free tier will stay unchanged.
Model setup
The installer prompts for a provider. Press Enter
for MiniMax, or choose Gemini API as the fallback.
Keys are stored in
/home/openclaw/.openclaw/.env with mode
0600.
Gemini API free tiers have rate limits, terms may change, and you should review Google AI Studio data and privacy terms before relying on it.
No-model smoke mode
curl -fsSL https://raw.githubusercontent.com/LineZero-Studio/openclaw-diy/v0.1.2/install.sh | bash -s -- --skip-model
This mode runs onboarding with
--auth-choice skip and prints
Model check: skipped - no API key
provided.
Private dashboard
OpenClaw stays private. The gateway listens on
loopback, meaning port 18789 is
reachable only from the VPS itself. Tailscale
Serve gives devices in your tailnet a private
HTTPS URL after browser login.
After install, from your computer, SSH into the VPS
once. Then run OpenClaw operational commands from
that VPS shell as the dedicated
openclaw user while loading the
installer-managed .env. Running
openclaw directly as
root can use the wrong config and fail
with gateway token missing.
ssh root@<your-vps-ip>
Only if prompted: if the dashboard
asks for auth, print the gateway token from that VPS
shell, paste it into the
Gateway Token field, and do not share
it.
sudo -u openclaw -H bash -lc "sed -n 's/^OPENCLAW_GATEWAY_TOKEN=//p' /home/openclaw/.openclaw/.env"
Only if prompted: if it then shows
Device pairing required, approve only
the request ID shown by your browser, then connect
again.
sudo -u openclaw -H bash -lc 'set -a; source /home/openclaw/.openclaw/.env; set +a; openclaw devices approve <request-id>'
Optional add-on
Run Telegram setup only after the installer completes, the private dashboard opens through Tailscale Serve, and gateway health checks are clean. Telegram is not part of first-run success.
Create a bot token in Telegram with
@BotFather and /newbot.
The add-on stores the token in
/home/openclaw/.openclaw/.env and
configures the default Telegram account with DM
pairing enabled and groups disabled for v1.
OpenClaw's Telegram docs describe BotFather setup,
default DM pairing, and the
TELEGRAM_BOT_TOKEN env fallback:
docs.openclaw.ai/channels/telegram.
Run the add-on
curl -fsSL https://raw.githubusercontent.com/LineZero-Studio/openclaw-diy/v0.1.2/scripts/add-telegram.sh | bash
Do not paste the token into support requests, screenshots, or shared logs.
After setup, run
sudo -u openclaw -H bash -lc 'set -a; source /home/openclaw/.openclaw/.env; set +a; openclaw channels status --channel telegram --probe --json'.
If the bot does not reply, start a direct message to the bot and approve the first pairing request from OpenClaw before relying on it.
Rerun after a successful core install, confirm the BotFather token is current, keep groups out of v1, and share only sanitized status output.
Recovery
Installer logs are written under
/var/log/openclaw-vps-guide/. Failure
output prints the active log path.
Marker-owned partial installs can be rerun. Unknown
existing /home/openclaw/.openclaw state
stops the installer instead of overwriting it.
Do not share .env, API keys, bot
tokens, gateway tokens, or screenshots that show
secrets. Share sanitized command output only.
Support boundary
This guide does not upload diagnostics and does not provide managed hosting. Use local logs and sanitized OpenClaw command output when asking for best-effort setup help.
Never send /home/openclaw/.openclaw/.env,
API keys, bot tokens, gateway tokens, or screenshots
with visible secrets.
Help link: https://linezerostudio.com