08 / Own your environment
Build a home setup
you can actually maintain.
Keep development and app hosting on your own hardware while understanding what still uses an online service.
What can you host yourself?
| Component | At home? | What remains external |
|---|---|---|
| Project files, Git history, and tools | Yes. Use your own computer or server. | Nothing requires GitHub for a local-only workflow. |
| Your website or application | Yes, when its architecture supports it. | Any APIs, email providers, or services the app uses. |
| Claude Code CLI and execution | Yes, on a supported machine. | Claude authentication and model requests use an online provider. |
| Remote Control local execution | Yes, the agent runs on your machine. | Anthropic coordinates the remote interface and model access. |
| Official self-hosted cloud runners | Eligible Team/Enterprise beta. | Anthropic control plane and model inference remain external. |
| Claude model weights and full offline inference | Not offered through the documented Claude Code setup. | You cannot turn a Claude subscription into a fully offline model server. |
Begin with Claude Code on your everyday computer, a private practice project, and normal Git backups. Add Remote Control if you want to work from another device. Add a separate home server only when an app needs to stay running.
A sensible home arrangement
Keep development separate from the running service. Claude does not need access to your whole server or production database simply to edit a website. A mini PC or existing machine can be enough for a small static site; databases and other workloads determine actual capacity. No special AI GPU is required just to call a hosted Claude model.
Control your home session from elsewhere
Prepare the machine
Install Claude Code, sign in with an eligible Claude subscription, and open the project once to review trust and permissions. API-key-only access does not qualify for Remote Control.
Enable Remote Control
Use /remote-control in an existing session, or run the standalone command below from the project folder.
claude remote-controlConnect through your account
Follow the session link or QR flow from your signed-in browser or Claude mobile app. The files and tools stay on the home machine, while session content and model requests still use Anthropic services.
Keep the host available
Leave the relevant process running and prevent sleep during work. A sleeping or disconnected computer cannot execute tasks until it reconnects. No router port-forward is needed for the documented outbound Remote Control connection.
Prepare an optional home server
- Choose a maintained operating system supported by the tools you need. Install updates and create a normal, non-root working account.
- Set up administrative access on your private network. Prefer SSH keys. Confirm access before changing firewall rules so you do not lock yourself out.
- Install Git and the project’s documented runtime. Install Docker only if you choose a container-based deployment.
- Create separate directories for app code, configuration, persistent data, and backups. Keep credentials outside Git.
- Start with localhost or private access. Use a VPN for remote administration instead of directly exposing an admin terminal.
- Document a restore procedure and test a backup before relying on the server.
These are operational recommendations for a home lab. They are not an automated server installer. Exact package commands depend on the chosen OS and app.
A complete, private static-site exercise
This example serves a plain HTML site from Docker. It does not install or run Claude Code. Install Docker Desktop or Docker Engine plus Compose from the official instructions first.
Create a folder named home-site, then a subfolder named public. Save this file as public/index.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My home site</title>
</head>
<body><h1>My home site is running.</h1></body>
</html>In home-site, save the following as compose.yaml:
services:
site:
image: nginx:stable-alpine
ports:
- "127.0.0.1:8080:80"
volumes:
- ./public:/usr/share/nginx/html:ro
restart: unless-stoppedRun these commands from that folder:
docker compose config
docker compose up -d
docker compose ps
docker compose logs --tail=50Open http://localhost:8080 in a browser on the machine running Docker. The port is bound to loopback, so it is not exposed to the rest of your network. For a remote home server, use an SSH tunnel from your own computer:
ssh -L 8080:127.0.0.1:8080 YOUR-USER@YOUR-SERVERLeave the tunnel open, then use the same localhost URL on your computer. If port 8080 is occupied, choose a different local port and adjust the browser URL.
| Task | Command or action |
|---|---|
| Stop the exercise | docker compose down |
| Update the image | Back up, then docker compose pull and docker compose up -d; verify afterward. |
| Back up this example | Copy public/ and compose.yaml to another device. |
| Make deployments reproducible | Record and pin a reviewed image digest instead of relying indefinitely on a moving tag. |
This exercise has no database. A real app also needs health checks, correct persistent volumes, application-aware database backups, secret management, and rollback instructions. Do not use a development server as an unattended production deployment.
If you later want a public website
Public hosting adds responsibilities: domain and DNS configuration, HTTPS, firewall rules, authentication where needed, updates, monitoring, and incident recovery. Home connections may use carrier-grade NAT or restrict inbound hosting. A reverse proxy or tunnel needs its own careful setup. Do not expose Docker’s control socket or database ports to the internet.
For a beginner, keep the home environment private until the app is tested. A hosted static website can be simpler than maintaining public access to your home network.
Official self-hosted cloud runners
Anthropic documents this as a public beta for Team and Enterprise, disabled until an organization owner enables it. It runs cloud tasks on organization-managed machines. It is a different feature from personal Remote Control.
Eligible operators enable the environment in admin settings, follow the runner quickstart, configure repository access and outbound connectivity, and select that environment for a cloud session. The guided entry point is:
claude self-hosted-runner setupUse isolated runners, restricted credentials, and the official deployment guidance. Current limitations include no Zero Data Retention organizations and Anthropic API inference rather than alternate provider routing. This does not provide offline Claude.
If you truly want everything offline
That requires a different architecture: a locally runnable model, compatible agent software, local dependencies, and no hosted integrations. Hardware requirements depend on the chosen model. It is outside the documented Claude Code setup and is not equivalent to hosting Claude yourself.
Official references: Remote Control ↗ · Self-hosted environments ↗ · Self-hosted environment quickstart ↗ · Model gateways ↗ · Docker installation ↗ · Docker Compose quickstart ↗
Was this chapter useful?
Report an errorVotes are shared only if you enable optional measurement in Privacy settings.