Fix deploy.sh step counter and document auth token retrieval

- Renumber deploy.sh steps from [1/5]-[4/5] to [1/4]-[4/4] (step 5 was removed)
- Add 'Finding Your Auth Token' section to README.md explaining how to
  retrieve the authToken from config.json on mini-server
This commit is contained in:
William Stuckey
2026-03-26 18:31:04 -05:00
parent e84f17efdb
commit e1572a69c6
2 changed files with 21 additions and 4 deletions
+17
View File
@@ -127,6 +127,23 @@ ai.example.com {
## Client Configuration ## Client Configuration
### Finding Your Auth Token
The proxy auth token is the `authToken` value in `config.json` on the server where the proxy runs. To retrieve it:
```bash
ssh mini-server "node -e \"console.log(JSON.parse(require('fs').readFileSync('/home/harrison/ai-proxy/config.json','utf-8')).authToken)\""
```
Or just SSH in and read the file directly:
```bash
ssh mini-server
cat ~/ai-proxy/config.json | grep authToken
```
This is the token you'll use in all client configurations below.
### Claude Code CLI ### Claude Code CLI
Add to `~/.claude/settings.json`: Add to `~/.claude/settings.json`:
+4 -4
View File
@@ -25,7 +25,7 @@ if [ ! -f "$PROXY_DIR/config.json" ]; then
exit 1 exit 1
fi fi
echo "[1/5] Config found." echo "[1/4] Config found."
# --- Step 2: Generate auth token if still default --- # --- Step 2: Generate auth token if still default ---
AUTH_TOKEN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$PROXY_DIR/config.json','utf-8')).authToken)") AUTH_TOKEN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$PROXY_DIR/config.json','utf-8')).authToken)")
@@ -40,10 +40,10 @@ if [ "$AUTH_TOKEN" = "CHANGE_ME_TO_A_LONG_RANDOM_STRING" ]; then
exit 1 exit 1
fi fi
echo "[2/5] Auth token is set." echo "[2/4] Auth token is set."
# --- Step 3: Test the proxy locally --- # --- Step 3: Test the proxy locally ---
echo "[3/5] Testing proxy startup..." echo "[3/4] Testing proxy startup..."
source "$HOME/.nvm/nvm.sh" source "$HOME/.nvm/nvm.sh"
timeout 5 node "$PROXY_DIR/proxy.mjs" & timeout 5 node "$PROXY_DIR/proxy.mjs" &
PROXY_PID=$! PROXY_PID=$!
@@ -66,7 +66,7 @@ else
fi fi
# --- Step 4: Install systemd service --- # --- Step 4: Install systemd service ---
echo "[4/5] Installing systemd service..." echo "[4/4] Installing systemd service..."
sudo cp "$PROXY_DIR/$SERVICE_NAME.service" "/etc/systemd/system/$SERVICE_NAME.service" sudo cp "$PROXY_DIR/$SERVICE_NAME.service" "/etc/systemd/system/$SERVICE_NAME.service"
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable "$SERVICE_NAME" sudo systemctl enable "$SERVICE_NAME"