# Copy to .env and fill in. The core reads .env from its working directory # and never overrides variables that are already set in the environment. # Structured settings can also live in a TOML file, see config.example.toml. # --- Telegram --------------------------------------------------------------- # Token from @BotFather. Required. BOT_TOKEN= # Bot API root. Point it at a local Bot API server to send files up to 2 GB. TELEGRAM_API_URL=https://api.telegram.org # polling (default) or webhook. TELEGRAM_MODE=polling # Public HTTPS base URL of this server. Only for webhook mode. Telegram will # call /telegram/webhook. WEBHOOK_URL= # Random string Telegram echoes back in a header. Only for webhook mode. WEBHOOK_SECRET= # Largest file the bot can send, in MB. 50 on the cloud Bot API. TELEGRAM_MAX_UPLOAD_MB=50 # Goroutines that handle updates. TELEGRAM_UPDATE_WORKERS=8 # Telegram user IDs allowed to use owner commands, comma separated. OWNER_IDS= # --- HTTP ------------------------------------------------------------------- # Listen address of the health endpoint and the webhook. HTTP_LISTEN=:8080 # --- Database --------------------------------------------------------------- # sqlite or postgres. DB_DRIVER=sqlite # File path for sqlite, connection URL for postgres. DB_DSN=data/dlbot.db # --- Storage ---------------------------------------------------------------- # local or s3. STORAGE_BACKEND=local STORAGE_LOCAL_DIR=data/files # --- Worker ----------------------------------------------------------------- # Run a download worker inside the core process. WORKER_EMBEDDED=true # Downloads running at the same time. WORKER_CONCURRENCY=2 # Scratch space for downloads. Each worker process needs its own directory. WORKER_TEMP_DIR=data/tmp YTDLP_PATH=yt-dlp FFMPEG_PATH=ffmpeg # Hard cap for one download attempt. DOWNLOAD_TIMEOUT=30m # Cap for one metadata lookup, and how many may run at once. PROBE_TIMEOUT=45s PROBE_CONCURRENCY=4 # --- Queue ------------------------------------------------------------------ # Most queued jobs accepted from free users. QUEUE_FREE_MAX_LEN=20 # A claimed job goes back to the queue when no heartbeat arrives for this long. QUEUE_LEASE=30s QUEUE_HEARTBEAT=10s # Tries per job. 2 means one automatic retry. QUEUE_MAX_ATTEMPTS=2 # --- Free tier limits ------------------------------------------------------- FREE_MAX_SIZE_MB=50 FREE_MAX_DURATION=10m FREE_ACTIVE_JOBS=1 # --- Logging ---------------------------------------------------------------- # debug, info, warn or error. LOG_LEVEL=info # json or text. LOG_FORMAT=json