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).
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"
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):
type $env:USERPROFILE\.ssh\id_ed25519.pub
2. On the server paste it into:
nano /home/AIagent/.ssh/authorized_keys
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
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
grep -n "^PasswordAuthentication" /etc/ssh/sshd_config
β’ 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
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
curl -fsSL https://openclaw.ai/install.sh | bash
Step 7. After OpenClaw installation:
openclaw status
- If needed β lock a model for the session/agent (via OpenClaw settings or model switch command in UI/chat).
openclaw onboard
- 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 9. Verify everything is alivebash
openclaw status openclaw gateway status
Things worth automating right away
- Reminders (meetings, workouts, deadlines)
- Price/file monitoring (notifications only on real changes)
- Memory & structured note-taking
- Drafts for commercial proposals / reports / posts
How much does it cost
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.
Once you master this β youβll be able to build your own framework.