March 2

Create an AI agent on a VPS in one evening?

Short answer: yes, it's realistic. No magic. Based on OPENCLAW.

In 30–60 minutes and 9 steps, you can create your own AI agent that
works 24/7, replies in Telegram, maintains memory, sends reminders and automates routine tasks.Even without strong coding skills, you can start building apps and implementing your ideas. The agent will always help, suggest things and take on most of the work β€” you’ll be pleasantly surprised.But remember β€” security always comes first.
Never give the agent personal data, codes, passwords, etc.

───

Why an agent when you already have ChatGPT?Regular LLM (ChatGPT / Gemini) β€” answers questions.Agent β€” answers + performs actions:

  • works with files
  • checks sources on schedule
  • sends notifications
  • keeps structured memory
  • executes chains of commands

In other words, it’s already a mini operating system for your processes. It remembers, understands and retains everything you allow (or forbid), lives and evolves alongside you.Follow the steps. If something doesn’t work β€” go back to the previous step.
For this evening, get an AI to help you find errors (later you most likely won’t need it as much).

───

What you’ll need

  • VPS: 2 vCPU / 4 GB RAM / 40+ GB SSD
  • Ubuntu 24.04
  • Telegram bot (@BotFather )
  • 30–60 minutes

───

Okay, no fluff β€” step by step:

Step 1. Basic security (mandatory)1.1 Update the serverbash

apt update && apt upgrade -y

1.2 Create a separate user (I named it AIagent, you can choose any name).bash

adduser AIagent
usermod -aG sudo AIagent
su - AIagent

───

Step 2. SSH keys instead of password (Mac + Windows)On Mac/LinuxGenerate key:

ssh-keygen -t ed25519 -C "AIagent"

Copy key to server:bash

ssh-copy-id AIagent@SERVER_IP

On Windows (PowerShell)Generate key:

ssh-keygen -t ed25519 -C "AIagent"

Usual path:
C:\Users\YOUR_USER\.ssh\id_ed25519.pubCopy key to server (manual way):

  1. Display the key:
type $env:USERPROFILE\.ssh\id_ed25519.pub

2. On the server paste it into:

nano /home/AIagent/.ssh/authorized_keys

Server-side permissions:

mkdir -p /home/AIagent/.ssh
chmod 700 /home/AIagent/.ssh
touch /home/AIagent/.ssh/authorized_keys
chmod 600 /home/AIagent/.ssh/authorized_keys
chown -R AIagent:AIagent /home/AIagent/.ssh

Test login:

ssh AIagent@SERVER_IP

───

Step 3. Disable root/password SSH login on the server:

sudo sed -i 's/^#*PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh

Check:

grep -n "^PasswordAuthentication" /etc/ssh/sshd_config

Should show:

β€’ PasswordAuthentication noImportant: make sure key-based login works first, only then disable password auth.

───

Step 4. Enable firewall (UFW):

sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
echo "y" | sudo ufw enable
sudo ufw status verbose

───

Step 5. Install Node.js 22:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install 22
corepack enable pnpm

───

Step 6. Install OpenClaw:

curl -fsSL https://openclaw.ai/install.sh | bash

Then follow the setup wizard.

───

Step 7. After OpenClaw installation:

  1. Check current model:
openclaw status
  1. If needed β€” lock a model for the session/agent (via OpenClaw settings or model switch command in UI/chat).
openclaw onboard
  1. Selection criteria:
  • cheap / long context β†’ one model
  • complex reasoning tasks β†’ another
  • production: better to have a β€œmain” + β€œfallback” model

In other words: do not leave it fully on autopilot β€” make one conscious choice and lock it.

───

Step 8. Connect Telegram bot

  1. In @BotFather :
  • /newbot
  • get the token
  1. Paste the token into OpenClaw setup
  2. Complete pairing
  3. Send a test message to the bot

───

Step 9. Verify everything is alivebash

openclaw status
openclaw gateway status

Check:

  • service is running
  • bot responds
  • no errors in logs

───

Things worth automating right away

  1. Reminders (meetings, workouts, deadlines)
  2. Price/file monitoring (notifications only on real changes)
  3. Memory & structured note-taking
  4. Drafts for commercial proposals / reports / posts

───

How much does it cost

  • VPS: ~$5–10/month
  • model/API: depends on usage
  • setup time: 1 evening

───

Most common mistakes

  • doing everything from root
  • not setting up SSH keys
  • leaving password SSH enabled
  • no disk/log monitoring
  • not verifying data against official sources

───

Post-launch checklist

  • weekly disk check
  • backup .env, database and memory
  • separate chats (management / product bot)
  • stop-rules (what the agent must never do without confirmation)
  • change logging

───

Important note on safety & responsibility

The agent can make mistakes.Before final actions (money, publishing, technical changes, purchases) β€” manual verification is required.Rule:

  • critical action β†’ manual confirmation
  • technical parameters β†’ cross-check with manufacturer’s official docs

───

What to do next?

Develop the agent, feed it the information it needs, analyze together.

Pay special attention to security settings.

Create new ones.

Once you master this β€” you’ll be able to build your own framework.