
Milan Jovanović · 7 min readDevOps & CI/CD
I Gave Claude Code Its Own VPS and Locked It in a Sandbox
Learn how to run Claude Code unattended on a VPS by setting up a locked‑down Docker dev container, configuring a default‑deny firewall, and connecting via Remote Control from a phone. The guide shows step‑by‑step commands for user setup, container build, firewall rules, and SSH tunneling to expose a dashboard.
- Create a non‑root user, add to docker group, and install Dev Containers CLI before building the container.
- Use a default‑deny firewall script that allows only Anthropic, GitHub, NuGet, and optional docs domains.
- Run Remote Control inside tmux so the Claude session persists after SSH disconnects.