[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70750":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},70750,"metube","alexta69\u002Fmetube","alexta69","Self-hosted video downloader for YouTube and other sites (web UI for youtube-dl \u002F yt-dlp)","",null,"Python",13817,990,48,131,0,32,110,321,96,43.99,"GNU Affero General Public License v3.0",false,"master",true,[27,28,29,30],"self-hosted","youtube","youtube-dl","yt-dlp","2026-06-12 02:02:42","# MeTube\n\n![Build Status](https:\u002F\u002Fgithub.com\u002Falexta69\u002Fmetube\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg)\n![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Falexta69\u002Fmetube.svg)\n\nMeTube is a self-hosted web UI for `yt-dlp`, for downloading media from YouTube and [dozens of other sites](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp\u002Fblob\u002Fmaster\u002Fsupportedsites.md).\n\nKey capabilities:\n* Download videos, audio, captions, and thumbnails from a browser UI.\n* Download playlists and channels, with configurable output and download options.\n* Subscribe to channels and playlists, periodically check for new items, and queue new uploads automatically.\n\n![screenshot1](https:\u002F\u002Fgithub.com\u002Falexta69\u002Fmetube\u002Fraw\u002Fmaster\u002Fscreenshot.gif)\n\n## 🐳 Run using Docker\n\n```bash\ndocker run -d -p 8081:8081 -v \u002Fpath\u002Fto\u002Fdownloads:\u002Fdownloads ghcr.io\u002Falexta69\u002Fmetube\n```\n\n## 🐳 Run using docker-compose\n\n```yaml\nservices:\n  metube:\n    image: ghcr.io\u002Falexta69\u002Fmetube\n    container_name: metube\n    restart: unless-stopped\n    ports:\n      - \"8081:8081\"\n    volumes:\n      - \u002Fpath\u002Fto\u002Fdownloads:\u002Fdownloads\n```\n\n## ⚙️ Configuration via environment variables\n\nCertain values can be set via environment variables, using the `-e` parameter on the docker command line, or the `environment:` section in docker-compose.\n\n### ⬇️ Download Behavior\n\n* __MAX_CONCURRENT_DOWNLOADS__: Maximum number of simultaneous downloads allowed. For example, if set to `5`, then at most five downloads will run concurrently, and any additional downloads will wait until one of the active downloads completes. Defaults to `3`. \n* __DELETE_FILE_ON_TRASHCAN__: if `true`, downloaded files are deleted on the server, when they are trashed from the \"Completed\" section of the UI. Defaults to `false`.\n* __DEFAULT_OPTION_PLAYLIST_ITEM_LIMIT__: Maximum number of playlist items that can be downloaded. Defaults to `0` (no limit).\n* __SUBSCRIPTION_DEFAULT_CHECK_INTERVAL__: Default minutes between automatic checks for each subscription. Defaults to `60`.\n* __SUBSCRIPTION_SCAN_PLAYLIST_END__: Maximum playlist\u002Fchannel entries to fetch per subscription check (newest-first). Defaults to `50`.\n* __SUBSCRIPTION_MAX_SEEN_IDS__: Cap on stored video IDs per subscription to limit state file growth. Defaults to `50000`.\n* __CLEAR_COMPLETED_AFTER__: Number of seconds after which completed (and failed) downloads are automatically removed from the \"Completed\" list. Defaults to `0` (disabled).\n\n### 📁 Storage & Directories\n\n* __DOWNLOAD_DIR__: Path to where the downloads will be saved. Defaults to `\u002Fdownloads` in the Docker image, and `.` otherwise.\n* __AUDIO_DOWNLOAD_DIR__: Path to where audio-only downloads will be saved, if you wish to separate them from the video downloads. Defaults to the value of `DOWNLOAD_DIR`.\n* __CUSTOM_DIRS__: Whether to enable downloading videos into custom directories within the __DOWNLOAD_DIR__ (or __AUDIO_DOWNLOAD_DIR__). When enabled, a dropdown appears next to the Add button to specify the download directory. Defaults to `true`.\n* __CREATE_CUSTOM_DIRS__: Whether to support automatically creating directories within the __DOWNLOAD_DIR__ (or __AUDIO_DOWNLOAD_DIR__) if they do not exist. When enabled, the download directory selector supports free-text input, and the specified directory will be created recursively. Defaults to `true`.\n* __CUSTOM_DIRS_EXCLUDE_REGEX__: Regular expression to exclude some custom directories from the dropdown. Empty regex disables exclusion. Defaults to `(^|\u002F)[.@].*$`, which means directories starting with `.` or `@`.\n* __DOWNLOAD_DIRS_INDEXABLE__: If `true`, the download directories (__DOWNLOAD_DIR__ and __AUDIO_DOWNLOAD_DIR__) are indexable on the web server. Defaults to `false`.\n* __STATE_DIR__: Path to where MeTube will store its persistent state files (`queue.json`, `pending.json`, `completed.json`, `subscriptions.json`). Defaults to `\u002Fdownloads\u002F.metube` in the Docker image, and `.` otherwise.\n* __TEMP_DIR__: Path where intermediary download files will be saved. Defaults to `\u002Fdownloads` in the Docker image, and `.` otherwise.\n  * Set this to an SSD or RAM filesystem (e.g., `tmpfs`) for better performance.\n  * __Note__: Using a RAM filesystem may prevent downloads from being resumed.\n* __CHOWN_DIRS__: If `false`, ownership of `DOWNLOAD_DIR`, `STATE_DIR`, and `TEMP_DIR` (and their contents) will not be set on container start. Ensure user under which MeTube runs has necessary access to these directories already. Defaults to `true`.\n\n### 📝 File Naming & yt-dlp\n\n* __OUTPUT_TEMPLATE__: The template for the filenames of the downloaded videos, formatted according to [this spec](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp\u002Fblob\u002Fmaster\u002FREADME.md#output-template). Defaults to `%(title)s.%(ext)s`.\n* __OUTPUT_TEMPLATE_CHAPTER__: The template for the filenames of the downloaded videos when split into chapters via postprocessors. Defaults to `%(title)s - %(section_number)s %(section_title)s.%(ext)s`.\n* __OUTPUT_TEMPLATE_PLAYLIST__: The template for the filenames of the downloaded videos when downloaded as a playlist. Defaults to `%(playlist_title)s\u002F%(title)s.%(ext)s`. Set to empty to use `OUTPUT_TEMPLATE` instead.\n* __OUTPUT_TEMPLATE_CHANNEL__: The template for the filenames of the downloaded videos when downloaded as a channel. Defaults to `%(channel)s\u002F%(title)s.%(ext)s`. Set to empty to use `OUTPUT_TEMPLATE` instead.\n* __YTDL_OPTIONS__: Additional options to pass to yt-dlp, as a JSON object. See [Configuring yt-dlp options](#%EF%B8%8F-configuring-yt-dlp-options) for details, examples, and available options reference.\n* __YTDL_OPTIONS_FILE__: Path to a JSON file containing yt-dlp options. Monitored and reloaded automatically on changes. See [Configuring yt-dlp options](#%EF%B8%8F-configuring-yt-dlp-options).\n* __YTDL_OPTIONS_PRESETS__: Named bundles of yt-dlp options, selectable per download in the UI. See [Configuring yt-dlp options](#%EF%B8%8F-configuring-yt-dlp-options) for format and examples.\n* __YTDL_OPTIONS_PRESETS_FILE__: Path to a JSON file containing presets. Monitored and reloaded automatically on changes. See [Configuring yt-dlp options](#%EF%B8%8F-configuring-yt-dlp-options).\n* __ALLOW_YTDL_OPTIONS_OVERRIDES__: Whether to show a free-text field in the UI for per-download yt-dlp option overrides. Defaults to `false`. See [Configuring yt-dlp options](#%EF%B8%8F-configuring-yt-dlp-options) for details and security considerations.\n\n### 🌐 Web Server & URLs\n\n* __HOST__: The host address the web server will bind to. Defaults to `0.0.0.0` (all interfaces).\n* __PORT__: The port number the web server will listen on. Defaults to `8081`.\n* __URL_PREFIX__: Base path for the web server (for use when hosting behind a reverse proxy). Defaults to `\u002F`.\n* __PUBLIC_HOST_URL__: Base URL for the download links shown in the UI for completed files. By default, MeTube serves them under its own URL. If your download directory is accessible on another URL and you want the download links to be based there, use this variable to set it.\n* __PUBLIC_HOST_AUDIO_URL__: Same as PUBLIC_HOST_URL but for audio downloads.\n* __HTTPS__: Use `https` instead of `http` (__CERTFILE__ and __KEYFILE__ required). Defaults to `false`.\n* __CERTFILE__: HTTPS certificate file path.\n* __KEYFILE__: HTTPS key file path.\n* __CORS_ALLOWED_ORIGINS__: Comma-separated list of origins permitted to make cross-origin requests to the MeTube API. When unset or empty, all cross-origin requests are denied. Set to `*` to allow all origins. This must be configured for [browser extensions](#-browser-extensions), [bookmarklets](#-bookmarklet), and any other browser-based tools that contact MeTube from a different origin. For browser extensions use `*` (see below); for bookmarklets you can list specific sites, e.g. `https:\u002F\u002Fwww.youtube.com,https:\u002F\u002Fwww.vimeo.com`.\n* __ROBOTS_TXT__: A path to a `robots.txt` file mounted in the container.\n\n### 🏠 Basic Setup\n\n* __PUID__: User under which MeTube will run. Defaults to `1000` (legacy `UID` also supported).\n* __PGID__: Group under which MeTube will run. Defaults to `1000` (legacy `GID` also supported).\n* __UMASK__: Umask value used by MeTube. Defaults to `022`.\n* __DEFAULT_THEME__: Default theme to use for the UI, can be set to `light`, `dark`, or `auto`. Defaults to `auto`.\n* __LOGLEVEL__: Log level, can be set to `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`, or `NONE`. Defaults to `INFO`. \n* __ENABLE_ACCESSLOG__: Whether to enable access log. Defaults to `false`.\n\n## 🎛️ Configuring yt-dlp options\n\nMeTube lets you customize how [yt-dlp](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp) behaves at three levels, from broadest to most specific:\n\n1. **Global options** — apply to every download by default.\n2. **Presets** — named bundles of options that users can pick per download from the UI.\n3. **Per-download overrides** — free-form options entered in the UI for a single download.\n\nWhen a download starts, these layers are combined in order. If the same option appears in more than one layer, the more specific one wins: per-download overrides beat presets, and presets beat global options.\n\nIn JSON presets and overrides, setting an option to **`null`** clears that option for that download (for example, `\"download_archive\": null` overrides a global archive path so the archive is not used). This follows yt-dlp’s usual meaning of `None` for that option.\n\n### Option format\n\nyt-dlp options in MeTube are expressed as JSON objects. The keys are yt-dlp API option names, which roughly correspond to command-line flags with dashes replaced by underscores. For example, the command-line flag `--write-subs` becomes `\"writesubtitles\": true` in JSON.\n\n> **Tip:** Some command-line flags don't have a direct single-key equivalent — for instance, `--embed-thumbnail` and `--recode-video` must be expressed via `\"postprocessors\"`. A full list of available API options can be found [in the yt-dlp source](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp\u002Fblob\u002Fmaster\u002Fyt_dlp\u002FYoutubeDL.py#L224), and [this conversion script](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp\u002Fblob\u002Fmaster\u002Fdevscripts\u002Fcli_to_api.py) can help translate command-line flags to their API equivalents.\n\n### Global options\n\nGlobal options form the baseline for every download. There are two ways to define them, and you can use either or both:\n\n**Inline via environment variable** (`YTDL_OPTIONS`) — pass a JSON object directly:\n\n```yaml\nenvironment:\n  - 'YTDL_OPTIONS={\"writesubtitles\": true, \"subtitleslangs\": [\"en\", \"de\"], \"updatetime\": false, \"writethumbnail\": true}'\n```\n\n**Via a JSON file** (`YTDL_OPTIONS_FILE`) — mount a file into the container and point to it:\n\n```yaml\nvolumes:\n  - \u002Fpath\u002Fto\u002Fytdl-options.json:\u002Fconfig\u002Fytdl-options.json\nenvironment:\n  - YTDL_OPTIONS_FILE=\u002Fconfig\u002Fytdl-options.json\n```\n\nwhere `ytdl-options.json` contains:\n\n```json\n{\n  \"writesubtitles\": true,\n  \"subtitleslangs\": [\"en\", \"de\"],\n  \"updatetime\": false,\n  \"writethumbnail\": true\n}\n```\n\nThe file is monitored for changes and reloaded automatically — no container restart needed. If you use both methods and they define the same key, the **file takes precedence**.\n\n### Presets\n\nPresets let you define named bundles of options that appear in the web UI under **Advanced Options** as \"Option Presets\". Users can select one or more presets per download, making it easy to apply common option combinations without editing global settings.\n\nLike global options, presets can be set inline or via a file:\n\n* `YTDL_OPTIONS_PRESETS` — a JSON object where each key is a preset name and its value is a set of yt-dlp options.\n* `YTDL_OPTIONS_PRESETS_FILE` — path to a JSON file containing presets, monitored and reloaded on changes.\n\nIf both are used and they define a preset with the same name, the **file's version takes precedence**.\n\n**Example** — a presets file defining three presets:\n\n```json\n{\n  \"sponsorblock\": {\n    \"postprocessors\": [\n      { \"key\": \"SponsorBlock\", \"categories\": [\"sponsor\", \"selfpromo\", \"interaction\"] },\n      { \"key\": \"ModifyChapters\", \"remove_sponsor_segments\": [\"sponsor\", \"selfpromo\", \"interaction\"] }\n    ]\n  },\n  \"embed-subs\": {\n    \"writesubtitles\": true,\n    \"writeautomaticsub\": true,\n    \"subtitleslangs\": [\"en\", \"de\"],\n    \"postprocessors\": [{ \"key\": \"FFmpegEmbedSubtitle\" }]\n  },\n  \"limit-rate\": {\n    \"ratelimit\": 5000000\n  }\n}\n```\n\nThis makes three presets available in the UI:\n* **sponsorblock** — strips sponsor, self-promo, and interaction segments from videos.\n* **embed-subs** — downloads English and German subtitles and embeds them into the video file.\n* **limit-rate** — caps download speed to ~5 MB\u002Fs.\n\nWhen multiple presets are selected for a download, they are applied in order. If two presets set the same option, the later one wins.\n\n### Per-download overrides\n\nFor one-off tweaks, MeTube can expose a free-text JSON field in the UI (\"Custom yt-dlp Options\") where users type yt-dlp options that apply only to that single download. This is disabled by default:\n\n```yaml\nenvironment:\n  - ALLOW_YTDL_OPTIONS_OVERRIDES=true\n```\n\nOnce enabled, the field appears under **Advanced Options**. Any options entered there take the highest priority, overriding both global options and selected presets.\n\n> **⚠️ Security note:** Enabling this allows arbitrary yt-dlp API options to be supplied by anyone with access to the UI. Depending on the options used, this may enable arbitrary command execution inside the container. Enable only in trusted environments.\n\n### How the layers combine\n\nWhen a download starts, the final set of yt-dlp options is built in this order:\n\n1. Start with **global options** (`YTDL_OPTIONS` \u002F `YTDL_OPTIONS_FILE`).\n2. Apply each selected **preset** in order (later presets overwrite earlier ones for conflicting keys).\n3. Apply any **per-download overrides** on top (overwrite everything else for conflicting keys).\n\nMeTube always forces its own flat-extract behaviour during the initial metadata fetch (`extract_flat`, `noplaylist`, etc.); presets cannot override those keys for that phase.\n\n**Example:** Suppose your global options set `\"writesubtitles\": false`, but you select a preset that sets `\"writesubtitles\": true`. Subtitles will be written for that download because the preset overrides the global setting. If you additionally enter `{\"writesubtitles\": false}` in the per-download overrides field, that value wins and subtitles will not be written.\n\n### Configuration cookbooks\n\nThe project's Wiki contains examples of useful configurations contributed by users of MeTube:\n* [YTDL_OPTIONS Cookbook](https:\u002F\u002Fgithub.com\u002Falexta69\u002Fmetube\u002Fwiki\u002FYTDL_OPTIONS-Cookbook)\n* [OUTPUT_TEMPLATE Cookbook](https:\u002F\u002Fgithub.com\u002Falexta69\u002Fmetube\u002Fwiki\u002FOUTPUT_TEMPLATE-Cookbook)\n\n## 🍪 Using browser cookies\n\nIn case you need to use your browser's cookies with MeTube, for example to download restricted or private videos:\n\n* Install in your browser an extension to extract cookies:\n  * [Firefox](https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fexport-cookies-txt\u002F)\n  * [Chrome](https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fget-cookiestxt-locally\u002Fcclelndahbckbenkjhflpdbgdldlbecc)\n* Extract the cookies you need with the extension and save\u002Fexport them as `cookies.txt`.\n* In MeTube, open **Advanced Options** and use the **Upload Cookies** button to upload the file.\n* After upload, the cookie indicator should show as active.\n* Use **Delete Cookies** in the same section to remove uploaded cookies.\n\n## 🔌 Browser extensions\n\nBrowser extensions allow right-clicking videos and sending them directly to MeTube. If you're on an HTTPS page, your MeTube instance must be behind an HTTPS reverse proxy (see below) for extensions to work.\n\nSince browser extensions make requests from their own origin (`chrome-extension:\u002F\u002F...` or `moz-extension:\u002F\u002F...`), you must set `CORS_ALLOWED_ORIGINS=*` for them to work.\n\n__Chrome:__ contributed by [Rpsl](https:\u002F\u002Fgithub.com\u002Frpsl). You can install it from [Google Chrome Webstore](https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fmetube-downloader\u002Ffbmkmdnlhacefjljljlbhkodfmfkijdh) or use developer mode and install [from sources](https:\u002F\u002Fgithub.com\u002FRpsl\u002Fmetube-browser-extension).\n\n__Firefox:__ contributed by [nanocortex](https:\u002F\u002Fgithub.com\u002Fnanocortex). You can install it from [Firefox Addons](https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fmetube-downloader) or get sources from [here](https:\u002F\u002Fgithub.com\u002Fnanocortex\u002Fmetube-firefox-addon).\n\n## 📱 iOS Shortcut\n\n[rithask](https:\u002F\u002Fgithub.com\u002Frithask) created an iOS shortcut to send URLs to MeTube from Safari. Enter the MeTube instance address when prompted which will be saved for later use. You can run the shortcut from Safari’s share menu. The shortcut can be downloaded from [this iCloud link](https:\u002F\u002Fwww.icloud.com\u002Fshortcuts\u002F66627a9f334c467baabdb2769763a1a6).\n\n## 🔖 Bookmarklet\n\n[kushfest](https:\u002F\u002Fgithub.com\u002Fkushfest) has created a Chrome bookmarklet for sending the currently open webpage to MeTube. Please note that if you're on an HTTPS page, your MeTube instance must be configured with `HTTPS` as `true` in the environment, or be behind an HTTPS reverse proxy (see below) for the bookmarklet to work.\n\nSince bookmarklets run in the context of the current page (e.g. youtube.com), the requests they make to MeTube are cross-origin. You must add the origins of sites where you use the bookmarklet to the __CORS_ALLOWED_ORIGINS__ environment variable, otherwise the browser will block the requests. For example, to use the bookmarklet on YouTube and Vimeo: `CORS_ALLOWED_ORIGINS=https:\u002F\u002Fwww.youtube.com,https:\u002F\u002Fwww.vimeo.com`.\n\nGitHub doesn't allow embedding JavaScript as a link, so the bookmarklet has to be created manually by copying the following code to a new bookmark you create on your bookmarks bar. Change the hostname in the URL below to point to your MeTube instance.\n\n```javascript\njavascript:!function(){xhr=new XMLHttpRequest();xhr.open(\"POST\",\"https:\u002F\u002Fmetube.domain.com\u002Fadd\");xhr.withCredentials=true;xhr.send(JSON.stringify({\"url\":document.location.href,\"quality\":\"best\"}));xhr.onload=function(){if(xhr.status==200){alert(\"Sent to metube!\")}else{alert(\"Send to metube failed. Check the javascript console for clues.\")}}}();\n```\n\n[shoonya75](https:\u002F\u002Fgithub.com\u002Fshoonya75) has contributed a Firefox version:\n\n```javascript\njavascript:(function(){xhr=new XMLHttpRequest();xhr.open(\"POST\",\"https:\u002F\u002Fmetube.domain.com\u002Fadd\");xhr.send(JSON.stringify({\"url\":document.location.href,\"quality\":\"best\"}));xhr.onload=function(){if(xhr.status==200){alert(\"Sent to metube!\")}else{alert(\"Send to metube failed. Check the javascript console for clues.\")}}})();\n```\n\nThe above bookmarklets use `alert()` for notifications. This variant shows a toast instead (Chrome — for Firefox, replace the `!function(){...}()` wrapper with `(function(){...})()`):\n\n```javascript\njavascript:!function(){function notify(msg) {var sc = document.scrollingElement.scrollTop; var text = document.createElement('span');text.innerHTML=msg;var ts = text.style;ts.all = 'revert';ts.color = '#000';ts.fontFamily = 'Verdana, sans-serif';ts.fontSize = '15px';ts.backgroundColor = 'white';ts.padding = '15px';ts.border = '1px solid gainsboro';ts.boxShadow = '3px 3px 10px';ts.zIndex = '100';document.body.appendChild(text);ts.position = 'absolute'; ts.top = 50 + sc + 'px'; ts.left = (window.innerWidth \u002F 2)-(text.offsetWidth \u002F 2) + 'px'; setTimeout(function () { text.style.visibility = \"hidden\"; }, 1500);}xhr=new XMLHttpRequest();xhr.open(\"POST\",\"https:\u002F\u002Fmetube.domain.com\u002Fadd\");xhr.send(JSON.stringify({\"url\":document.location.href,\"quality\":\"best\"}));xhr.onload=function() { if(xhr.status==200){notify(\"Sent to metube!\")}else {notify(\"Send to metube failed. Check the javascript console for clues.\")}}}();\n```\n\n## ⚡ Raycast extension\n\n[dotvhs](https:\u002F\u002Fgithub.com\u002Fdotvhs) has created an [extension for Raycast](https:\u002F\u002Fwww.raycast.com\u002Fdot\u002Fmetube) for adding videos to MeTube directly from Raycast.\n\n## 🔒 HTTPS support, and running behind a reverse proxy\n\nIt's possible to configure MeTube to listen in HTTPS mode. `docker-compose` example:\n\n```yaml\nservices:\n  metube:\n    image: ghcr.io\u002Falexta69\u002Fmetube\n    container_name: metube\n    restart: unless-stopped\n    ports:\n      - \"8081:8081\"\n    volumes:\n      - \u002Fpath\u002Fto\u002Fdownloads:\u002Fdownloads\n      - \u002Fpath\u002Fto\u002Fssl\u002Fcrt:\u002Fssl\u002Fcrt.pem\n      - \u002Fpath\u002Fto\u002Fssl\u002Fkey:\u002Fssl\u002Fkey.pem\n    environment:\n      - HTTPS=true\n      - CERTFILE=\u002Fssl\u002Fcrt.pem\n      - KEYFILE=\u002Fssl\u002Fkey.pem\n```\n\nMeTube can also run behind a reverse proxy for HTTPS termination or authentication. When serving under a subdirectory, set `URL_PREFIX` accordingly.\n\nThe [linuxserver\u002Fswag](https:\u002F\u002Fdocs.linuxserver.io\u002Fgeneral\u002Fswag) image includes ready-made snippets for MeTube in [subfolder](https:\u002F\u002Fgithub.com\u002Flinuxserver\u002Freverse-proxy-confs\u002Fblob\u002Fmaster\u002Fmetube.subfolder.conf.sample) and [subdomain](https:\u002F\u002Fgithub.com\u002Flinuxserver\u002Freverse-proxy-confs\u002Fblob\u002Fmaster\u002Fmetube.subdomain.conf.sample) modes, plus Authelia for authentication.\n\n### 🌐 NGINX\n\n```nginx\nlocation \u002Fmetube\u002F {\n        proxy_pass http:\u002F\u002Fmetube:8081;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n}\n```\n\nNote: the extra `proxy_set_header` directives are there to make WebSocket work.\n\n### 🌐 Apache\n\nContributed by [PIE-yt](https:\u002F\u002Fgithub.com\u002FPIE-yt). Source [here](https:\u002F\u002Fgist.github.com\u002FPIE-yt\u002F29e7116588379032427f5bd446b2cac4).\n\n```apache\n# For putting in your Apache sites site.conf\n# Serves MeTube under a \u002Fmetube\u002F subdir (http:\u002F\u002Fyourdomain.com\u002Fmetube\u002F)\n\u003CLocation \u002Fmetube\u002F>\n    ProxyPass http:\u002F\u002Flocalhost:8081\u002F retry=0 timeout=30\n    ProxyPassReverse http:\u002F\u002Flocalhost:8081\u002F\n\u003C\u002FLocation>\n\n\u003CLocation \u002Fmetube\u002Fsocket.io>\n    RewriteEngine On\n    RewriteCond %{QUERY_STRING} transport=websocket    [NC]\n    RewriteRule \u002F(.*) ws:\u002F\u002Flocalhost:8081\u002Fsocket.io\u002F$1 [P,L]\n    ProxyPass http:\u002F\u002Flocalhost:8081\u002Fsocket.io retry=0 timeout=30\n    ProxyPassReverse http:\u002F\u002Flocalhost:8081\u002Fsocket.io\n\u003C\u002FLocation>\n```\n\n### 🌐 Caddy\n\nThe following example Caddyfile gets a reverse proxy going behind [caddy](https:\u002F\u002Fcaddyserver.com).\n\n```caddyfile\nexample.com {\n  route \u002Fmetube\u002F* {\n    uri strip_prefix metube\n    reverse_proxy metube:8081\n  }\n}\n```\n\n## 🔄 Updating yt-dlp\n\nMeTube is powered by [yt-dlp](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp), which requires frequent updates as video sites change their layouts. A nightly build automatically publishes a new Docker image whenever a new yt-dlp version is available, so keep your container up to date — [watchtower](https:\u002F\u002Fgithub.com\u002Fnicholas-fedor\u002Fwatchtower) works well for this.\n\n## 🔧 Troubleshooting and submitting issues\n\nMeTube is only a UI for [yt-dlp](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp). Issues with authentication, postprocessing, permissions, or `YTDL_OPTIONS` should be debugged with yt-dlp directly first — once working, import those options into MeTube. To test inside the container:\n\n```bash\ndocker exec -ti metube sh\ncd \u002Fdownloads\n```\n\n## 💡 Submitting feature requests\n\nMeTube development relies on community contributions. If you need additional features, please submit a PR. Create an issue first to discuss the implementation — some PRs may not be accepted to reduce bloat. Feature requests without an accompanying PR are unlikely to be fulfilled.\n\n## 🛠️ Building and running locally\n\nMake sure you have Node.js 22+ and Python 3.13 installed.\n\n```bash\n# install Angular and build the UI\ncd ui\ncurl -fsSL https:\u002F\u002Fget.pnpm.io\u002Finstall.sh | sh -\npnpm install\npnpm run build\n# install python dependencies\ncd ..\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\nuv sync\n# run\nuv run python3 app\u002Fmain.py\n```\n\nA Docker image can be built locally (it will build the UI too):\n\n```bash\ndocker build -t metube .\n```\n\nNote that if you're running the server in VSCode, your downloads will go to your user's Downloads folder (this is configured via the environment in `.vscode\u002Flaunch.json`).\n","MeTube 是一个自托管的网页界面，用于通过 yt-dlp 从 YouTube 及其他数十个网站下载媒体文件。其核心功能包括从浏览器界面下载视频、音频、字幕和缩略图，支持配置输出格式与下载选项来下载播放列表和频道，并且能够订阅频道和播放列表，定期检查新内容并自动排队下载最新上传的视频。该项目使用 Python 编写，适合需要频繁从多个视频平台下载内容或希望对下载过程有更多控制权的用户，如内容创作者、教育工作者以及任何需要离线保存在线视频的人士。",2,"2026-06-11 03:34:00","high_star"]