Repository Public
1# Music SP — configuration. Copy to .env (never committed) and fill in. No real secret belongs in this file.23# ── Site ─────────────────────────────────────────────────────────────────────4# Public origin, exactly as typed in the browser. WebAuthn checks it byte for byte.5APP_URL=https://music.spboucher.ai6# WebAuthn RP ID. Defaults to the host of APP_URL (music.spboucher.ai): passkeys are then bound to this site only.7# Set to a registrable parent (spboucher.ai) only if passkeys must be shared with other sub-domains.8# Changing it later invalidates every enrolled passkey.9#WEBAUTHN_RP_ID=music.spboucher.ai10# 32+ random characters: openssl rand -base64 4811APP_SECRET=12PORT=86901314# ── Owner (first administrator, created by scripts/bootstrap.ts) ─────────────15OWNER_EMAIL=16OWNER_NAME=17# Where the one-time enrolment link of the owner is written (mode 0600) while no passkey exists.18SETUP_URL_FILE=/Users/CHANGE_ME/data/sp-music/setup-url.txt1920# ── Database (metadata only) ─────────────────────────────────────────────────21DATABASE_URL=postgres://spmusic_app:CHANGE_ME@127.0.0.1:5432/sp_music2223# ── Private library storage ──────────────────────────────────────────────────24# local = a directory on the node's volume. (An S3-compatible driver would implement src/server/storage.ts.)25STORAGE_DRIVER=local26# Mount point of the library. Must NOT be inside the application directory or any web root.27STORAGE_ROOT=/Users/CHANGE_ME/data/sp-music/library28# Scratch space for uploads in progress (default: $STORAGE_ROOT/.tmp, same volume → atomic moves).29#TMP_DIR=3031# ── Upload limits ────────────────────────────────────────────────────────────32UPLOAD_MAX_FILE_MB=204833# Size of one request body; keep it at or below the reverse proxy's body limit.34UPLOAD_MAX_CHUNK_MB=1635# Files in progress at the same time (and audio files per archive).36UPLOAD_MAX_FILES=50037# Total library size allowed, in GB. 0 = no quota.38LIBRARY_QUOTA_GB=039ARCHIVE_MAX_ENTRIES=200040ARCHIVE_MAX_TOTAL_MB=2048041ARCHIVE_MAX_RATIO=10042# Retention: finished or failed import records (and abandoned upload data) are purged after this many days.43UPLOAD_RETENTION_DAYS=304445# ── Playback renditions ──────────────────────────────────────────────────────46# auto = AAC rendition at import for formats some browsers cannot decode (ALAC, AIFF, Ogg), and on demand.47# never = originals only.48RENDITIONS=auto49RENDITION_BITRATE_KBPS=25650# DSD (DSF/DFF) originals are always kept. Set to true to also produce a playable AAC rendition.51TRANSCODE_DSD=false52#FFMPEG_PATH=/opt/homebrew/bin/ffmpeg53#FFPROBE_PATH=/opt/homebrew/bin/ffprobe5455# ── Lyrics (optional, karaoke view) ──────────────────────────────────────────56# Speech-to-text runs on the node itself (mlx-whisper, Apple Silicon); no audio or text leaves the server.57# off = hidden · manual = an administrator asks for lyrics · auto = also queued for every new import58LYRICS=off59# Python of a virtualenv with mlx-whisper: uv venv ~/.venvs/whisper --python 3.12 && uv pip install -p ~/.venvs/whisper mlx-whisper60#LYRICS_PYTHON=/Users/CHANGE_ME/.venvs/whisper/bin/python61#LYRICS_MODEL=mlx-community/whisper-large-v3-turbo6263# ── Backups (scripts/backup.sh) ──────────────────────────────────────────────64BACKUP_DIR=/Users/CHANGE_ME/backups/sp-music65BACKUP_PASSPHRASE_FILE=/Users/CHANGE_ME/.config/sp-music/backup-passphrase66BACKUP_TRASH_DAYS=306768# Native apps allowed to use this site's passkeys (TeamID.bundleId, comma-separated). Default: SP Music for macOS and for iOS.69# APPLE_APP_IDS=3YM54G49SN.ai.spboucher.spmusic,3YM54G49SN.ai.spboucher.spmusic.ios70