# Copy to .env and fill in. docker compose reads it automatically. chmod 600 .env # ── Auth ──────────────────────────────────────────────── # Client keys, comma-separated. Empty = no auth, **only acceptable while # listening on localhost** — this service fronts a whole pool of Cursor # accounts you paid for; leaving it open hands the quota to everyone. CSPK_CLIENT_KEYS=sk-give-this-to-clients # Admin password (status page / hot reload / account enable-disable). # Empty = reuse the client keys above, letting clients see how many accounts # you have and whose emails they are. CSPK_ADMIN_KEY= # ── Pool ──────────────────────────────────────────────── # Accounts list file. Changes apply without a restart: POST /admin/reload or # click "Reload" on the status page. CSPK_ACCOUNTS=/data/accounts.json # How many accounts one client request may cycle through. If 3 don't work it # is almost certainly a mass outage; further switching just wastes time. CSPK_MAX_ACCOUNT_ATTEMPTS=3 # Probe interval (ms). Uses Cursor.me() — read-only, no run, no quota cost. # 0 = fetch identity once at startup, no periodic probing. CSPK_PROBE_INTERVAL_MS=1800000 # ── Tiered cooldowns (hot-reloadable: PUT /admin/config, no restart) ── # 429 short cooldown: base x consecutive-429 count (5s→10s→15s…), capped at max. # Must be short — long cooldowns self-inflict whole-pool 503s on small pools. CSPK_COOLDOWN_429_BASE_MS=5000 CSPK_COOLDOWN_429_MAX_MS=90000 # 5xx upstream jitter: fixed short cooldown. CSPK_COOLDOWN_5XX_MS=30000 # Auth failure (session-level, the kind probing can't verify): long window, # auto-retried once it expires. CSPK_COOLDOWN_AUTH_MS=600000 # ── Behaviour ─────────────────────────────────────────── # Prefix for public model names. Empty = Cursor's model ids as-is # (claude-opus-5 and friends). CSPK_PREFIX= # Allow "subagent-spawning" tools (Task / subagent / *_agent). # Off by default: 5 subagents in one turn = 6 billings, and the client can't # see where the money went. CSPK_ALLOW_SUBAGENTS=false # How long a turn may go without any event (ms). Measures "no activity", not # "total duration". CSPK_TURN_IDLE_TIMEOUT_MS=600000 # How long to wait for the client to return a tool result (ms). They may be # waiting for the user to approve an action; be generous. CSPK_TOOL_RESULT_TIMEOUT_MS=600000 CSPK_HOST=0.0.0.0 CSPK_PORT=8008 CSPK_WORKSPACE=/work CSPK_LOG_LEVEL=info # Upstream HTTP proxy (e.g. http://127.0.0.1:10808). Required for domestic # deployments: Cursor gates inference streams by egress region and the SDK # ignores the system proxy — configure it here explicitly. CSPK_PROXY= # Per-model default parameters (JSON): auto-appended when the client sends a # bare model name, e.g. the Claude Code scenario # CSPK_MODEL_DEFAULTS={"claude-opus-5":"[1m]","claude-sonnet-5":"[1m]"} CSPK_MODEL_DEFAULTS=