File size: 3,287 Bytes
e45e71c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ── Server ───────────────────────────────────────────────────────────────────
# PORT=8080
# Hugging Face Spaces: the wrapper listens on :7860 and proxies to the upstream app.
# Minimum HF Secrets: CLAUDE_SESSION_KEYS, CLAUDE_API_KEY, ADMIN_PASS.
# DB/Redis are not required for HF Simple mode.

# ── Mode ─────────────────────────────────────────────────────────────────────
# Simple mode: set CLAUDE_SESSION_KEYS to skip PostgreSQL entirely.
# Separate multiple keys with commas.
# CLAUDE_SESSION_KEYS=sk-ant-sid01-xxx,sk-ant-sid01-yyy

# ── PostgreSQL ────────────────────────────────────────────────────────────────
# Used by both the claude2api service and the postgres container.
DB_HOST=postgres
DB_PORT=5432
DB_USER=claude2api
DB_PASS=change_me_please        # ← REQUIRED: set a strong password
DB_NAME=claude2api

# ── Redis ─────────────────────────────────────────────────────────────────────
# REDIS_PASS must match the password set in docker-compose.yml (redis container).
REDIS_PASS=redis_secret         # ← REQUIRED: set a strong password
REDIS_URL=redis://:redis_secret@redis:6379/0   # keep in sync with REDIS_PASS

# ── Residential Proxy (leave empty to connect directly) ───────────────────────
PROXY_HOST=
PROXY_PORT=3010
PROXY_USER=
PROXY_PASS=
PROXY_REGION=US

# ── Admin Dashboard ───────────────────────────────────────────────────────────
# ADMIN_PASS is a startup input. Even if upstream runtime lets you change some settings
# in the admin UI, that does not mean Hugging Face Secrets or this file were updated.
# Verified against the current upstream image in Simple mode: API key changes can take
# effect in-process, but restart falls back to env/Secrets, and admin password is not
# currently exposed here as a durable runtime setting.
ADMIN_USER=admin
ADMIN_PASS=change_me_please     # ← REQUIRED: change before going live

# ── Rate Limiting ─────────────────────────────────────────────────────────────
CLAUDE_DAILY_LIMIT=0    # 0 = unlimited
MAX_RETRIES=3
COOLDOWN_MINUTES=5

# ── API Key Protection (optional) ─────────────────────────────────────────────
# Startup default for protected API routes. If changed from the upstream admin UI,
# the new value may apply only to the current running process unless upstream-backed
# persistence is configured and verified.
# CLAUDE_API_KEY=sk-your-api-key