Skip to content

Configuration

The bot is configured through config.py (a Python file, not .env). This page explains every setting in plain English.


Where's the config file?

bash
# In your WZML-X folder:
cp config_sample.py config.py   # Create it
nano config.py                   # Edit it

Python syntax rules:

  • Strings need quotes: "hello"
  • Numbers don't: 42
  • Booleans are capitalized (no quotes): True, False
  • Lists use brackets: ["a", "b"]
  • Dicts use braces: {"key": "value"}

After editing, restart: docker compose restart


Required (bot won't start without these)

VariableWhat it is
BOT_TOKENYour bot's token from @BotFather
OWNER_IDYour Telegram user ID (from @userinfobot)
TELEGRAM_APIAPI ID from my.telegram.org
TELEGRAM_HASHAPI hash from my.telegram.org
DATABASE_URLMongoDB connection string

Upload destinations

VariableWhat it doesDefault
DEFAULT_UPLOADDefault upload target: "gd" (Google Drive) or "rc" (Rclone)"rc"
GDRIVE_IDDefault Google Drive folder ID for uploads""
GD_DESPDescription text for Google Drive uploads"Uploaded with WZ Bot"
IS_TEAM_DRIVESet to True if your GDrive ID is a Team DriveFalse
STOP_DUPLICATESkip upload if file already exists in GDriveFalse
INDEX_URLYour Google Drive index URL for shareable links""
USE_SERVICE_ACCOUNTSUse Google Service Accounts for higher quotaFalse
RCLONE_PATHDefault Rclone remote path (e.g., "main:folder")""
RCLONE_FLAGSExtra Rclone flags ("key:value|key")""
SHOW_CLOUD_LINKShow cloud link button on leeched filesTrue
RCLONE_SERVE_URLPublic URL for Rclone serve""
RCLONE_SERVE_PORTPort for Rclone serve0
RCLONE_SERVE_USERUsername for Rclone serve auth""
RCLONE_SERVE_PASSPassword for Rclone serve auth""

Leech settings (uploading to Telegram)

VariableWhat it doesDefault
LEECH_SPLIT_SIZEMax file size per part in bytes (Telegram limit is ~2GB)0 (max allowed)
AS_DOCUMENTUpload all files as documents (not media)False
EQUAL_SPLITSSplit into equal-sized partsFalse
MEDIA_GROUPGroup split parts as a media albumFalse
USER_TRANSMISSIONUse user account for leech tasksTrue
HYBRID_LEECHUse bot + user for faster leechingTrue
LEECH_PREFIXText added before filename""
LEECH_SUFFIXText added after filename""
LEECH_FONTFont style: "b", "i", "u", "s", "code", "spoiler"""
LEECH_CAPTIONCustom caption text for leeched files""
THUMBNAIL_LAYOUTThumbnail layout format (e.g., "1280x720")""
LEECH_DUMP_CHATChat ID where all leeched files are dumped""

Limits & queue

VariableWhat it doesDefault
STATUS_LIMITMax tasks shown in /status10
STATUS_UPDATE_INTERVALHow often the status message refreshes (seconds)15
QUEUE_ALLMax total parallel tasks (download + upload)0 (unlimited)
QUEUE_DOWNLOADMax parallel downloads0 (unlimited)
QUEUE_UPLOADMax parallel uploads0 (unlimited)
BOT_MAX_TASKSMax tasks per user (across all users)0 (unlimited)
USER_MAX_TASKSMax concurrent tasks per user0 (unlimited)
USER_TIME_INTERVALCooldown between tasks per user (seconds)0 (disabled)
STORAGE_LIMITMin free disk space to maintain (GB). Downloads cancel if exceeded0 (disabled)

Per-engine limits (size in GB, 0 = unlimited)

VariableLimits
DIRECT_LIMITDirect link downloads
MEGA_LIMITMega downloads
TORRENT_LIMITTorrent downloads
GD_DL_LIMITGoogle Drive downloads
RC_DL_LIMITRclone downloads
CLONE_LIMITGoogle Drive clone operations
JD_LIMITJDownloader downloads
NZB_LIMITUsenet (NZB) downloads
YTDLP_LIMITyt-dlp downloads
PLAYLIST_LIMITMax items from a playlist
LEECH_LIMITLeech (Telegram upload) size
EXTRACT_LIMITExtracted file size
ARCHIVE_LIMITArchive (zip) size
RSS_SIZE_LIMITRSS download size

User access control

VariableWhat it does
AUTHORIZED_CHATSUser/Chat IDs allowed to use the bot (space-separated)
SUDO_USERSUser IDs with admin powers (space-separated)
FORCE_SUB_IDSChannel/Group IDs users must join before using (space-separated)
BOT_PMForce files/links to be sent via bot PM
VERIFY_TIMEOUTVerification timeout in seconds
LOGIN_PASSPassword to skip verification (leave empty to disable)

Web UI

VariableWhat it doesDefault
BASE_URLPublic URL for torrent file selection web UI""
WEB_PINCODERequire a pincode to access the web UITrue
WEB_ACCESS_PASSWORDSecret for deriving web passwords"" (auto-generated)

Appearance

VariableWhat it doesDefault
TIMEZONETimezone for timestamps"Asia/Kolkata"
DEFAULT_LANGBot language code"en"
AUTHOR_NAMEAuthor name shown on Telegraph pages"WZML-X"
AUTHOR_URLAuthor link"https://t.me/WZML_X"
USE_IMAGESEnable random photo backgrounds on messagesFalse
IMG_SEARCHComma-separated keywords to auto-fetch wallpapers""
IMG_PAGENumber of pages to search for images1
IMG_SOURCESImage source sites: ["wallpaperflare"]["wallpaperflare"]
IMDB_TEMPLATEHTML template for IMDB search results(built-in)
COLORED_BTNSUse colored inline buttonsFalse

Feature toggles

Set True to disable a feature:

VariableWhat it disables
DISABLE_TORRENTSAll torrent downloads
DISABLE_LEECHAll leech tasks
DISABLE_BULKBulk (zip/unzip) operations
DISABLE_MULTIMulti-part splits
DISABLE_SEEDSeeding after torrent download
DISABLE_FF_MODEFFmpeg processing
DISABLE_MEGAMega downloads

Download engines

qBittorrent / Aria2

VariableWhat it doesDefault
TORRENT_TIMEOUTDead torrent timeout (seconds)0 (disabled)

BASE_URL and WEB_PINCODE are documented under Web UI above.

JDownloader

VariableWhat it does
JD_EMAILJDownloader account email
JD_PASSJDownloader account password

Sabnzbd (Usenet)

VariableWhat it does
USENET_SERVERSList of usenet server configs (dicts)
HYDRA_IPNZBHydra API IP address for Usenet search
HYDRA_API_KEYNZBHydra API key for Usenet search

Mega

VariableWhat it does
MEGA_EMAILMega account email
MEGA_PASSWORDMega account password
DISABLE_MEGADisable Mega entirely

Filename & processing

VariableWhat it does
NAME_SWAPRename files using pattern: "old:new|old2:new2"
FFMPEG_CMDSCustom FFmpeg command presets (dict format)
UPLOAD_PATHSCustom upload paths per file extension (dict format)
EXCLUDED_EXTENSIONSFile extensions to skip (space-separated, no dots)
CMD_SUFFIXText appended to all commands (e.g., "x"/mirrorx)
SET_COMMANDSAuto-register bot commands with Telegram on start

Debrid & DDL services

VariableWhat it does
FILELION_APIFileLion API key
STREAMWISH_APIStreamWish API key
DEBRID_LINK_APIDebrid-Link API key
GOFILE_APIGofile.io API token
GOFILE_FOLDER_IDGofile.io folder ID
PIXELDRAIN_KEYPixelDrain API key
PROTECTED_APIProtectedFiles API key
BUZZHEAVIER_APIBuzzHeavier API key
DEVUPLOADS_KEYDevUploads API key
DEVUPLOADS_FOLDERDevUploads folder ID
VIKINGFILE_HASHVikingFile.to hash
VIKINGFILE_FOLDERVikingFile.to folder ID
INSTADL_APIInstagram downloader API key

RSS

VariableWhat it doesDefault
RSS_DELAYCheck interval in seconds600
RSS_CHATDefault chat ID for RSS notifications""
RSS_SIZE_LIMITRSS download size limit (GB)0

VariableWhat it does
SEARCH_API_LINKSearch API app URL for multi-search
SEARCH_LIMITMax results per site
SEARCH_PLUGINSList of qBittorrent search plugin URLs

Logging

VariableWhat it does
MIRROR_LOG_IDChat ID for mirror logs
LINKS_LOG_IDChat ID for link logging
LEECH_DUMP_CHATChat ID where leeched files are dumped
CLEAN_LOG_MSGAuto-clean log messages
MEDIA_STOREStore media metadata for re-upload
DELETE_LINKSAuto-delete source links on task start

Updates

VariableWhat it doesDefault
UPSTREAM_REPOYour GitHub fork URL for auto-updates""
UPSTREAM_BRANCHBranch to track for updates"master"
UPDATE_PKGSUpdate pip packages on restartTrue

Advanced / Hyper TG Downloader

VariableWhat it doesDefault
HELPER_TOKENSAdditional bot tokens for parallel task handling""
USER_SESSION_STRINGPyrogram session string for user account tasks""
HYPER_THREADSNumber of parallel download parts0 (auto)
HYPER_PIPELINEConcurrent GetFile requests per part32
HYPER_CHUNKDownload chunk size (bytes)262144
TG_PROXYSOCKS5 proxy for Telegram: {"scheme": "socks5", "hostname": "...", "port": 1234}{}
INC_TASK_NOTIFYNotify about incomplete tasks on restartFalse
INC_TASK_RESUMEAuto-resume incomplete tasks on restartFalse

YouTube upload settings

VariableWhat it doesDefault
YT_DESPDescription for YouTube uploads"Uploaded with WZML-X bot"
YT_TAGSTags for YouTube uploads["telegram", "bot", "youtube"]
YT_CATEGORY_IDYouTube category ID22
YT_PRIVACY_STATUSPrivacy: "public", "unlisted", or "private""unlisted"
YT_DLP_OPTIONSDefault yt-dlp options ("key:value|key:value")""