← Back to library

Harden an always-on agent server and its memory

u/jkrokos9 shared lessons from over a hundred hours on an OpenClaw e-commerce agent: a modest VPS was enough, the agent once wiped the server so it was sandboxed, Discord gave way to Telegram, and access stayed over SSH to localhost. Files mirror into Obsidian, a cheap model handles heartbeats, and explicit no-delete rules protect lists.

  • OutcomeRun a self-hosted agent on a small server with locked-down access, explicit file permissions, a linked notes vault as memory and cheaper models for background checks.
  • SetupAn afternoon+
  • LevelAdvanced
  • Creditu/jkrokos9 on r/openclaw
View original
Works with
OpenClaw

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • You are setting up an agent on a VPS
  • You want it running all day
  • You have lost files to an agent before

Not for: Shared servers with other services; Anyone not comfortable with SSH

What do you need, and what do you get?

You need

  • Small VPS
  • Chat channel for commands
  • Notes app for the memory vault
  • Model accounts

You get

  • Locked-down server
  • Memory vault with linked notes
  • Rules for what files can change
  • Cost split by model

How does it work, step by step?

  1. Sandbox itRun the agent on its own server or container, never your main machine.
  2. Close the doorsFirewall, SSH keys, no public proxy, and a private chat channel for commands.
  3. Write file rulesList files it may only append to and files it must never touch.
  4. Build memory earlyUse linked notes with index pages so it can find its own context.
  5. Split models by jobSend heartbeats and background checks to an inexpensive model, and save the strong one for hard problems.

The prompt

Our own prompt, inspired by u/jkrokos9 on r/openclaw and written to work in OpenClaw. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt3 variables
Help me harden a VPS that runs my agent. Current setup: {setup}.
Give step-by-step commands to: enable a firewall allowing only SSH, require key login, bind the agent's web UI to localhost, and disable any reverse proxy.
Then draft a rules file listing append-only paths {append_only} and protected paths {protected}. Explain each step before I run it.

Inspired by u/jkrokos9 on r/openclaw: Spent 100+ hours and burned 200M+ tokens building an AI agent with OpenClaw. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • An agent with full machine access can wipe it, as the poster learned.
  • Background checks on an expensive model quietly add daily cost.

Our take

Most of this post is hard-won operations advice that applies beyond OpenClaw. Put explicit file rules and building the memory structure before the agent fills it with clutter first. Splitting cheap and expensive models by task is an easy saving, and keeping the server off the public internet is not optional. Keep a master sheet of restart and inspect commands, as the poster suggests; it saves time on the day something breaks. Sandbox the agent so a bad command cannot wipe the host. Prefer append-only lists over freeform rewrite for anything critical. Mirror important files into a second place you control. Close inbound ports; reach the box only through SSH or a private mesh. Review memory folders monthly and delete junk. Cap token spend. Merging, deploying and deleting stay with a person. Test backups by restoring once before you need them. Re-read the no-delete rules after every skill change, because new tools often forget them.

Where the time goes back: Fewer rebuilds after an agent mistake, and lower running costs.

FAQ

What did it cost?
The poster cites about $24 a month for the server and around $10 to $15 of model use per full workday.
Why Telegram over Discord?
He felt a shared server was riskier if someone else could prompt the agent.

Source and credit

Inspired by u/jkrokos9 on r/openclaw. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
Spent 100+ hours and burned 200M+ tokens building an AI agent with OpenClaw
Creator
u/jkrokos9 on r/openclaw
Published on
Reddit
Original date
Feb 27, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
OpenClaw
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityWorkflow✓ AI dry run

Pin your agent platform before updating it

When an agent setup runs several of your sites, stay a version behind, snapshot before upgrading, and test updates on a copy first.

Credit: u/Dry-Chance8730 on r/openclaw

Under an hour
IT & SecurityPrompt✓ AI dry run

Plan a least-privilege move of your agent's Google access

Get a written, reviewable plan for moving an agent's Gmail, Calendar and Drive access onto Google's agent interfaces, with the current setup kept as a fallback, read-only grants first, proof that writes fail, and no cutover until a side-by-side run is clean.

Credit: u/rlnerd on r/hermesagent

An afternoon+
IT & SecurityPrompt✓ AI dry run

Audit where your agents trust tool results blindly

Have an overseeing agent review your other agents and list every place a tool's answer is acted on without a check, with fixes ranked.

Credit: Michael Fenech (@Michael_Fenech_)

Under an hour
IT & SecurityPrompt✓ AI dry run

Audit which of your bots could spend from a saved card

Have your assistant map which bots and scheduled jobs could reach a checkout, renewal or subscription using a stored card, compare that with your current approval settings, and return a table of risks and the five most important fixes, without buying anything, revealing card details or changing settings.

Credit: Michael Fenech (@Michael_Fenech_)

Minutes
IT & SecurityRoutine✓ AI dry run

Get a memory check that asks before closing apps

Have an always-on assistant watch your computer's memory, text you what is using it, and close only what you approve.

Credit: Adam (@Adamdesgns)

Minutes