Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
217 lines (192 loc) · 8.05 KB
/
Copy path.env.example
File metadata and controls
217 lines (192 loc) · 8.05 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
209
210
211
212
213
214
215
216
217
# OwnPilot Configuration
# Copy this file to .env and fill in your values
#
# API keys (OpenAI, Anthropic, etc.) and channel tokens (Telegram)
# are NOT configured here — use the Config Center UI after setup.
# ===========================================
# Server
# ===========================================
PORT=8080
UI_PORT=8199
HOST=127.0.0.1
NODE_ENV=development
# Additional CORS origins (auto-includes http://localhost:UI_PORT)
# CORS_ORIGINS=https://my-domain.com
# Max request body size in bytes (default: 1MB)
# BODY_SIZE_LIMIT=1048576
# ===========================================
# Database (PostgreSQL)
# ===========================================
# These defaults match docker-compose.yml so both paths work out of the box.
#
# Option 1: Full connection URL (overrides individual settings)
# DATABASE_URL=postgresql://ownpilot:ownpilot_secret@localhost:25432/ownpilot
# Option 2: Individual settings
# For "From Source" dev: 127.0.0.1 + exposed port 25432
# For Docker: docker-compose.yml hardcodes host=postgres, port=5432 internally
# Note: use 127.0.0.1 (not "localhost") — on Windows localhost may resolve to ::1
# while Docker publishes the port on IPv4 only, causing silent connection failures.
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=25432
POSTGRES_USER=ownpilot
POSTGRES_PASSWORD=ownpilot_secret
POSTGRES_DB=ownpilot
# POSTGRES_POOL_SIZE=10
# DB_VERBOSE=false
# ===========================================
# Authentication (DB is primary, env is fallback)
# ===========================================
# Default: api-key. Set AUTH_TYPE=none only for local development.
# AUTH_TYPE=api-key
# API_KEYS=your-secret-key-here
# JWT_SECRET=
# ===========================================
# Rate Limiting (DB is primary, env is fallback)
# ===========================================
# RATE_LIMIT_DISABLED=false
# RATE_LIMIT_WINDOW_MS=60000
# RATE_LIMIT_MAX=500
# ===========================================
# MQTT / Edge Devices (optional)
# ===========================================
# Required only when starting the bundled broker with `--profile mqtt`.
# Generate a strong password, then point the gateway at the Compose service:
# MQTT_BROKER_URL=mqtt://mosquitto:1883
# MQTT_USERNAME=ownpilot
# MQTT_PASSWORD=
# MQTT_PORT=1883
# MQTT_WS_PORT=9001
# ===========================================
# Security & Encryption
# ===========================================
# Required in production for OAuth token encryption (32 bytes hex)
# ENCRYPTION_KEY=
# Data-at-rest encryption key for stored service configs (Config Center
# API keys etc.). Any string works — the AES key is derived via SHA-256.
# If unset, a key is auto-generated at <data>/credentials/data-encryption.key
# on first run. Losing the key (or changing this value) makes existing
# encrypted configs unreadable — they must be re-entered.
# OWNPILOT_ENCRYPTION_KEY=
# Escape hatch: write service configs as plaintext (reads still decrypt)
# OWNPILOT_DISABLE_DATA_ENCRYPTION=0
# Admin API key for debug endpoints (production only)
# ADMIN_API_KEY=
# ===========================================
# Data Storage
# ===========================================
# Override the platform-specific data directory
# Default: ~/.local/share/ownpilot (Linux), ~/Library/Application Support/ownpilot (macOS),
# %LOCALAPPDATA%/ownpilot (Windows)
# OWNPILOT_DATA_DIR=
# ===========================================
# Logging
# ===========================================
LOG_LEVEL=info
# ===========================================
# Debug (development only)
# ===========================================
# DEBUG_AI_REQUESTS=false
# DEBUG_AGENT=false
# DEBUG_LLM=false
# DEBUG_RAW_RESPONSE=false
# ===========================================
# SECURITY ESCAPE HATCHES
# ===========================================
# Every flag in this section is OFF by default and DISABLES a protection when
# enabled. They exist for legitimate local-development and self-hosting cases,
# but each one widens the attack surface. Enable deliberately, one at a time,
# and prefer narrowing the need instead.
#
# NOTE ON VALUES: most flags below activate on the exact string "true".
# OWNPILOT_ALLOW_LOCAL_EXEC is the exception — it activates on "1" and ignores
# "true". Check the comment on each line.
# --- Network egress (SSRF guards) ---
# Allow LLM base URLs that resolve to private/loopback addresses.
# Needed for local model servers (Ollama, LM Studio, vLLM). Bypasses the SSRF
# guard for the provider request path only.
# OWNPILOT_ALLOW_LOCAL_LLM_URL=true
#
# Same, for the embedding service base URL.
# OWNPILOT_ALLOW_LOCAL_EMBEDDING_URL=true
# --- Code execution ---
# Allow agent code execution to run on the HOST instead of the Docker sandbox.
# Agent-generated code then runs with the gateway process's own privileges.
# Activates on "1" — NOT on "true".
# OWNPILOT_ALLOW_LOCAL_EXEC=1
#
# Drop the hardening applied to the Docker sandbox container.
# DOCKER_SANDBOX_RELAXED_SECURITY=true
#
# Require human approval before each local execution. Default false.
# Turning this ON is a hardening step, not an escape hatch.
# LOCAL_EXEC_REQUIRE_APPROVAL=true
#
# Languages permitted for local execution. Default: javascript,python,shell
# LOCAL_EXEC_LANGUAGES=javascript,python,shell
# LOCAL_EXEC_TIMEOUT=30000 # ms, default 30000
# LOCAL_EXEC_MAX_OUTPUT=1048576 # bytes, default 1 MiB
# EXECUTION_MODE= # docker | local | auto
# --- Filesystem reach ---
# Allow agent file tools to read/write the user's home directory.
# ALLOW_HOME_DIR_ACCESS=true
#
# Allow coding agents to operate in ANY directory, not just allowlisted ones.
# OWNPILOT_CODING_AGENT_ANY_DIR=true
#
# Host filesystem mapping for containerised deployments (path translation only).
# OWNPILOT_HOST_FS=
# OWNPILOT_HOST_FS_HOST_PREFIX=
# --- Extension / skill execution ---
# Allow installed skills to run shell scripts.
# OWNPILOT_ENABLE_SKILL_SCRIPTS=true
#
# Allow extension tools to reach host resources from their sandbox.
# OWNPILOT_ENABLE_EXTENSION_HOST_ACCESS=true
# --- Error disclosure ---
# In production, internal error details are suppressed in API responses.
# Setting this returns raw error messages to clients — debugging only.
# EXPOSE_INTERNAL_ERRORS=true
#
# Serve the OpenAPI docs UI in production (always on outside production).
# ENABLE_API_DOCS=true
# --- Proxy / transport trust ---
# Trust X-Forwarded-For / X-Real-IP for client IP and scheme. Enable ONLY when
# the gateway sits behind a proxy you control — otherwise clients can spoof
# their own IP, defeating rate limiting and audit attribution.
# TRUSTED_PROXY=true
#
# Redirect HTTP to HTTPS and enable HSTS. Requires TLS termination in front.
# HTTPS_ONLY=true
# HTTPS_PORT=8443
# ===========================================
# Auth tuning
# ===========================================
# One-time token for first-run UI bootstrap (initial password set).
# BOOTSTRAP_TOKEN=
# JWT_MAX_TOKEN_AGE=7d # default 7d
# JWT_CLOCK_TOLERANCE_SEC=30 # default 30
# Shared secret for the inbound email webhook. Unset = endpoint fails closed.
# EMAIL_WEBHOOK_SECRET=
# ===========================================
# Operational tuning
# ===========================================
# Database
# DB_STATEMENT_TIMEOUT_MS=30000 # default 30000
# DB_IDLE_TX_TIMEOUT_MS=60000 # default 60000
# DB_BACKUP_TIMEOUT_MS=900000 # default 900000 (15 min)
# DB_KEEPALIVE=true # default true; set "false" to disable
#
# Inbound channel flood guard (Telegram/Discord/etc.)
# CHANNEL_INBOUND_RATE_LIMIT_MAX=20 # default 20
# CHANNEL_INBOUND_RATE_LIMIT_WINDOW_MS=60000 # default 60000
#
# Memory hashing salt — changing this invalidates existing derived keys.
# MEMORY_SALT=your-random-salt-here
#
# Extra provider stream logging (very verbose).
# OWNPILOT_DEBUG_STREAM=1
# DEBUG_EXEC_SECURITY=true
# Note: provider API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, DEEPSEEK_API_KEY,
# COMPOSIO_API_KEY, cloud credentials, …) are intentionally NOT listed here.
# They are managed through the Config Center UI and stored encrypted at rest.
# Env fallbacks exist for headless setups but the UI is the supported path.