Yesterday I had the idea of using Claude remotely from my phone to deploy, monitor and debug my home server. It's an old laptop running a handful of Docker stacks.
My setup is fairly simple: about 4 services, each deployed from its own docker-compose.yaml. A few things I had to sort out first:
-
Moved the stacks from
/home/userto/srv/stacks– Claude Code's remote mode won't operate on a home directory. -
Created a dedicated user for the agent and added it to the
dockergroup. -
Stored my Cloudflare API token in an
.envfile so the agent can create tunnels and DNS records automatically when it deploys something new. -
Wrote a
CLAUDE.mdwith project instructions, and locked downsettings.jsonto deny the risky stuff (deleting images/volumes,docker system prune, etc.).
Then I installed Claude, launched it in remote-control mode as that user, and got on my train.
The experience was genuinely amazing. I could have it deploy services end-to-end from my phone with basically no input from me. Something that normally takes me days – deploy, debug, configure properly – now takes a prompt and a few minutes of waiting.
That afternoon on the train I got Immich, Beszel and Pingvin Share running. Then I went further and added a mail relay so all my stacks can send me email. In the evening I deployed Authelia and wired SSO into almost every service — that one took about 30 minutes of back-and-forth to sort out compatibility quirks between the apps.
The trade-off: the agent has Docker access (basically root) and a live Cloudflare token sitting on disk. I scoped the token to a single zone with only DNS/tunnel edit permissions, and the deny-rules in settings.json block the destructive Docker commands — but it's a real trade-off and not for everyone.
Overall: with AI coding agents plus remote control, a homelab has never been easier to run. I'm sure others have tried this before me, but I wanted to share my experience.
Source: r/selfhosted · by /u/ghuntdo