Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
51 lines (47 loc) · 2.41 KB
/
Copy path.env.example
File metadata and controls
51 lines (47 loc) · 2.41 KB
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
# Copy to .env (chmod 600). Read by `npm run dev` / `npm start` and by docker compose.
# --- Server ---
# Port for `npm run dev` / `npm start`, and the host port Docker publishes.
PORT=18320
# Host interface Docker publishes PORT on. 127.0.0.1 keeps it on loopback (the tailnet uses the
# tailscale sidecar instead); 0.0.0.0 also exposes it on the LAN.
BIND_ADDR=127.0.0.1
# Extra hostnames to allow (comma separated). localhost, IPs, *.ts.net and *.local are always
# allowed; `*` disables the host check.
ALLOWED_HOSTS=
# Set to 443 when the dev server sits behind `tailscale serve` HTTPS.
HMR_CLIENT_PORT=
# --- CLIProxyAPI ---
# Where CLIProxyAPI listens. Leave unset for the defaults: http://127.0.0.1:8317 for `npm run dev` /
# `npm start`, and http://host.docker.internal:8317 (the Docker host) under docker compose.
# CPA_URL=http://127.0.0.1:8317
# CLIProxyAPI management key (`remote-management.secret-key` / MANAGEMENT_PASSWORD). The collector
# uses it to read the usage queue; you sign in to the UI with the same key. Never commit it.
CPA_MANAGEMENT_KEY=
# Accept a self-signed certificate when CPA_URL is https.
CPA_TLS_INSECURE=false
# --- Collector and storage ---
# Where the SQLite database lives (docker compose mounts ./data at /data).
DATA_DIR=./data
# Delete requests older than this many days. 0 keeps history forever.
RETENTION_DAYS=0
# auto (RESP subscribe, HTTP queue fallback) | resp | http | off
COLLECTOR_MODE=auto
COLLECTOR_POLL_MS=1000
COLLECTOR_BATCH=500
# Turn on CLIProxyAPI's usage-statistics-enabled if it is off (nothing is published otherwise).
AUTO_ENABLE_USAGE_STATISTICS=true
# Also record requests CLIProxyAPI rejected before they reached a credential (e.g. "unknown
# provider for model"), which never reach the usage queue. Read from CLIProxyAPI's log, so it needs
# `logging-to-file: true` and `request-log: true` there. Empty = on unless COLLECTOR_MODE=off.
COLLECT_ROUTING_FAILURES=
ROUTING_FAILURE_POLL_MS=5000
# How often to refresh model prices from models.dev / LiteLLM / OpenRouter. 0 disables auto-sync.
PRICE_SYNC_INTERVAL_HOURS=24
ANALYTICS_WORKERS=2
LOG_LEVEL=info
# --- Tailscale sidecar (docker compose service `tailscale`) ---
# Machine name on the tailnet: https://<TS_HOSTNAME>.<tailnet>.ts.net
TS_HOSTNAME=cpa-usage
# Reusable or one-off auth key from the Tailscale admin console. Only needed for the first join;
# the node identity is then kept in ./tailscale/state. Never commit it.
TS_AUTHKEY=