Run Claude Code 24/7 on a VPS — Open Source

Run Claude Code 24/7 on a VPS — Open Source

Rachel8 is an MIT-licensed project that runs Claude Code on a remote server, accessible via Telegram. Here's how developers can use and extend it.

Claude Code changed how I write software. You type claude in your terminal, describe what you want, and it reads your codebase, writes code, runs tests, fixes errors — all autonomously. It’s the best coding agent available today.

But it has a limitation: it runs locally. Your laptop needs to be open, your terminal needs to be active, and when you close the lid, it stops.

I wanted Claude Code running 24/7 on a server, reachable from anywhere — my phone, my iPad, wherever. So I built Rachel8, and it’s MIT licensed.

What Rachel8 is

Rachel8 is a thin wrapper around the Claude Agent SDK — the same engine that powers Claude Code — connected to a Telegram bot. It runs on any Linux server and gives you the full Claude Code experience remotely.

Same tools. Same capabilities. Same model. Just accessible from Telegram instead of a terminal.

You (Telegram) → Rachel8 (VPS) → Claude Agent SDK → Tools (bash, files, web, etc.)

When you send a message, Rachel8 passes it to the SDK with your conversation history. Claude processes it with full tool access — bash, file system, web search — exactly like it does in your terminal. The response comes back to Telegram.

Why developers should care

It’s MIT licensed. Fork it, modify it, ship it. Build your own AI assistant, your own dev tool, your own automation pipeline. The entire codebase is open.

It’s Claude Code, not a wrapper around the API. This uses the Agent SDK directly — the same engine behind Claude Code. That means full tool use, multi-step reasoning, file editing with diffs, and all the other things that make Claude Code special. No prompt engineering needed on your side.

It adds persistence. The biggest gap in Claude Code is that it forgets everything between sessions. Rachel8 adds a three-layer memory system:

  1. MEMORY.md — core facts injected into every request. The agent updates this itself as it learns about you and your projects.
  2. Context files — deep knowledge by topic. Working on a specific project? Rachel loads the relevant context automatically.
  3. Daily logs — every conversation is logged. The agent can reference what you discussed last week.

Memory lives on disk. It survives restarts, context resets, and even model upgrades.

It adds scheduling. Rachel8 includes a SQLite-backed task scheduler. The agent can create its own cron jobs:

  • Run tests every hour and alert you on failure
  • Generate a daily summary of git activity
  • Monitor a service and restart it if it goes down
  • Any autonomous multi-step task on a schedule

Tasks survive restarts. They can be simple reminders, bash commands, or full agent tasks where Claude autonomously does complex work.

It adds skills. Extensible skill files for PDF generation, Excel, web design, WhatsApp bridge, and more. Drop a markdown file in the skills/ directory and the agent learns new capabilities.

Setup in 15 minutes

You need: any Ubuntu VPS ($5/month is fine), a Claude Max or Pro subscription, and a Telegram account.

# 1. Create user
adduser rachel --ingroup users --disabled-password
su - rachel

# 2. Install deps
sudo apt update && sudo apt install -y unzip gh
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc

# 3. Install Claude Code + login
curl -fsSL https://claude.ai/install.sh | bash
source ~/.bashrc
claude login

# 4. Clone + install
gh auth login
gh repo clone polly3223/Rachel8 ~/rachel8
cd ~/rachel8
bun install

# 5. Setup wizard (asks for Telegram bot token + your user ID)
bun run setup

# 6. Start
sudo systemctl start rachel8

That’s it. Open Telegram, send a message to your bot. Full Claude Code, running 24/7.

No API key needed — the SDK uses your Claude subscription directly. No per-token billing.

What you can build on top of it

Since it’s MIT licensed and the architecture is straightforward (Telegram transport → Claude Agent SDK → tools), you can extend it in any direction:

Custom dev tools. Add project-specific skills, integrate with your CI/CD pipeline, connect to your internal APIs. The agent has full bash access, so anything you can do in a terminal, it can do.

Multi-user setups. The code supports single-user out of the box (one bot token, one owner), but the architecture is simple enough to extend to multi-tenant if you need it.

Different transports. The Telegram layer is clean and separate. Swap it for Slack, Discord, a web UI, or a CLI — the agent core doesn’t care.

Autonomous agents. The task scheduler + memory system means you can build agents that work on their own. Set up a cron task that says “check for new issues on GitHub, triage them, and draft responses” — it runs while you sleep.

The architecture

rachel8/
├── src/
│   ├── index.ts              # Entry point
│   ├── ai/
│   │   └── claude.ts         # Claude Agent SDK + session management
│   ├── telegram/
│   │   ├── bot.ts            # grammY bot instance
│   │   ├── handlers/
│   │   │   └── message.ts    # Handles text, voice, photos, files
│   │   └── middleware/
│   │       └── auth.ts       # Single-user auth guard
│   └── lib/
│       ├── memory.ts         # Three-layer memory system
│       └── tasks.ts          # SQLite task scheduler
├── skills/                   # Extensible skill files
└── package.json

Built with Bun, grammY (Telegram framework), and the Claude Agent SDK. TypeScript throughout. The codebase is small — under 2,000 lines for the core.

Why not just SSH + Claude?

You could SSH into your VPS and run claude directly. That works for a coding session. But:

  • SSH requires a terminal. Rachel8 works from your phone.
  • SSH sessions die. Rachel8 runs as a systemd service, 24/7.
  • Claude Code forgets. Rachel8 has persistent memory.
  • Claude Code can’t schedule. Rachel8 has autonomous task execution.
  • Claude Code can’t receive files. Send Rachel8 a PDF, screenshot, or voice message — it processes them.

It’s the difference between a tool you open and an agent that’s always running.

Cost

  • VPS: $5-20/month
  • Claude: your existing Max ($20/month) or Pro ($100/month) subscription
  • Rachel8: free, MIT licensed

No API costs. The SDK uses your subscription directly. Flat monthly spend, no surprises.

Get started

github.com/polly3223/Rachel8

Fork it, deploy it, make it yours.