Running an AI assistant on your local machine has one big, unavoidable flaw: the moment your computer shuts down, sleeps, or you step away, the whole thing goes offline. A meeting, a dead battery, or just closing the lid โ and your agent is gone. Put it on a VPS and that problem disappears completely. It runs 24/7, doesnโt touch your own hardware, and you can check on it or give it commands from your phone whenever you want.
Why VPS over local
The downsides of running locally go way beyond just downtime. Your IP changes constantly, you canโt trigger it remotely, and trying to run multiple tasks at once will slow your own machine to a crawl. A VPS fixes all of that in one move: you get a fixed public IP, true always-on uptime, and resources that donโt compete with anything else youโre doing on your laptop.
For personal use, a 2-core 2GB VPS is more than enough. It usually costs $5โ10/month. Providers like Vultr, DigitalOcean, and Hostinger all have solid new-user deals and work great whether youโre just testing or planning to run it long-term.
Deployment
Once youโve got your VPS, choose Ubuntu 22.04 LTS and connect via SSH:
ssh root@your_server_IP
Update the system first:
apt update && apt upgrade -y
Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
node --version # Confirm successful installation
Start OpenClaw directly with npx:
npx openclaw
Itโll pull in all the dependencies and set everything up automatically. The whole process usually takes less than five minutes.
For better long-term stability and easier data management, Docker is the cleaner way to go:
sudo apt install -y docker.io
sudo systemctl enable docker && sudo systemctl start docker
docker run -d \
--name openclaw \
--restart always \
-p 8080:8080 \
-v ~/.openclaw:/app/data \
openclaw/openclaw:latest
The --restart always flag makes sure the container comes back up automatically after any reboot. The volume mount keeps your data safe on the host even if you ever rebuild the container.
Quick check that itโs running:
docker ps
docker logs -f openclaw
Security configuration
Do these two things right after the service is up โ donโt wait.
First, set up the firewall and close anything you donโt actually need exposed:
sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw deny 8080 # Access through Nginx proxy, not directly
sudo ufw enable
Second, install Nginx and add basic authentication so itโs not wide open:
sudo apt install nginx apache2-utils -y
sudo htpasswd -c /etc/nginx/.htpasswd your_username
Nginx configuration:
server {
listen 80;
server_name your_domain_or_IP;
location / {
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Restart Nginx:
sudo systemctl restart nginx
If you have a domain, add HTTPS:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your_domain
What you can actually do with it
Once itโs running, OpenClaw can take over a surprising number of repetitive tasks.
Email management is probably the biggest immediate win. It can automatically sort your inbox, flag important messages, and draft replies to routine stuff โ which can cut your daily email time in half.
For scheduling, it can connect to Google Calendar or Outlook, spot conflicts, send reminders ahead of time, and even give you a quick daily summary. Route the notifications through a Telegram bot and youโll get alerts straight to your phone without ever having to open another app.
Setting up the Telegram bot is straightforward: talk to BotFather in Telegram, create a new bot, copy the token into OpenClawโs settings, and youโre good. From then on you can send commands and get results directly from your phone.
Freelancers can offload a lot of admin work โ tracking income and expenses, following up on payments, generating periodic financial summaries. Students can use it to pull literature abstracts, organize notes by topic, and automatically create weekly study summaries.
Keeping the service running long-term
For anything that needs to stay up for months, a few automated maintenance tasks make life much easier.
Clean up old logs so the disk doesnโt slowly fill up:
crontab -e
# Add:
0 3 * * * find /var/log -type f -name "*.log" -mtime +7 -delete
Simple scheduled backup:
nano ~/backup.sh
#!/bin/bash
DATE=$(date +%Y%m%d)
tar -czf ~/backups/openclaw_$DATE.tar.gz ~/.openclaw
find ~/backups -mtime +14 -delete
chmod +x ~/backup.sh
crontab -e
# Add:
0 2 * * * ~/backup.sh >> ~/backup.log 2>&1
For monitoring, install Uptime Kuma so you get notified the second anything drops:
docker run -d \
--name uptime-kuma \
--restart always \
-p 3001:3001 \
-v uptime-kuma:/app/data \
louislam/uptime-kuma:latest
Open http://yourIP:3001 to set up monitors and connect Telegram or email alerts.
Summary
A 2-core 2GB VPS running Ubuntu 22.04, Docker, and OpenClaw โ secured with Nginx authentication and a proper firewall โ can be fully set up in under half an hour. After that, most maintenance is handled automatically through scheduled tasks and monitoring, so thereโs almost nothing left to babysit day-to-day.
The real requirement for an AI assistant to be useful is that itโs always available. A VPS is what actually makes that possible.