db123 609237f4e3
All checks were successful
CI / build (push) Successful in 52s
fix: resolve 8 architecture flaws across download, playlist, and webhook
- Add --continue and --max-filesize to yt-dlp for download resilience
- Route thumbnail downloads through HTTP_PROXY
- Show per-video progress (i/N) with cancel for playlist downloads
- Run playlist asynchronously so cancel callbacks can be processed
- Guard handlePlaylistConfirm against concurrent active jobs
- Close Done channel in playlist entry lifecycle
- Add stepState TTL (30 min) to prevent stale states
- Wrap webhook server for graceful shutdown on SIGTERM
- Refactor formatBytes to loop-based implementation
- Show first line of stderr in user-facing error messages
- Fix format pointer reuse in playlist loop
- Add CreatedAt field to stepState for TTL tracking
- Add MaxFileSize and ProgressPrefix fields to DownloadJob
2026-06-26 01:04:34 +03:30

uptodownbot

Telegram bot for downloading media from any site yt-dlp supports.

Features

  • Download audio, video, or combined audio+video from YouTube, Spotify, SoundCloud, Vimeo, and hundreds more
  • Search support: search YouTube/YouTube Music by name when no URL is provided
  • DRM fallback: automatically searches YouTube when Spotify/DRM-protected content is detected
  • Thumbnail preview with metadata (title, uploader, duration) before download
  • Audio-only sites (Spotify, SoundCloud, YouTube Music, etc.) auto-detect and skip to audio quality selection
  • Multi-step format selection: quality, secondary format (audio/video combine), language
  • Playlist support with paginated entry selection (10 per page, select all, confirm with count)
  • Download progress updates (with speed and ETA)
  • Cancel downloads at any time (terminates yt-dlp process)
  • Per-user quota system (daily, weekly, monthly; 0 = unlimited)
  • User preferences (default audio/video quality, language)
  • Download history with pagination
  • Configurable file size limit (default 50 MB)
  • Cookies support for age-restricted content
  • Proxy support via HTTP_PROXY/HTTPS_PROXY env vars
  • Webhook and polling modes
  • SQLite database for persistence

Commands

  • /start - Show main menu
  • /download - Prompt for a download URL
  • /settings - Open settings
  • /help - Show help text
  • /history - View download history

You can also send a URL directly to start downloading immediately.

Configuration

Copy .env.example to .env and configure:

Variable Default Description
BOT_TOKEN (required) Telegram Bot API token
HTTP_PROXY empty Outbound HTTP proxy
HTTPS_PROXY empty Outbound HTTPS proxy
DB_PATH data/uptodown.db SQLite database path
DOWNLOAD_DIR /tmp/uptodown Temporary download directory
MAX_FILE_SIZE_MB 50 Maximum upload file size in MB
COOKIES_FILE empty Path to cookies.txt for auth
TZ UTC Timezone
BOT_ALLOWED_USERS empty Comma-separated allowed user IDs
BOT_WEBHOOK_URL empty Webhook URL (omit for polling)
BOT_LISTEN :8080 Webhook listen address
BOT_TLS_CERT empty TLS certificate path
BOT_TLS_KEY empty TLS key path

Running

Polling mode (default)

cp .env.example .env
# edit .env with your BOT_TOKEN
make run-dev

Webhook mode

export BOT_WEBHOOK_URL=https://your.domain.com/webhook
make run-dev

Docker

make docker-run

Development

make build      # build binary
make test       # run tests
make fmt        # format code
make vet        # vet code
make check      # fmt + vet
Description
No description provided
Readme 493 KiB
Languages
Go 99%
Dockerfile 0.7%
Makefile 0.3%