Skip to main content
Chapter 8 VPS Deployment: Your 24/7 Digital Employee

Step-by-Step VPS Install of OpenClaw

9 min read Lesson 49 / 65 Preview

Installing OpenClaw on the server

Most of this is identical to the local Linux install in chapter 2, with three additions: systemd, a reverse proxy, and a strict secrets file.

1. Repeat the Linux install

Use chapter 2's recipe under your claw user. Confirm openclaw start runs interactively before going further.

2. systemd unit

[Unit]
Description=OpenClaw VPS agent
After=network-online.target

[Service]
Type=simple
User=claw
WorkingDirectory=/home/claw/openclaw
EnvironmentFile=/home/claw/openclaw/.env
ExecStart=/home/claw/.nvm/versions/node/v20.x.x/bin/openclaw start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

3. Reverse proxy with Caddy

Caddy is dead simple and gives you HTTPS for free.

agent.your-domain.com {
    reverse_proxy 127.0.0.1:7777
    encode zstd gzip
    log
}

OpenClaw never listens on a public port directly. Caddy fronts it; UFW (next chapter) blocks everything else.

4. Strict secrets file

chmod 600 /home/claw/openclaw/.env
chown claw:claw /home/claw/openclaw/.env

5. First boot

sudo systemctl daemon-reload
sudo systemctl enable --now openclaw
journalctl -u openclaw -f

Verify

  • https://agent.your-domain.com/health returns 200
  • journalctl -u openclaw shows a clean start
  • Telegram bot responds to /start

You now have a real digital employee. Next chapter we lock the door behind it.

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support