A 24/7 AI Assistant on a Raspberry Pi, Reachable from Telegram
A 24/7 AI Assistant on a Raspberry Pi, Reachable from Telegram
For a while now I’ve wanted a personal AI assistant that stays online all the time, that I can reach from my phone, and that lives on hardware I actually own. Cloud chatbots are great, but they don’t have a persistent home. They don’t really remember anything between sessions, and they can’t quietly work on something in the background while I’m off doing other things. So I decided to build my own.
The result is a Raspberry Pi 5 sitting on my desk. It runs OpenClaw with Claude as the underlying model, and I can reach it from anywhere over Telegram. I send it a message and it answers, whether I’m at my laptop, out on a walk, or away from home for the weekend.
Here’s how it all came together.
The hardware
I started with a Raspberry Pi 5 kit and a SanDisk High Endurance microSD card. The high endurance part matters because the Pi is going to be powered on around the clock, writing logs, swapping memory, and serving a small but constant workload. A regular consumer SD card would wear out faster than I’d want.
Assembly was about as simple as it gets. Slot the Pi into the case, attach the cooler, plug in power. Nothing fancy.
The OS
I used the official Raspberry Pi Imager to flash Raspberry Pi OS onto the SD card. The imager has a really handy advanced settings panel where you can preconfigure the hostname, username, Wi-Fi credentials, and enable SSH before the Pi has ever booted. That meant the very first boot already had network and SSH ready to go. No monitor or keyboard needed.
Remote access with Tailscale
For remote access I went with Tailscale instead of opening ports on my router. Tailscale puts the Pi on a private mesh network (a “tailnet”) that I can reach from my laptop or phone like it’s sitting on my LAN, no matter where I am.
A few reasons I prefer this to port forwarding:
- Nothing is exposed on the public internet.
- It works the same way at home, on coffee shop Wi-Fi, or on cellular.
- Authentication is tied to my identity rather than an IP address.
Installing it on the Pi was basically a one-liner, then tailscale up and a quick login from the browser. After that, SSHing into the Pi from anywhere just works.
The brain: OpenClaw + Claude
The Pi is the body. The brain is OpenClaw, an open-source agent runtime that handles the less glamorous but really important parts: messaging channels, sessions, memory, scheduled tasks, tool use. I dropped Claude in as the underlying model, so the assistant gets Claude’s reasoning and writing while OpenClaw takes care of persistence and connectivity.
A few things I like about splitting it up this way:
- The assistant has a workspace. It has a real directory on the Pi with notes, memory files, and project folders. It can read, write, and organize its own context across sessions.
- It can use tools. Run shell commands, read files, browse the web, search docs, whatever I let it touch.
- It persists. Each session can pick up where the last one left off through memory files. It isn’t amnesiac the way a fresh chat window is.
The interface: Telegram
The last piece was making it actually usable in daily life. Sitting at my laptop is fine, but the whole point of an always-on assistant is being able to reach it from anywhere. OpenClaw ships with a Telegram channel, so I created a bot through BotFather, dropped the token into the OpenClaw config, and pointed the channel at my session.
Now when I message the bot from Telegram, it routes straight to the assistant on the Pi, and replies come back in the same chat. I can ask it questions, kick off tasks, have it remind me about things, or just chat with it.
What it actually does
Day to day, it’s a mix of things:
- Quick questions I’d otherwise just google.
- Coding help. It can read my repos on the Pi and suggest changes directly.
- Notes and journaling. It keeps daily memory files and a curated long-term memory.
- Background tasks like scheduled checks, reminders, and the occasional proactive nudge.
It isn’t magic. It’s a Pi, an SD card, a VPN, an agent runtime, and a model. But the combination feels surprisingly close to having an assistant of my own, and for me that was worth building.
What’s next
A few directions I want to explore:
- Wiring it into more of my stuff like calendar, email, and smart home gear.
- More skills. Small modules that teach it how to do specific tasks well.
- Possibly a second channel like WhatsApp or Signal so I’m not locked into Telegram.
If you’ve been curious about self-hosting an AI assistant, the bar is lower than it looks. A Pi, a good SD card, Tailscale, OpenClaw, and a model API key will get you most of the way there.