Skip to content

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: true

2. Parameter Reference

Server Settings (server)

  • host (string): Listening network interface (0.0.0.0 binds 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 FilePurposeConcurrency Model
pluvira_main.dbChannel catalogs, “My List” definitions, source configurations, rewrite rules.SQLite WAL (Write-Ahead Logging)
pluvira_epg.dbEPG TV guide schedules, program descriptions, start/end timestamps.SQLite WAL
pluvira_link_status.dbStream reachability metrics, latency, HTTP response codes, health scores.SQLite WAL
pluvira_history.dbExecution 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):

  1. Configuration is written to a PID-isolated temporary file (.temp_config.yaml.<PID>).
  2. An atomic operating system os.replace replaces the destination file.
  3. Guarantees zero file corruption even during unexpected host power loss or container crashes.