You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/claude-code/README.md
+34-18Lines changed: 34 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,24 +51,40 @@ docker compose logs -f
51
51
docker compose down
52
52
```
53
53
54
-
## Configuration
54
+
## First Launch -- Interactive Login
55
55
56
-
### Authentication
56
+
Remote control mode requires an OAuth login (API keys are **not** supported). On first launch, you must attach to the container and complete the login flow:
57
57
58
-
You need **one**of the following:
58
+
1.**Start the container**(see Quick Start above).
59
59
60
-
| Variable | Description |
61
-
|----------|-------------|
62
-
|`ANTHROPIC_API_KEY`| Anthropic API key (charges API account) |
63
-
|`CLAUDE_CODE_OAUTH_TOKEN`| OAuth token for Claude Pro/Max subscription |
60
+
2.**Attach to the running container:**
61
+
```bash
62
+
docker attach claude-code
63
+
```
64
64
65
-
**API Key**is recommended for automation. Get one from [console.anthropic.com](https://console.anthropic.com/).
65
+
3.**Complete the OAuth login**-- the entrypoint will automatically run `claude login`. Follow the URL printed in the terminal to authenticate in your browser.
66
66
67
-
**OAuth Token** bills against your Claude subscription instead of API credits. Generate once on a trusted machine:
67
+
4.**After login succeeds**, press `Ctrl+C` to continue. The entrypoint will then launch `claude remote-control`.
68
68
69
-
```bash
70
-
claude setup-token
71
-
```
69
+
5.**Detach from the container** with `Ctrl+P` then `Ctrl+Q` (Docker's detach sequence). The container continues running in the background.
70
+
71
+
Subsequent container restarts will use the persisted credentials and skip the login step entirely.
72
+
73
+
## Credential Storage
74
+
75
+
Claude Code stores its credentials in these locations inside the container:
|`/home/node/.claude.json`| Account metadata and onboarding state |
81
+
|`/home/node/.claude/`| Full config directory (credentials, settings, history) |
82
+
83
+
To persist credentials across container restarts, a volume is mounted at `/home/node/.claude` (the `claude_config` volume in docker-compose.yml).
84
+
85
+
The image pre-seeds `/home/node/.claude.json` with onboarding state so Claude Code does not prompt for initial setup.
86
+
87
+
## Configuration
72
88
73
89
### Git Repository
74
90
@@ -105,15 +121,15 @@ The deploy key is base64-encoded so it fits on a single line in the `.env` file.
105
121
106
122
On first start, if `GIT_REPO` is set and `/workspace` is empty, the entrypoint clones the repository. On subsequent restarts the existing clone is reused.
107
123
108
-
Without a deploy key, the service still works for general Claude Code usage — git features are simply unavailable.
124
+
Without a deploy key, the service still works for general Claude Code usage -- git features are simply unavailable.
109
125
110
126
### Optional Settings
111
127
112
128
| Variable | Default | Description |
113
129
|----------|---------|-------------|
114
130
|`ANTHROPIC_MODEL`|*(Claude default)*| Override the default model |
115
131
|`CLAUDE_PERMISSION_MODE`|`acceptEdits`| Permission mode for `remote-control` (see below) |
The `INIT_COMMAND` variable lets you install additional tools into the container on first boot. It runs once and is tracked via a stamp file in the Claude home volume, so it won't re-run on subsequent container restarts.
153
+
The `INIT_COMMAND` variable lets you install additional tools into the container on first boot. It runs once and is tracked via a stamp file in the Claude config volume, so it won't re-run on subsequent container restarts.
0 commit comments