Claude Code Workflow: Automating Socials via Raspberry Pi
The architecture is simple: a Raspberry Pi running Ubuntu, Claude Code acting as the agent, and a cron schedule to trigger the drafts and posts. Because the agent lives on the box, there's no difference between a scheduled task and me sending a manual command from my phone to "soften the tone" of a post—it's all just instructions to the same session.
The Real-World Wins
- Hardware Isolation: My daily driver stays clean. I can shut it down or push it to the limit with heavy work without worrying about background scripts failing or eating RAM.
- Mobile Steering: Using the Remote Control feature, the session on the Pi syncs to the Claude mobile app. I can tweak the "angle" of a post while commuting without needing to SSH into the box.
- Consistent Presence: It doesn't matter if I'm asleep or traveling; the posts go live on time.
- Risk Mitigation: When automation inevitably glitches, it happens on a disposable "experiment box," meaning it never crashes my actual work environment.
Deployment Gotchas
If you're attempting this deployment, a few technical hurdles will probably trip you up:
1. The PATH Issue
The installer puts claude in ~/.local/bin, which isn't in the default PATH. You'll get a command not found error immediately. Fix it with:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc2. Session Persistence
Reboots kill active sessions. If you need zero-touch recovery, you'll need a systemd service; otherwise, you're manually re-attaching after a power cycle.
3. SSH Logout Kills
By default, the session might die when you disconnect. To keep the agent alive in the background, run:
loginctl enable-linger $USER4. Remote Control Requirements
This relies on a Claude subscription and a constant internet connection. If the box drops offline for 10 minutes, the session disconnects. I recommend enabling Remote Control globally in the /config settings so every new session is automatically reachable via phone.
Moving from "scripts on a laptop" to a "dedicated AI box" is a mental shift that actually works. Social media is just the first use case, but having a persistent agent accessible from a mobile device changes how you think about AI workflows.