RepositoryPythonESSpain
guillevc

guillevc/yubal

Self-hosted YouTube Music downloader. Tags, organizes, and keeps playlists in sync.

1.8kstars
69forks
40issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: metadata

#1 Repository of the week

1
TINIX TRENDING·Topic: playlist

#1 Repository of the week

2
TINIX TRENDING·Topic: music-downloader

#2 Repository of the week

yubal

Self-hosted YouTube Music downloader. Paste a link, get a tagged, organized library.

Scheduled sync. Smart deduplication. Media server ready. Browser extension included.

CI Release Firefox Add-on Chrome Extension Docker codecov

yubal demo

📖 How It Works

Downloading music is easy. Organizing it is the hard part.

yubal takes a YouTube Music URL and produces a clean, tagged music library:

data/
├── Pink Floyd/
│   └── 1973 - The Dark Side of the Moon/
│       ├── 01 - Speak to Me.opus
│       ├── 01 - Speak to Me.lrc
│       ├── 02 - Breathe.opus
│       ├── 02 - Breathe.lrc
│       └── cover.jpg
│
├── Radiohead/
│   └── 1997 - OK Computer/
│       ├── 01 - Airbag.opus
│       ├── 01 - Airbag.lrc
│       ├── 02 - Paranoid Android.opus
│       ├── 02 - Paranoid Android.lrc
│       └── cover.jpg
│
└── _Playlists/
    ├── My Favorites [n2g-XhDv].m3u
    └── My Favorites [n2g-XhDv].jpg

When downloading a playlist, each track lives in its album folder; the M3U file references it:

#EXTM3U
#EXTINF:239,Pink Floyd - Breathe
../Pink Floyd/1973 - The Dark Side of the Moon/02 - Breathe.opus
#EXTINF:386,Radiohead - Paranoid Android
../Radiohead/1997 - OK Computer/02 - Paranoid Android.opus

✨ Features

  • Web UI — Real-time progress, job queue, works on mobile
  • Albums, playlists & tracks — Paste any YouTube Music link, get organized files
  • Scheduled sync — Subscribe to playlists; new tracks appear in your library automatically
  • Smart deduplication — Same track across 10 playlists? Stored once, referenced everywhere
  • Reliable downloads — Automatic retry on failures, graceful cancellation
  • Automatic lyrics — Synced .lrc files for karaoke-style playback in supported players
  • ReplayGain tagging — Track gain for consistent volume; album gain when downloading complete albums
  • Format options — opus (best quality/size), mp3, or m4a — direct download when available, transcoded otherwise
  • Media server ready — Tested with Navidrome, Jellyfin, and Gonic
  • CLI — Download and inspect metadata from the terminal

🧩 Browser Extension

Download tracks and subscribe to playlists directly from YouTube and YouTube Music without leaving the page.

Track view Playlist view Settings view

Get the add-on for Firefox Chrome manual install

More info in the extension's README.md.

🚀 Quick Start

# compose.yaml
services:
  yubal:
    image: ghcr.io/guillevc/yubal:latest
    container_name: yubal
    ports:
      - 8000:8000
    environment:
      PUID: 1000
      PGID: 1000
      YUBAL_SCHEDULER_CRON: "0 0 * * *"
      YUBAL_DOWNLOAD_UGC: false
      YUBAL_TZ: UTC
    volumes:
      - ./data:/app/data
      - ./config:/app/config
    restart: unless-stopped

[!TIP] Volume permissions: Set PUID/PGID to match your host user (run id to check). This also ensures compatibility with podman rootless. If /app/data is an NFS/Unraid mount that does not allow chown, make sure it is already writable by the configured PUID/PGID.

docker compose up -d
# Open http://localhost:8000

Unraid? Use the community Docker template by @SerpentDrago (unraid forum thread).

⚙️ Configuration

VariableDescriptionDefault (Docker)
PUIDUser ID for file ownership1000
PGIDGroup ID for file ownership1000
YUBAL_AUDIO_FORMATopus, mp3, or m4aopus
YUBAL_AUDIO_QUALITYTranscode quality (0=best, 10=worst)0
YUBAL_SCHEDULER_ENABLEDEnable automatic scheduled synctrue
YUBAL_SCHEDULER_CRONCron schedule for auto-sync0 0 * * *
YUBAL_FETCH_LYRICSFetch lyrics from lrclib.nettrue
YUBAL_YTMUSIC_LYRICS_FALLBACKFall back to YouTube Music lyrics on lrclib misstrue
YUBAL_DOWNLOAD_UGCDownload user-generated content to _Unofficial/false
YUBAL_REPLAYGAINApply track gain; album gain for complete albumstrue
YUBAL_JOB_TIMEOUT_SECONDSJob execution timeout in seconds1800
YUBAL_BASE_PATHURL base path for reverse proxy subfolder—
YUBAL_TZTimezone (IANA format)UTC
All options
VariableDescriptionDefault (Docker)
YUBAL_HOSTServer bind address127.0.0.1
YUBAL_PORTServer port8000
YUBAL_DATAMusic library output/app/data
YUBAL_CONFIGConfig directory/app/config
YUBAL_LOG_LEVELDEBUG, INFO, WARNING, ERRORINFO
YUBAL_ASCII_FILENAMESTransliterate unicode to ASCIIfalse
YUBAL_CORS_ORIGINSAllowed CORS origins["*"]
YUBAL_TEMPTemp directorySystem temp

🔌 Media Server Integration

Tested with Navidrome, Jellyfin, and Gonic. Artists link correctly, even on tracks with multiple artists.

ServerArtist linkingPlaylists
Navidrome✅ Works out of the box✅
Jellyfin⚙️ Enable "Use non-standard artists tags" in library settings✅
Gonic⚙️ Set GONIC_MULTI_VALUE_ARTIST=multi❌

✅ Supported · ⚙️ Requires configuration · ❌ Not supported

[!TIP] Recommended stack: yubal + Navidrome gives you a self-hosted music streaming setup. Add a client like Symfonium (Android), Amperfy or Arpeggi (iOS), or Supersonic (desktop) to listen anywhere.

Detailed setup guides

No configuration required. Optionally, make imported playlists public:

ND_DEFAULTPLAYLISTPUBLICVISIBILITY=true

See Navidrome docs.

Jellyfin

For multi-artist support:

  1. Dashboard → Libraries → Music Library → Manage Library
  2. Check Use non-standard artists tags
  3. Save and rescan

Gonic

For artist linking:

GONIC_MULTI_VALUE_ARTIST=multi
GONIC_MULTI_VALUE_ALBUM_ARTIST=multi

M3U playlists are not supported (pending PR).

🍪 Cookies (Optional)

Need age-restricted content, private playlists, your Liked Music (list=LM), or Premium quality? Add your cookies:

  1. Export https://www.youtube.com/ cookies with a browser extension (yt-dlp guide)
  2. Place at config/ytdlp/cookies.txt or upload via the web UI

[!CAUTION] Cookie usage may trigger stricter rate limiting and could put your account at risk. See #3 and yt-dlp wiki.

🗺️ Roadmap

  • Flat folder mode
  • Post-download webhooks
  • New music automatic discovery
  • Browser extension (v0.7.0)
  • UGC tracks — remixes, unofficial content (v0.5.0)
  • Auto-sync playlists (v0.4.0)
  • Automatic lyrics (.lrc) (v0.3.0)
  • Single track downloads (v0.3.0)
  • Playlist support with M3U generation (v0.2.0)

💜 Support

yubal is free, open-source, and built by one person. If it saves you time, consider supporting development:

ko-fi Sponsor BTC

A ⭐ also helps others find the project!

📈 Star History

Star History Chart

🙏 Acknowledgments

Built with yt-dlp and ytmusicapi.

Thanks to everyone who's starred, shared, reported bugs, suggested features, or supported the project 💝

License

MIT


For personal archiving only. Comply with YouTube's Terms of Service and applicable copyright laws.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

212.4k
Dec 2, 2026
RepositoryPython
harry0703/MoneyPrinterTurbo

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

147.3k
Dec 1, 2026
RepositoryPython
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

87.1k
Dec 27, 2025
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.6k
Nov 13, 2026
RepositoryPython
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

192.6k
Nov 27, 2026
RepositoryJavaScript
louislam/uptime-kuma

A fancy self-hosted monitoring tool

95.1k
Nov 30, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

212.9k
Dec 2, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026