DEV Community

Cover image for I Gave an AI Full Access to My VPS — Here's What Happened
Teguh Coding
Teguh Coding

Posted on

I Gave an AI Full Access to My VPS — Here's What Happened

What if you gave an AI agent root access to your server and told it: "You live here now"?

That's exactly what I did. And honestly? It changed how I work as a developer.

Let me tell you what happened.

The Setup

I'm a full-stack developer who manages his own VPS — a modest cloud server running Linux, Nginx, Docker, and a bunch of Node.js apps. The usual stuff.

One day, I stumbled upon OpenClaw — an open-source AI coding agent that you can self-host on your own machine. Unlike ChatGPT or Claude's web interface, this thing actually runs on your server. It can read your files, execute shell commands, manage your Docker containers, and basically act as a 24/7 AI co-pilot that never sleeps.

So I thought: "What's the worst that could happen?"

I installed it. I gave it access. I connected it to my Telegram so I could talk to it from my phone.

And then things got interesting.

Week 1: The Honeymoon Phase

The first thing I noticed was how stupidly convenient it was.

I'm lying in bed at midnight, and I realize I forgot to restart a Docker container after a config change. Old me would either get up, open my laptop, SSH into the server, and run the command — or just say "I'll do it tomorrow."

New me? I just texted my AI on Telegram:

"Hey, restart the nginx container"

Done. Five seconds. From my bed.

But that was just the beginning.

Things I started doing from my phone:

  • Checking server health: "How's the disk space looking?"
  • Reading logs: "Show me the last 50 lines of the app log"
  • Quick fixes: "The API is returning 502, check what's wrong"
  • Git operations: "Pull the latest changes on the staging server"

It felt like having a junior DevOps engineer on call 24/7, except this one never complains and works for free.

Week 2: It Started Writing Code For Me

This is where it got really interesting.

I had a blog running on WordPress, and I needed to publish articles regularly. Writing content, generating images, formatting everything, uploading to WordPress via the REST API — it was a whole process.

So I told my AI: "Here's a topic. Write an article, generate a featured image, and publish it."

And it just... did it.

It fetched reference material from the web, rewrote everything in my writing style, generated an image using OpenAI's API, compressed it to fit my server's upload limit, created the necessary tags, and published the post. All from a single Telegram message.

The entire pipeline that used to take me 2-3 hours was done in under 5 minutes.

Week 3: The Reality Check

Okay, it wasn't all sunshine and rainbows.

The Security Scare

Having an AI with shell access on a public-facing VPS is basically like leaving your front door open with a sign that says "come in." I quickly learned about:

  • Prompt injection attacks — where malicious input could trick the AI into running dangerous commands
  • Exposed API endpoints — my instance was briefly accessible from the public internet (yikes)
  • Supply chain risks — third-party plugins (skills) that could contain malware

I had to lock things down FAST:

# Essential security measures
- Enable DM pairing (so random strangers can't control your AI)
- Use Docker sandboxing for non-main sessions
- Keep OpenClaw updated (CVEs are being found regularly)
- Never install unverified skills from the marketplace
Enter fullscreen mode Exit fullscreen mode

The "Oops" Moments

There were a few times where the AI misunderstood my instructions and did something... unexpected. Like when I said "clean up the old logs" and it was a bit too enthusiastic about what "old" meant.

Lesson learned: Always be specific with your commands. And maybe set up some guardrails.

Month 2: The New Normal

After the initial learning curve, the AI became an integral part of my workflow. Here's what my typical day looks like now:

Morning (from my phone, still in bed):

  • "Any urgent errors overnight?"
  • "What's on my calendar today?"
  • "Check if any important emails came in"

Working hours:

  • "Scaffold a new API endpoint for user notifications"
  • "Write tests for the payment module"
  • "Review this PR and point out potential issues"

Evening:

  • "Deploy the staging branch to production"
  • "Run the database backup"
  • "Write and publish today's blog post"

I'm not gonna pretend it does everything perfectly. It makes mistakes. Sometimes the code it writes needs fixes. Sometimes it misunderstands context.

But here's the thing: it handles 70% of the boring stuff, which frees me up to focus on the 30% that actually requires my brain.

The Numbers

After two months, here's what changed:

Metric Before After
Time spent on server maintenance ~5 hrs/week ~30 min/week
Blog posts published 1-2/month 8-10/month
Response time to server issues Hours Minutes
Late-night SSH sessions Too many Zero

Should You Do This?

Yes, but carefully.

If you're a developer who manages your own infrastructure, having an AI agent on your server is a genuine productivity multiplier. But treat it like you'd treat giving someone the keys to your house:

  1. Start with limited access — don't go full root on day one
  2. Lock down security first — firewall, sandboxing, authentication
  3. Be specific with instructions — vague commands lead to vague results
  4. Always have backups — because AI + root access + Murphy's Law
  5. Keep it updated — security patches are not optional

The Bottom Line

Giving an AI full access to my VPS was equal parts terrifying and liberating. It's not perfect, and it's definitely not for everyone. But for a solo developer managing their own infrastructure?

It's the closest thing to having a co-founder who never sleeps.


Have you tried self-hosting an AI agent? I'd love to hear your experience in the comments.

Follow me for more real-world AI and DevOps content. I write about the stuff I actually use, not the stuff that sounds cool in a press release. ✌️

Top comments (0)