Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
208 lines (184 loc) · 9.32 KB
/
Copy path.env.example
File metadata and controls
208 lines (184 loc) · 9.32 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
PORT=3100
# Valid API keys for self-hosting without a database. These are ordinary keys:
# env grants a key existence, never authority. Every key is its own tenant and
# sees only its own browsers, providers, sessions, usage and audit trail.
API_KEYS=key1,key2
# Host-level controls that are not tenant data: the Prometheus scrape at
# /metrics, POST /api/operator/drain, and POST /api/fleet/provision (minting
# credentials). No API key can do these. Generate with: openssl rand -hex 32
# OYA_OPERATOR_TOKEN=
# Supabase, persistent key storage
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=eyJ...
# Cloudflare Turnstile captcha on sign-in and sign-up (the console reads the
# site key, the server checks tokens with the secret). Both unset = no captcha.
# TURNSTILE_SITE_KEY=
# TURNSTILE_SECRET_KEY=
# Fleet mode, set a single token that all browsers can use to auto-enroll.
# Every browser configured with this token as its API key will be accepted.
# FLEET_TOKEN=my-shared-secret
# Chat mode (optional)
OPENAI_API_KEY=sk-...
CHAT_MODEL=gpt-5.4
CHAT_MAX_ITERATIONS=200
# Cloud browsers, POST /browsers/provision launches sandboxed browsers that
# enroll over the normal WebSocket. All three are required to enable it.
# OYA_CLOUD_API_KEY=
# OYA_CLOUD_SNAPSHOT=oya-browser
# OYA_PUBLIC_WS_URL=wss://your-server.example.com/ws
# Optional
# OYA_CLOUD_API_URL=
# OYA_CLOUD_TARGET=us
# Idle stop / TTL for a provisioned sandbox, in minutes (default 60).
# OYA_CLOUD_SANDBOX_TTL_MINUTES=60
# ── CDP gateway ──
# Point Playwright, Puppeteer, Stagehand or browser-use at
# ws://host/connect?token=<api key>, discovery lives at /json/version.
# Providers the gateway routes to, as JSON:
# [{"name":"local","type":"cdp","wsUrl":"ws://127.0.0.1:9222/devtools/browser/…",
# "maxConcurrent":10,"priority":1}]
# type may also name a hosted provider (anchor, browserbase, steel), in which
# case its own API key below is used to open a session per connection.
# OYA_PROVIDERS=[]
# priority | round-robin | least-connections | latency | weighted
# OYA_ROUTING_STRATEGY=priority
# Each API key may override this for its own sessions from the dashboard.
# The host dials provider URLs that callers supply, so private and loopback
# addresses are refused by default, that is a server-side request forgery
# primitive on a shared deployment. Turn this on ONLY where every API key is
# yours, e.g. a laptop pointing at ws://127.0.0.1:9222. Link-local (cloud
# metadata) stays blocked either way.
# OYA_ALLOW_PRIVATE_TARGETS=false
# How long a session is held for a dropped client to resume against (ms).
# OYA_SESSION_GRACE_MS=60000
# Hosted CDP providers (optional)
# ANCHOR_API_KEY=
# BROWSERBASE_API_KEY=
# BROWSERBASE_PROJECT_ID=
# STEEL_API_KEY=
# Override a provider's endpoint/auth/response shape without a code change:
# OYA_BROWSER_PROVIDERS={"anchor":{"createUrl":"…","wsPath":["data.cdp_url"]}}
# ── Persistent profiles ──
# Required to store profiles. Generate with: openssl rand -hex 32
# OYA_PROFILE_SECRET=
# ── Session recording (opt-in per session with ?record=1) ──
# OYA_RECORD_MAX_FRAMES=1800
# OYA_RECORD_MAX_BYTES=104857600
# OYA_RECORD_QUALITY=40
# OYA_RECORD_EVERY_NTH=5
# ── Observability ──
# Lets a Prometheus scraper read /metrics without an admin key.
# OYA_METRICS_TOKEN=
# All server state (cookies, config, profiles, recordings, usage, audit).
# OYA_DATA_DIR=
# ── Rate limits (per API key; 0 disables) ──
# OYA_LIMIT_COMMANDS_PER_MIN=600
# OYA_LIMIT_COMMANDS_BURST=120
# OYA_LIMIT_CHAT_PER_MIN=60
# OYA_LIMIT_PROVISION_PER_MIN=20
# OYA_LIMIT_CONNECT_PER_MIN=120
# ── Quotas (0 or false disables) ──
# OYA_QUOTA_MAX_BROWSERS=5000
# Set to false to turn off "Chat token quota reached for this hour".
# OYA_QUOTA_CHAT_TOKENS_HOUR=2000000
# OYA_QUOTA_SANDBOXES_HOUR=500
# ── Personas ──
# A persona is one identity: fingerprint + cookie jar + proxy, bound together
# and stable. Rotation means picking a different persona, never giving one a
# new fingerprint.
# Concurrency cap for a named persona, one device, so a low number. A person
# has a phone and a laptop; a thousand simultaneous sessions from one device
# fingerprint is a signal no amount of stealth hides.
# OYA_PERSONA_MAX_CONCURRENT=2
# The per-key default persona is uncapped, so keys already running many
# browsers keep working. Set this to cap them too.
# OYA_DEFAULT_PERSONA_MAX_CONCURRENT=
# ── Proxies ──
# A proxy is part of a persona's identity: assigned once and kept, because an
# exit IP that changes mid-life looks like an account takeover.
# Register them through POST /api/proxies (credentials are encrypted at rest
# with OYA_PROFILE_SECRET). Note Chromium cannot authenticate SOCKS5 proxies,
# use http, or terminate auth locally.
# Residential proxy out of the box: every cloud-sandbox persona without its own proxy exits
# through this vendor gateway. {session} becomes a sticky id per persona (same
# IP across connects), {geo} its country (persona geo hint, else the default).
# Metered per key as residential_proxy_bytes, counted in the sandbox. Use http(s), not SOCKS5.
# OYA_RESIDENTIAL_PROXY_URL=http://user-country-{geo}-session-{session}:pass@gate.vendor.com:7000
# OYA_RESIDENTIAL_PROXY_GEO=US
# OYA_PROXY_CHECK_URL=https://api.ipify.org?format=json
# OYA_PROXY_CHECK_TIMEOUT_MS=10000
# ── CAPTCHA ──
# Hosted providers (Anchor, Browserbase, Steel, Browser Use) solve natively and
# are used as-is. For Oya Cloud, self-hosted and plain CDP, an external solver
# fills the gap. Without a key, a challenge is reported with solved:false and
# method:none rather than leaving an agent stuck.
# OYA_CAPTCHA_PROVIDER=capsolver
# OYA_CAPTCHA_API_KEY=
# OYA_CAPTCHA_TIMEOUT_MS=120000
# ── MFA ──
# Factors are configured per persona via PUT /api/personas/:id/mfa and encrypted
# at rest with OYA_PROFILE_SECRET. TOTP seeds are write-only: the API reports
# that a factor exists, never what it is. Email and SMS relays poll a URL you
# supply. When nothing can answer a challenge the session is handed to a person
# with a live-view link, which is also the only answer for push-approval MFA.
# ── Database ──
# Three backends, one contract. DATABASE_URL wins over Supabase, so a deployment
# moves off Supabase by setting one variable. With neither, state is SQLite in
# OYA_DATA_DIR, which allows exactly one writer, so exactly one replica.
# Apply the schema with: node server/migrations/run.mjs
# DATABASE_URL=postgres://user:pass@host:5432/oya
# Without Supabase there is no email sign-in: authenticate with API_KEYS above.
# ── Governed browser fleet ──
# The runtime behind provider `oya-selfhosted`. One container or pod per session,
# each with its own enrolment token and egress credentials, none of which ever
# sees the project API key.
# OYA_FLEET_RUNTIME=docker # docker | k8s
# Docker: an INTERNAL bridge network, so a browser cannot route anywhere the
# operator did not intend. Verification refuses a non-internal network.
# OYA_MANAGED_NETWORK=oya-browsers
# The image must carry the governance hooks (label ai.getoya.governance=1).
# On Kubernetes OYA_MANAGED_NETWORK names a NetworkPolicy instead, and the image
# must be pinned to a digest, a tag can be moved between verification and
# scheduling, and kubectl cannot read a registry image's labels.
# OYA_MANAGED_IMAGE=oya-browser:local
# OYA_MANAGED_CONTROL_URL=ws://server:3100/ws
# OYA_MANAGED_PROXY_URL=http://server:3128
# OYA_MANAGED_REGION=local
# OYA_K8S_NAMESPACE=oya-browsers
# OYA_K8S_CONTEXT=
# Docker daemon access is not granted automatically; no socket is mounted for you.
# ── Egress proxy ──
# Governed browsers are forced through this, which is what makes per-session
# allow-lists and budgets enforceable rather than advisory.
# OYA_EGRESS_PORT=3128
# OYA_EGRESS_HOST=127.0.0.1
# ── Multiple replicas ──
# Needs Postgres or Supabase: SQLite takes a PID lock and refuses a second writer.
# Every replica shares OYA_PROFILE_SECRET and OYA_CLUSTER_SECRET and has its own
# routable OYA_INSTANCE_URL. Requests landing on the wrong replica are proxied to
# the owner, signed with the cluster secret.
# OYA_INSTANCE_URL=http://10.0.0.5:3100
# OYA_CLUSTER_SECRET=
# Recordings must go to shared storage once there is more than one replica.
# OYA_RECORDING_BUCKET=
# ── Slack alerts ──
# A failed run, or one waiting on a person, posts to the channel a customer picks.
# Without these three, the console offers only the bring-your-own-bot path: a
# customer pastes a bot token from their own Slack app and everything else is the same.
# SLACK_CLIENT_ID=
# SLACK_CLIENT_SECRET=
# SLACK_SIGNING_SECRET=
# Where the console is reachable from someone else's machine. The live-browser link
# in a Slack message is read outside this process, so a relative URL is useless.
# Defaults to OYA_PUBLIC_WS_URL with its scheme swapped.
# OYA_CONSOLE_URL=https://console.example.com
# Product analytics and ops messages. Off unless set; see docs/self-hosting.md "Telemetry".
# Both PostHog values are needed, and there is no default host.
# POSTHOG_KEY=
# POSTHOG_HOST=
# SLACK_OPS_WEBHOOK_SIGNUPS=
# SLACK_OPS_WEBHOOK_EVENTS=
# One card per product event worth reading (sign-ups, first browser, sessions, playbooks), laid out like A2ABase's #posthog-events.
# SLACK_OPS_WEBHOOK_PRODUCT=
# RB2B visitor identification on the public pages (landing, docs, sign-in), never the console.
# RB2B_ID=