Files
Octop/.env.example
Momoru19 3b6502ca72 docs: fix CN readme structure and document OCTOP_DATA env var (#791)
- Restore missing 'Initialize' (octop init) step in README_CN.md Quick Start,
  which previously jumped from step 1 (Install) straight to a mislabeled
  step 2 (Run), skipping initialization entirely.
- Promote 15 headings in README_CN.md from H3 to H2 (Install options through
  Contributors) to match README.md's structure; they had drifted one level
  too deep, breaking the document outline/TOC for the second half of the
  Chinese README.
- Document OCTOP_DATA in .env.example. It is read by docker/docker-compose.yml
  to set the host bind-mount for /data/.octop but was missing from the env
  file that README points to as 'the full list'.
2026-09-19 20:45:16 +08:00

106 lines
5.9 KiB
Bash

# Octop Environment Variables
#
# Copy to deploy/.env or export before `docker compose up`.
# For bare-metal installs, many of these can also live in ~/.octop/env.
# Runtime
OCTOP_PORT=8088
OCTOP_LOG_LEVEL=info
OCTOP_BIND_HOST=0.0.0.0
# Docker Compose only: host directory bind-mounted to /data/.octop
# OCTOP_DATA=~/.octop
# Docker first-run bootstrap (only used when ~/.octop/octop.db is absent)
# Password must be ≥8 chars with letters and digits (same policy as change-password).
# Future: first boot may randomize this and write it to credential.txt instead.
OCTOP_ADMIN_USERNAME=admin
# First-run admin password; leave empty to auto-generate a random one (written to ~/.octop/credential.txt)
OCTOP_DEFAULT_PASSWORD=
OCTOP_ADMIN_DISPLAY_NAME=Admin
# Control-plane database (optional — default is SQLite under ~/.octop)
# For Docker Compose, also list these under `environment:` in docker-compose.yml
# (docker/.env only interpolates; it does not auto-inject into the container).
# Bare-metal / container data volume: same keys may live in ~/.octop/env.
# OCTOP_DATABASE_DRIVER=postgresql
# OCTOP_DATABASE_URL=postgresql://octop:octop@127.0.0.1:5432/octop
# OCTOP_DATABASE_HOST=127.0.0.1
# OCTOP_DATABASE_PORT=5432
# OCTOP_DATABASE_NAME=octop
# OCTOP_DATABASE_USER=octop
# OCTOP_DATABASE_PASSWORD=
# OCTOP_DATABASE_SQLITE_PATH=octop.db
# Common LLM provider credentials (optional — can configure in dashboard)
OPENAI_API_KEY=
DASHSCOPE_API_KEY=
# Langfuse observability (optional)
OCTOP_LANGFUSE_ENABLED=false
# Optional login captcha (boot snapshot; restart after changing).
# Default slider is dashboard-only. Strong providers need both keys.
# OCTOP_CAPTCHA_PROVIDER=slider
# OCTOP_CAPTCHA_SITE_KEY=
# OCTOP_CAPTCHA_SECRET=
# OCTOP_CAPTCHA_V3_MIN_SCORE=0.5
LANGFUSE_PUBLIC_KEY=
LANGFUSE_SECRET_KEY=
LANGFUSE_BASE_URL=
# ---------------------------------------------------------------------------
# Live integration tests (tests/live/*): REAL credentials.
#
# - Local : fill these into a gitignored repo-root `.env` (already loaded by
# tests/live/conftest.py via python-dotenv). Never commit real keys.
# - GitHub: add the matching Secret (right column) under
# Settings → Secrets and variables → Actions; the CI `live-tests`
# job maps each secret to the same env var name below.
#
# Missing any of these → the live tests auto-skip, so CI stays green.
# ---------------------------------------------------------------------------
# Local env var GitHub Secret (CI mapping)
OPENAI_API_KEY= # LIVE_OPENAI_API_KEY real LLM key for tests/live LLM cases
OPENAI_BASE_URL= # LIVE_OPENAI_BASE_URL e.g. https://api.openai.com/v1
OPENAI_MODEL_NAME= # LIVE_OPENAI_MODEL_NAME e.g. gpt-4o
# Object storage — Tencent COS and Aliyun OSS are both probed in one run.
# Each backend uses its own env-var prefix and auto-skips if absent.
# Use a DEDICATED test bucket; never reuse a production key/bucket.
OSS_KIND=cos # LIVE_OSS_KIND cos | s3 | oss | obs | custom
OSS_ENDPOINT= # LIVE_OSS_ENDPOINT host only, e.g. cos.ap-guangzhou.myqcloud.com (no https://)
OSS_ACCESS_KEY= # LIVE_OSS_ACCESS_KEY sub-account key scoped to the test bucket
OSS_SECRET_KEY= # LIVE_OSS_SECRET_KEY never reuse a production key
OSS_BUCKET= # LIVE_OSS_BUCKET dedicated *-test-* bucket, never production
OSS_REGION= # LIVE_OSS_REGION e.g. ap-guangzhou
OSS_PREFIX= # LIVE_OSS_PREFIX optional, e.g. octop-live/
# Aliyun OSS (separate prefix so it is probed alongside COS above)
ALI_OSS_KIND=oss # LIVE_ALI_OSS_KIND oss
ALI_OSS_ENDPOINT= # LIVE_ALI_OSS_ENDPOINT host only, e.g. oss-cn-beijing.aliyuncs.com (no https://)
ALI_OSS_ACCESS_KEY= # LIVE_ALI_OSS_ACCESS_KEY sub-account key scoped to the test bucket
ALI_OSS_SECRET_KEY= # LIVE_ALI_OSS_SECRET_KEY never reuse a production key
ALI_OSS_BUCKET= # LIVE_ALI_OSS_BUCKET dedicated *-test-* bucket, never production
ALI_OSS_REGION= # LIVE_ALI_OSS_REGION e.g. oss-cn-beijing
ALI_OSS_PREFIX= # LIVE_ALI_OSS_PREFIX optional, e.g. octop-live/
# Connectors (token / api_key based) — REAL keys; each auto-skips if absent.
# Excluded by design: notion (oauth2, browser auth), qq-mail (imap, real mailbox).
CONNECTOR_TENCENT_DOCS_TOKEN= # LIVE_CONNECTOR_TENCENT_DOCS_TOKEN tencent-docs personal token
CONNECTOR_TENCENT_MEETING_TOKEN= # LIVE_CONNECTOR_TENCENT_MEETING_TOKEN tencent-meeting token
CONNECTOR_TENCENT_WEIYUN_TOKEN= # LIVE_CONNECTOR_TENCENT_WEIYUN_TOKEN tencent-weiyun MCP token
CONNECTOR_YOUDAO_NOTE_TOKEN= # LIVE_CONNECTOR_YOUDAO_NOTE_TOKEN youdao-note API key
CONNECTOR_TENCENT_NEWS_TOKEN= # LIVE_CONNECTOR_TENCENT_NEWS_TOKEN tencent-news API key
CONNECTOR_WECHAT_READING_TOKEN= # LIVE_CONNECTOR_WECHAT_READING_TOKEN wechat-reading wrk- key
CONNECTOR_QQ_MUSIC_TOKEN= # LIVE_CONNECTOR_QQ_MUSIC_TOKEN qq-music qmk- key
CONNECTOR_FLIGGY_TOKEN= # LIVE_CONNECTOR_FLIGGY_TOKEN fliggy API key
CONNECTOR_BAIDU_MAP_TOKEN= # LIVE_CONNECTOR_BAIDU_MAP_TOKEN baidu-map sk-ap- token
CONNECTOR_CTRIP_WENDAO_TOKEN= # LIVE_CONNECTOR_CTRIP_WENDAO_TOKEN ctrip-wendao token
CONNECTOR_MEITUAN_TRAVEL_TOKEN= # LIVE_CONNECTOR_MEITUAN_TRAVEL_TOKEN meituan-travel token
CONNECTOR_YUANDIAN_TOKEN= # LIVE_CONNECTOR_YUANDIAN_TOKEN yuandian sk_ key
CONNECTOR_TENCENT_IMA_TOKEN= # LIVE_CONNECTOR_TENCENT_IMA_TOKEN tencent-ima API key
CONNECTOR_TENCENT_IMA_CLIENT_ID= # LIVE_CONNECTOR_TENCENT_IMA_CLIENT_ID tencent-ima client id
CONNECTOR_TENCENT_LEXIANG_TOKEN= # LIVE_CONNECTOR_TENCENT_LEXIANG_TOKEN tencent-lexiang API key
CONNECTOR_TENCENT_LEXIANG_COMPANY_FROM= # LIVE_CONNECTOR_TENCENT_LEXIANG_COMPANY_FROM lexiang company_from