How to Set Up OpenClaw on a Hostinger VPS with Ubuntu 24.04
By Riz Pabani on 30-Jan-2026

This is a step-by-step guide to set up OpenClaw (formerly ClawdBot / Moltbot) on a Hostinger VPS running Ubuntu 24.04, assuming your base machine is a Mac for accessing the setup, dashboard, and managing the instance.
This guide uses the native (non-Docker) installation via npm, keeps the gateway bound to loopback for security, and relies exclusively on Tailscale for private remote access from your Mac — no public ports, no UFW openings beyond SSH.
Current as of February 2026 — based on docs.openclaw.ai, openclaw.ai, and community guides.
Step 1: Provision and Basic Harden the Hostinger VPS (Ubuntu)
In Hostinger panel, navigate to VPS and create a new instance (KVM 2 or higher recommended: at least 8 GB RAM for smooth agent/tool usage).
Select Ubuntu 24.04 LTS as your OS.
After provisioning, note the public IP and root password (or set up SSH key).
SSH in from your Mac's Terminal:
ssh root@your-vps-public-ip
Update the system and create a non-root user:
apt update && apt upgrade -y
apt install sudo curl -y
adduser clawuser
usermod -aG sudo clawuser
Switch to SSH Keys (Disable Password Login)
On your Mac, generate a key if needed (ssh-keygen), then copy it:
ssh-copy-id clawuser@your-vps-public-ip
On the VPS (as root), edit /etc/ssh/sshd_config:
- Set
PasswordAuthentication no - Set
PermitRootLogin no
Restart the SSH service:
systemctl restart ssh
Log out and reconnect from Mac as:
ssh clawuser@your-vps-public-ip
Step 2: Install Node.js on VPS
OpenClaw requires Node.js 22 or higher (LTS):
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs
Verify the installation:
node -v # Expect v22.x or higher
npm -v
Step 3: Install Tailscale on VPS
Sign up for free at login.tailscale.com if you haven't already.
On the VPS:
curl -fsSL https://tailscale.com/install.sh | sh
Join your tailnet using an auth key for server/headless setup:
-
In the Tailscale admin console (login.tailscale.com/admin), go to Machines and generate an auth key (make it reusable or tagged; enable "SSH" if desired).
-
On the VPS:
sudo tailscale up --authkey=tskey-auth-xxxxxxxxxxxxxxxxxxxx --hostname=openclaw-vps --accept-routes --accept-dns
Verify the connection:
tailscale status
tailscale ip -4 # Note the 100.x.x.x Tailscale IP
Optional but recommended: In the admin console, navigate to DNS and enable HTTPS certificates (global nameservers).
Step 4: Install OpenClaw Natively on VPS
curl -fsSL https://openclaw.ai/install.sh | bash
This installs the openclaw CLI globally via npm and launches the onboarding wizard (TUI in terminal).
Step 5: Onboarding Wizard and Telegram Setup
Follow the interactive prompts in the wizard.
LLM Provider
Select Anthropic (Claude) — strongly recommended. Paste your API key (Claude Pro/Max best for tool use/agents).
Alternatives include OpenAI, Grok, or local Ollama (separate install required).
Channels
Choose Telegram (easiest and most reliable):
- On your Mac or phone, open Telegram and search for @BotFather.
- Send
/newbotand give your bot a name (e.g. MyOpenClaw) and username (must end in_bot). - BotFather replies with an API token (e.g.
123456:ABC-DEF1234...). - Paste this token into the wizard when prompted for Telegram.
- Optional: In @BotFather, go to
/mybots, select your bot, then Bot Settings and turn off Group Privacy (allows groups without / commands).
Gateway Auth
Set to token (default/recommended). The wizard auto-generates a strong token — save it securely (copy to your Mac's notes or 1Password). This is required for all non-local access, including Tailscale.
Gateway Bind
Keep loopback (127.0.0.1) for security.
Finish the wizard and it starts the gateway process.
If needed later, re-run the wizard with openclaw onboard.
Step 6: Enable Tailscale Serve for Private Dashboard Access from Mac
Configure OpenClaw to use Tailscale Serve (HTTPS + Tailscale identity auth).
On the VPS:
openclaw config set gateway.tailscale.mode serve
openclaw config set gateway.auth.mode token # Ensures token fallback if needed
# Confirm token (if not saved):
openclaw doctor --generate-gateway-token # Shows/copies token
Install as a systemd user service (runs on boot, background):
openclaw gateway install-daemon
systemctl --user daemon-reload
systemctl --user enable --now openclaw-gateway
Check the status:
openclaw gateway status
tailscale serve status # Should proxy https://openclaw-vps.your-tailnet.ts.net to localhost:18789
Step 7: Install Tailscale on Your Mac and Access Dashboard
Download and install Tailscale on macOS (recommended: standalone pkg, not App Store):
- Go to tailscale.com/download and select macOS, then Download pkg (or direct: Tailscale macOS pkg).
- Install and open the app, then log in with the same account as your VPS.
Your VPS appears in the Tailscale menu bar with status showing connected.
In your browser on Mac, go to the magic DNS URL:
https://openclaw-vps.your-tailnet-name.ts.net
Your tailnet name is visible from the Tailscale menu (e.g. https://openclaw-vps.alice-family.ts.net).
- Tailscale auto-provides the HTTPS cert.
- Log in with your gateway token (paste from earlier).
The dashboard opens where you can monitor sessions, approve tools/skills, view logs, and manage the Telegram channel.
Your Telegram bot is now live — find it in Telegram (search your bot username) and send "hello" or "help". It responds via your Claude model.
Step 8: Test, Maintain and Security Notes
Testing
Test your bot in Telegram with messages like:
- "What's the date?"
- "Search web for latest AI news"
- "Run whoami" (approve shell tool first via dashboard)
Updates
Update OpenClaw:
openclaw update
Logs
View logs:
journalctl --user -u openclaw-gateway -f
Backup
SCP ~/.openclaw from VPS to Mac periodically:
# From Mac:
scp -r clawuser@your-vps-public-ip:~/.openclaw ~/backups/openclaw-vps/
Or use Tailscale SSH if enabled.
Security
The gateway is never public. Only your Mac (tailnet devices) can reach it. Tailscale Serve uses identity headers plus your token.
Troubleshooting
If you encounter issues such as Tailscale Serve not proxying, token auth failures, or Telegram not responding, check the logs and verify each step was completed correctly.
Common issues include:
- Tailscale not properly connected (run
tailscale status) - Gateway not running (check with
openclaw gateway status) - Token mismatch (regenerate with
openclaw doctor --generate-gateway-token)
With this setup, you have an always-on, private AI assistant accessible only through your secure Tailscale network.
For advanced configuration including reasoning levels, Telegram CLI usage, and security hardening, see OpenClaw Tips: Configuration, Optimization & Security.
Related Articles

Kimi K2: The Open Source Model Changing Enterprise AI
Kimi K2 is a 1 trillion parameter open source model rivaling closed models. Learn why this matters f...

OpenClaw SEO Stack: Spotting Newsjack Opportunities in 2026
An OpenClaw SEO stack for solopreneurs: research, trend-jacking, task automation, and the Moltbook a...

OpenClaw Tips: Configuration, Optimization & Security
Master OpenClaw with tips on core configuration, thinking levels, Telegram usage, proactive automati...