# defter configuration. Every setting is also a `defter start` flag
# (see `defter start --help`); environment variables are read when the flag is
# not given.
# ── Server ───────────────────────────────────────────────────────────────────
DEFTER_HOST=127.0.0.1
DEFTER_PORT=8189
# The address clients reach the server at (your reverse proxy), no trailing
# slash. Login, upload and download links are built on it.
DEFTER_PUBLIC_URL=https://zotero.example.org
# Database, generated API key and (without S3) attachment files.
DEFTER_DATA_DIR=/var/lib/defter
# DEFTER_DB=/var/lib/defter/defter.sqlite3
# ── Library ──────────────────────────────────────────────────────────────────
DEFTER_USER_ID=1
DEFTER_USERNAME=defter
# ── API keys ─────────────────────────────────────────────────────────────────
# Comma-separated rw:/ro: token files. Without any key setting, a read/write
# key is generated in $DEFTER_DATA_DIR/api-key (print it with `defter key`).
# DEFTER_KEYS=rw:/run/credentials/defter/app-key,ro:/run/credentials/defter/cli-key
# DEFTER_API_KEY_FILE=/run/credentials/defter/app-key
# With SSO in front of /login, require this identity to approve logins.
# DEFTER_LOGIN_AUTHORIZED_USER=you@example.org
# ── Attachment storage (S3-compatible) ───────────────────────────────────────
DEFTER_S3_BUCKET=zotero
# Cloudflare R2: https://<account>.r2.cloudflarestorage.com, region auto.
# RustFS for development: http://127.0.0.1:9000
DEFTER_S3_ENDPOINT=https://<account>.r2.cloudflarestorage.com
DEFTER_S3_REGION=auto
DEFTER_S3_ACCESS_KEY_ID_FILE=/run/credentials/defter/s3-access-key-id
DEFTER_S3_SECRET_ACCESS_KEY_FILE=/run/credentials/defter/s3-secret-access-key
# DEFTER_S3_PREFIX=defter
# DEFTER_S3_VIRTUAL_HOSTED_STYLE=true
# Lifetime of pre-signed download URLs, in seconds.
# DEFTER_PRESIGN_TTL=300
# Stream downloads through defter when clients cannot reach the bucket.
# DEFTER_PROXY_DOWNLOADS=true
# DEFTER_MAX_UPLOAD_MB=1024
# Log filter (tracing EnvFilter syntax).
# RUST_LOG=defter=info