# EchoHub Server Configuration
# Copy this file to .env and customize as needed:  cp .env.example .env
# These override appsettings.json via ASP.NET Core's configuration hierarchy.

# ── Server ───────────────────────────────────────────────────────────
Server__Name=My EchoHub Server
Server__Description=A self-hosted EchoHub chat server
Server__PublicServer=false
# Registration mode: open (default), invite (codes via /invite, Admin+), or closed.
# Server__Registration=open
# Hostnames advertised to the EchoHubSpace directory. Index per entry.
# Server__PublicHosts__0=echohub.example.com
# Server__PublicHosts__1=alias.example.com
# Topic tags surfaced in the EchoHubSpace browser. Index per entry.
# Server__Tags__0=community
# Server__Tags__1=gaming
# Server__Admins__0=adminUsername
# Override where the EchoHubSpace claim token file is stored (defaults next to the DB).
# Server__DirectoryClaimPath=

# ── JWT ──────────────────────────────────────────────────────────────
# Auto-generated on first run if left empty. Only set if you need a stable secret across containers.
# Jwt__Secret=
# Jwt__Issuer=EchoHub.Server
# Jwt__Audience=EchoHub.Client

# ── Encryption ───────────────────────────────────────────────────────
# Auto-generated on first run if left empty.
# Encryption__Key=
# Encryption__EncryptDatabase=false

# ── Storage ──────────────────────────────────────────────────────────
# Defaults are set in the Dockerfile to use /app/data for persistence.
# Storage__Path=
# Storage__CleanupIntervalHours=1
# Storage__RetentionDays=30

# ── Uploads ──────────────────────────────────────────────────────────
# Uploads__MaxFileSizeMB=100
# Uploads__MaxImageSizeMB=10
# Uploads__MaxAudioSizeMB=10
# Uploads__MaxAvatarSizeMB=2
# Uploads__MaxAttachmentsPerMessage=10

# ── Spam protection ──────────────────────────────────────────────────
# Per-user flood/duplicate limits with auto-mute escalation; Mods and above are exempt.
# Spam__Enabled=true
# Spam__MaxMessagesPerWindow=8
# Spam__WindowSeconds=5
# Spam__MaxDuplicateMessages=3
# Spam__AutoMuteMinutes=5
# Spam__ViolationThreshold=5
# Spam__ViolationWindowMinutes=5
# Only first-time channel joins count — keep this above your public channel count.
# Spam__MaxJoinsPerWindow=25
# Spam__JoinWindowSeconds=30
# Spam__MaxChannelCreatesPerWindow=3
# Spam__ChannelCreateWindowMinutes=10

# ── IRC Gateway ──────────────────────────────────────────────────────
Irc__Enabled=false
# Irc__Port=6667
# Irc__TlsEnabled=false
# Irc__TlsPort=6697
# Irc__TlsCertPath=
# Irc__TlsCertPassword=
# Irc__ServerName=echohub
# Irc__Motd=Welcome to EchoHub IRC Gateway!
# Public base URL used to make attachment links absolute for IRC clients.
# Irc__PublicBaseUrl=https://chat.example.com

# ── CORS ─────────────────────────────────────────────────────────────
# Leave unset to allow all origins. Index per entry to whitelist.
# Cors__AllowedOrigins__0=https://chat.example.com

# ── Logging ──────────────────────────────────────────────────────────
# Serilog__MinimumLevel__Default=Information

# ── Server logs room ─────────────────────────────────────────────────
# Read-only system channel that live-streams Serilog events to Mod+ users.
# ServerLogs__Enabled=true
# ServerLogs__RoomName=server-logs
# ServerLogs__MinRole=Mod
# ServerLogs__MinLevel=Information
# ServerLogs__BacklogLines=100
# ServerLogs__LogDirectory=logs
# ServerLogs__LogFilePattern=echohub-server-*.log

# ── Periodic stats report ────────────────────────────────────────────
# Aggregate activity snapshot logged as JSON and persisted to the DB.
# Stats__Enabled=true
# Stats__IntervalHours=6
# Stats__RetentionDays=90
