Configuration & Storage
Pluvira uses a human-readable YAML file (config.yaml) stored in /app/data/config.yaml to govern server settings, playlist acquisition schedules, streaming health thresholds, and security parameters.
1. Default Configuration File (config.yaml)
server: host: "0.0.0.0" port: 8585 workers: 1 cors_origins: ["*"]
storage: data_dir: "/app/data" ram_disk_dir: "/dev/shm/pluvira" min_ram_disk_free_mb: 64
auth: enabled: false jwt_secret: "auto-generated-on-first-run" session_ttl_hours: 720
scanner: concurrency: 20 timeout_seconds: 5 auto_purge_quarantine_days: 7 health_penalty_offline: 30
epg: retention_days: 7 update_interval_hours: 12 search_methods: relevance_scoring: true stop_words: true diacritics_normalization: true time_aware_boost: true2. Parameter Reference
Server Settings (server)
host(string): Listening network interface (0.0.0.0binds to all local interfaces).port(integer): Internal HTTP port (default:8585).cors_origins(list of strings): Allowed origins for WebUI and external API access.
Storage Architecture (storage)
data_dir(string): Persistent path storing database WAL files and user rules.ram_disk_dir(string): High-speed RAM disk mount (/dev/shm/pluvira).min_ram_disk_free_mb(integer): Threshold below which temporary caches are automatically purged.
Scanner & Health Engine (scanner)
concurrency(integer): Number of parallel streams checked during health scans.timeout_seconds(integer): Connection timeout for probing stream viability.auto_purge_quarantine_days(integer): Number of days before quarantined dead streams are permanently removed.health_penalty_offline(integer): Score deduction applied when a stream fails all 3 player retry attempts.
3. Relational Storage Engine (SQLite WAL)
Pluvira isolates operations across four dedicated SQLite databases located in /app/data/:
| Database File | Purpose | Concurrency Model |
|---|---|---|
pluvira_main.db | Channel catalogs, “My List” definitions, source configurations, rewrite rules. | SQLite WAL (Write-Ahead Logging) |
pluvira_epg.db | EPG TV guide schedules, program descriptions, start/end timestamps. | SQLite WAL |
pluvira_link_status.db | Stream reachability metrics, latency, HTTP response codes, health scores. | SQLite WAL |
pluvira_history.db | Execution logs and historical acquisition metrics (capped to 100 entries). | SQLite WAL |
4. Atomic File Operations
All configuration serialization uses a safe write-then-rename pattern (FileManager.atomic_write):
- Configuration is written to a PID-isolated temporary file (
.temp_config.yaml.<PID>). - An atomic operating system
os.replacereplaces the destination file. - Guarantees zero file corruption even during unexpected host power loss or container crashes.