Files
openagent/.env.example
Thomas Marchand 6389dccfc3 Add persistent settings storage for library_remote
Replace env-var-only LIBRARY_REMOTE configuration with disk-persisted
settings. The setting can now be edited in the dashboard Settings page,
with LIBRARY_REMOTE env var serving as initial default when no settings
file exists.

Changes:
- Add src/settings.rs for settings storage with JSON persistence
- Add src/api/settings.rs for settings API endpoints
- Update dashboard Settings page with editable library remote field
- Update library-unavailable component to link to Settings page
- Update documentation to recommend Settings page method
2026-01-17 18:01:23 +00:00

81 lines
3.5 KiB
Plaintext

# Open Agent - Environment Configuration
# Copy this file to .env and fill in your values.
# =============================================================================
# OpenCode Backend
# =============================================================================
OPENCODE_BASE_URL=http://127.0.0.1:4096
OPENCODE_PERMISSIVE=true
# Agent/model defaults are configured in OpenCode / oh-my-opencode.
# Avoid overriding them here unless you explicitly need to.
#
# Optional: set this to the same config directory used by the OpenCode service
# when running in strong skill isolation mode (see INSTALL.md).
# OPENCODE_CONFIG_DIR=/var/lib/opencode/.config/opencode
# Optional: abort stuck tools after N seconds (0 = disabled)
# TOOL_STUCK_ABORT_TIMEOUT_SECS=0
# =============================================================================
# Workspace + Library
# =============================================================================
WORKING_DIR=/root
LIBRARY_PATH=/root/.openagent/library
# Library remote URL - can also be configured via dashboard Settings page (preferred).
# This env var is used as the initial default when no settings file exists.
# LIBRARY_REMOTE=git@github.com:your-org/agent-library.git
# =============================================================================
# Server
# =============================================================================
HOST=0.0.0.0
PORT=3000
MAX_ITERATIONS=50
STALE_MISSION_HOURS=24
MAX_PARALLEL_MISSIONS=1
# =============================================================================
# Auth (JWT)
# =============================================================================
# Set DEV_MODE=false in production
DEV_MODE=true
DASHBOARD_PASSWORD=change-me
JWT_SECRET=change-me-to-a-long-random-string
JWT_TTL_DAYS=30
# Multi-user auth (optional, overrides DASHBOARD_PASSWORD)
# OPEN_AGENT_USERS='[{"username":"admin","password":"change-me","id":"admin"}]'
# =============================================================================
# Dashboard Console (local shell)
# =============================================================================
# No SSH configuration required.
# =============================================================================
# Optional: Web Search (Tavily)
# =============================================================================
# If not set, falls back to DuckDuckGo HTML (may be blocked by CAPTCHA)
# TAVILY_API_KEY=tvly-...
# =============================================================================
# Optional: Desktop Automation
# =============================================================================
# DESKTOP_ENABLED=true
# DESKTOP_RESOLUTION=1920x1080
# DESKTOP_DISPLAY=:101
# =============================================================================
# Optional: Secrets encryption (for stored secrets)
# =============================================================================
# OPENAGENT_SECRET_PASSPHRASE=change-me
# =============================================================================
# Template Env Vars Encryption
# =============================================================================
# Static AES-256-GCM key for encrypting env_vars in workspace templates.
# Format: 64 hex chars (32 bytes) or base64-encoded 32 bytes.
# If not set on first template save, a key will be auto-generated and appended.
# Encrypted values are stored as: <encrypted v="1">BASE64(nonce||ciphertext)</encrypted>
# Legacy plaintext values remain readable (backward compatible).
#
# PRIVATE_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef