# ============================================================================ # CG.CX Default Configuration # ============================================================================ # Copy this file to config/local.toml and override values there. # Environment variables prefixed with CGCX__ also override these values. # Example: CGCX_TELEGRAM__BOT_TOKEN=your_token # ============================================================================ # ---------------------------------------------------------------------------- # Content settings # ---------------------------------------------------------------------------- [content] # Whether to keep content files on disk after deletion/blacklisting. # If false, files are physically deleted when content is removed. keep_content = true # Share mode: "b" = blacklist mode (allow unless blacklisted) # "w" = whitelist mode (deny unless whitelisted) share_mode = "b" # Default download permission for new uploads. default_allow_download = true # Default max views before auto-destruction. Omit or comment out for no limit. # default_max_views = 10 # ---------------------------------------------------------------------------- # Cryptography # ---------------------------------------------------------------------------- [crypto] # Master key source. The master key is used to wrap per-file content keys. # Options: # { type = "file", path = "data/master.key" } -- auto-generates if missing # { type = "env", var = "CGCX_AES_MASTER_KEY" } -- reads from env var # # File-based is recommended for first setup because it auto-generates. aes_master_key_source = { type = "file", path = "data/master.key" } # ---------------------------------------------------------------------------- # Telegram Bot # ---------------------------------------------------------------------------- [telegram] # Bot token from @BotFather. REQUIRED. bot_token = "BOT_TOKEN_PLACEHOLDER" # Optional: local Bot API server URL for files > 20MB. # Leave commented if using default Telegram servers. # api_url = "http://localhost:8081" # ---------------------------------------------------------------------------- # Telegram Groups # ---------------------------------------------------------------------------- [groups] # Group IDs where admin commands (/reload, /blacklist_uid, /whitelist_uid) work. # Negative IDs for supergroups. Example: [-1001234567890] admin_group_ids = [] # Group IDs where reported content is forwarded for moderator review. review_group_ids = [] # ---------------------------------------------------------------------------- # Storage Paths # ---------------------------------------------------------------------------- [storage] # Directory layout for encrypted files. paths = { media = "./data/media", documents = "./data/documents", text = "./data/text", temp = "./data/temp" } # Chunk size for streaming upload/download. Clamped to [8 MiB, 256 MiB]. chunk_size_bytes = 33_554_432 # = 32 MiB, 67_108_864 = 64 MiB # ---------------------------------------------------------------------------- # Upload Limits # ---------------------------------------------------------------------------- [upload_limits] # Maximum number of files per content entry. max_batch_size = 40 # Maximum size of a single file (bytes). max_file_size_bytes = 838_860_800 # 800 MiB # Maximum total size of all files in one batch (bytes). max_total_batch_bytes = 2_147_483_648 # = 2 GiB, 5_368_709_120 = 5 GiB # ---------------------------------------------------------------------------- # HTTP Server # ---------------------------------------------------------------------------- [server] # Public base URL used in share links. MUST match your reverse proxy / TLS. base_url = "https://cg.cx" # Bind address and port for the Axum server. bind_address = "127.0.0.1" port = 8080 # ---------------------------------------------------------------------------- # Rate Limiting # ---------------------------------------------------------------------------- [rate_limiting] # General API requests per minute (per IP). requests_per_minute = 60 # Burst capacity for token bucket. burst = 10 # Password attempt limit per minute (per content ID). password_attempts_per_minute = 5 # ---------------------------------------------------------------------------- # Logging # ---------------------------------------------------------------------------- [logging] # Log level: trace, debug, info, warn, error level = "info" # ---------------------------------------------------------------------------- # Frontend Behavior Toggles # ---------------------------------------------------------------------------- [frontend.behavior_toggles] # Enable retro CRT-style loading animation. enable_retro_animation = true # Enable floating particle background (desktop only). enable_particles = true