Files
smirk-backend-core/examples/community/.env.example
T
jwinterm a455c60ed0 docs: operator console guide + fix example recipes + document all env vars
- New docs/operations/CONSOLE.md: reaching /admin, NIP-98 login, the
  defaults->env->DB precedence model, per-section runtime-safe vs
  restart-required table, expected_versions concurrency, restart_apply_mode
  (with the systemd Restart=always requirement for auto), clearing a DB
  override. Linked from README + OPERATOR_SETUP.
- All six example recipes gained an explicit chain-enablement block
  (FEATURE_XMR/WOW on, BTC/LTC/GRIN off) so they no longer hard-fail
  Config::validate in production (default-on chains with empty sources).
- Documented all 16 previously-undocumented env vars in .env.example
  (RESTART_APPLY_MODE, TOR_ADMIN_ONION, DEPLOYMENT_MODE, TIP_SHARE_BASE_URL,
  ...); RELAY.md gained the premium-post policy + RELAY_WRITE_ALLOWLIST_NPUBS;
  ADMIN_PUBKEYS noted as reserved/inert.
2026-07-19 15:52:07 -04:00

68 lines
2.6 KiB
Bash

# ── Recipe: community ────────────────────────────────────────────────────────
# A gated space for a named project / community: invite-only registration plus a
# relay that ONLY your registered members may publish to (author-allowlist). A
# members-only Nostr space with its own DM inbox.
#
# ⚠️ Running a relay hosts user content — see ../LEGAL_AND_OPS.md.
#
# Start from ../../.env.example and apply the lines below. openssl rand -hex 32
# for each secret.
# ─────────────────────────────────────────────────────────────────────────────
SERVER_HOST=127.0.0.1
SERVER_PORT=8080
# REQUIRED: replace with YOUR real https domain. The your-domain.example placeholder
# is rejected at boot in production (Nostr identity is on by default).
PUBLIC_API_URL=https://api.your-domain.example/api/v1
ENVIRONMENT=production
DATABASE_URL=postgresql:///smirk?host=/var/run/postgresql
JWT_SECRET=
SEED_FINGERPRINT_PEPPER=
REFRESH_TOKEN_PEPPER=
IP_SALT=
# ALTCHA_HMAC_KEY — only needed if you set FEATURE_POW=true (this recipe leaves PoW off).
ALTCHA_HMAC_KEY=
ADMIN_KEY_INTEGRITY_SECRET=
# Invite-only membership (mint codes with `smirk-admin mint-invite`).
POW_REQUIRED=false
REGISTRATION_REQUIRE_INVITE=true
REGISTRATION_REQUIRE_PAYMENT=false
WALLET_RESTORE_POLICY=unlimited
FEATURE_PRICES=true
FEATURE_TIPS=false
# Relay on, members-only: only registered members may publish anything.
RELAY_ENABLED=true
RELAY_MODE=bundled
RELAY_URL=wss://relay.your-domain.example
RELAY_WRITE_POLICY=author-allowlist
RELAY_INBOUND_POW_BITS=0
RELAY_ADMISSION_BIND=127.0.0.1:8090
# ── Chains: enable ONLY what this recipe wires up ────────────────────────────
# FAIL-CLOSED RULE: in production, an ENABLED chain with no source configured makes
# the server REFUSE TO BOOT. Every FEATURE_* chain defaults to true, so this recipe
# turns off the chains it does not wire up. It wires up Monero + Wownero (the
# XMR_/WOW_ blocks below); fill their *_LWS_ADMIN_KEY and it boots. To add BTC/LTC
# (electrum URL) or GRIN (GRIN_OWNER_API_SECRET + wiring), configure the source
# first, THEN flip its flag to true.
FEATURE_XMR=true
FEATURE_WOW=true
FEATURE_BTC=false
FEATURE_LTC=false
FEATURE_GRIN=false
# Chain endpoints — see ../../.env.example.
XMR_LWS_URL=
XMR_LWS_ADMIN_URL=
XMR_LWS_ADMIN_KEY=
XMR_DAEMON_URL=
WOW_LWS_URL=
WOW_LWS_ADMIN_URL=
WOW_LWS_ADMIN_KEY=
WOW_DAEMON_URL=