The handbook/Home server & self-hosting
SettingsMy workspaceOfficial docs ↗

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.

STEP-BY-STEP HANDBOOK20 min guide + setup time

What can you host yourself?

ComponentAt home?What remains external
Project files, Git history, and toolsYes. Use your own computer or server.Nothing requires GitHub for a local-only workflow.
Your website or applicationYes, when its architecture supports it.Any APIs, email providers, or services the app uses.
Claude Code CLI and executionYes, on a supported machine.Claude authentication and model requests use an online provider.
Remote Control local executionYes, the agent runs on your machine.Anthropic coordinates the remote interface and model access.
Official self-hosted cloud runnersEligible Team/Enterprise beta.Anthropic control plane and model inference remain external.
Claude model weights and full offline inferenceNot offered through the documented Claude Code setup.You cannot turn a Claude subscription into a fully offline model server.
Recommended personal setup

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

DEVELOPMENTYour computerClaude Code, project files, Git, and test tools. Talks to the online model service.
VERSION HISTORYYour repositoryLocal Git plus a remote copy if wanted. GitHub, a private Git server, or another host.
APP HOSTINGYour home serverA reviewed release, app runtime, persistent data, backups, and private network access.

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.

Terminal on your home machine
claude remote-control

Connect 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

  1. Choose a maintained operating system supported by the tools you need. Install updates and create a normal, non-root working account.
  2. Set up administrative access on your private network. Prefer SSH keys. Confirm access before changing firewall rules so you do not lock yourself out.
  3. Install Git and the project’s documented runtime. Install Docker only if you choose a container-based deployment.
  4. Create separate directories for app code, configuration, persistent data, and backups. Keep credentials outside Git.
  5. Start with localhost or private access. Use a VPN for remote administration instead of directly exposing an admin terminal.
  6. 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:

File: 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:

File: compose.yaml
services:
  site:
    image: nginx:stable-alpine
    ports:
      - "127.0.0.1:8080:80"
    volumes:
      - ./public:/usr/share/nginx/html:ro
    restart: unless-stopped

Run these commands from that folder:

Terminal: inside home-site
docker compose config
docker compose up -d
docker compose ps
docker compose logs --tail=50

Open 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:

Terminal on your computer; replace both placeholders
ssh -L 8080:127.0.0.1:8080 YOUR-USER@YOUR-SERVER

Leave 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.

TaskCommand or action
Stop the exercisedocker compose down
Update the imageBack up, then docker compose pull and docker compose up -d; verify afterward.
Back up this exampleCopy public/ and compose.yaml to another device.
Make deployments reproducibleRecord 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:

Advanced operator setup; eligible organization required
claude self-hosted-runner setup

Use 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.

Was this chapter useful?

Report an error

Votes are shared only if you enable optional measurement in Privacy & Preferences.

CONTINUE THE GUIDEPermissions, privacy & cost

Edit this example

Changes here affect this copy only. Nothing runs from this site. Closing this window discards your edits.

Search the field guide

Search all chapters and FAQ answers. Use Tab to reach a result and Enter to open it.