Refresh docs and Docker Compose defaults

pull/1163/head
voc0der 2 months ago
parent e17456fdc1
commit 48706bd075

@ -17,7 +17,7 @@ permissions:
jobs:
noResponse:
runs-on: ubuntu-latest
if: ${{ github.repository == 'Tzahi12345/YoutubeDL-Material' }}
if: ${{ github.repository == 'voc0der/YoutubeDL-Material' }}
steps:
- uses: lee-dohm/no-response@v0.5.0
with:

@ -53,7 +53,7 @@ jobs:
id: docker-meta
uses: docker/metadata-action@v5
# Defaults:
# DOCKERHUB_USERNAME : tzahi12345
# DOCKERHUB_USERNAME : voc0der
# DOCKERHUB_REPO : youtubedl-material
# DOCKERHUB_MASTER_TAG: nightly
with:

@ -1,2 +1,2 @@
FROM tzahi12345/youtubedl-material:latest
FROM voc0der/youtubedl-material:latest
CMD [ "npm", "start" ]

@ -5,7 +5,7 @@ info:
description: "Welcome to the official docs for YoutubeDL-Material.\n\n\nYou can check out all the available endpoints. Remember to authenticate with your API key using the \"apiKey\" query parameter with your requests.\n\n\nTo do so, simply add this to the end of your API call:\n\n\n`?apiKey=API_KEY`\n\n\nReplce API_KEY with the API key in the settings menu. If one doesn't exist, click generate to create one.\n\n### Multi-user mode\n\nWhen using multi-user mode, you will need to supply a JWT token to authenticate requests through that user. This lets the server know which user to run the task for, like downloading a video for a specific user. \n\nTo do this, you must use the `/api/auth/login` endpoint to login using a user's username and password. This will result in an object containing a `token`. Supply this along with your API key like so:\n\n`?apiKey=API_KEY&jwt=JWT_TOKEN`\n\nNotice the `&` between the `API_KEY` and `jwt`."
contact:
name: Isaac Abadi
url: https://github.com/Tzahi12345/YoutubeDL-Material
url: https://github.com/voc0der/YoutubeDL-Material
email: IsaacMGrynsztein@gmail.com
servers:
- url: 'http://localhost:17442'

@ -4,14 +4,11 @@
[![Docker pulls badge](https://img.shields.io/docker/pulls/voc0der/youtubedl-material.svg)](https://hub.docker.com/r/voc0der/youtubedl-material)
[![Docker image size badge](https://img.shields.io/docker/image-size/voc0der/youtubedl-material?sort=date)](https://hub.docker.com/r/voc0der/youtubedl-material)
[![Heroku deploy badge](https://img.shields.io/badge/%E2%86%91_Deploy_to-Heroku-7056bf.svg)](https://heroku.com/deploy?template=https://github.com/voc0der/YoutubeDL-Material)
[![GitHub issues badge](https://img.shields.io/github/issues/voc0der/YoutubeDL-Material)](https://github.com/voc0der/YoutubeDL-Material/issues)
[![License badge](https://img.shields.io/github/license/voc0der/YoutubeDL-Material)](https://github.com/voc0der/YoutubeDL-Material/blob/master/LICENSE.md)
YoutubeDL-Material is a Material Design frontend for [youtube-dl](https://rg3.github.io/youtube-dl/) / yt-dlp workflows. It's coded using [Angular 21](https://angular.dev/) for the frontend, and [Node.js](https://nodejs.org/) on the backend.
Now with [Docker](#Docker) support!
<hr>
## Getting Started
@ -52,13 +49,6 @@ python3 -m pip install --user yt-dlp yt-dlp-ejs
</details>
<details>
<summary>CentOS 7 (legacy)</summary>
Current builds require Node.js 24 (`>=24 <26`), so CentOS 7 is no longer a supported host for native installs. Use Docker or a newer distro.
</details>
### Installing
If you are using Docker, skip to the [Docker](#Docker) section. Otherwise, continue:
@ -111,13 +101,16 @@ The repo currently uses Angular 21 and `@videogular/ngx-videogular@20`. Videogul
Please keep this file when building locally or in Docker until Videogular publishes Angular 21 peer support.
Lastly, type `npm -g install pm2` to install pm2 globally.
### Run backend
The frontend is now complete. The backend is much easier. Just go into the `backend` folder, and type `npm start`.
Install `pm2` globally, then start the backend:
Finally, if you want your instance to be available from outside your network, you can set up a [reverse proxy](https://github.com/voc0der/YoutubeDL-Material/wiki/Reverse-Proxy-Setup).
```bash
npm -g install pm2
npm start --prefix backend
```
Alternatively, you can port forward the port specified in the config (defaults to `17442`) and point it to the server's IP address. Make sure the port is also allowed through the server's firewall.
If you want your instance available outside your network, set up a [reverse proxy](https://github.com/voc0der/YoutubeDL-Material/wiki/Reverse-Proxy-Setup) or port forward the configured backend port (default `17442`).
## Docker
@ -136,31 +129,39 @@ If you are looking to setup YoutubeDL-Material with Docker, this section is for
3. Run `docker compose up -d` (or `docker-compose up -d`) to start it up. The container exposes port `17442` internally. Please check your `docker-compose.yml` file for the *external* port. If you downloaded the file as described above, it defaults to **8998**.
4. Make sure you can connect to the specified URL + *external* port, and if so, you are done!
### Custom UID/GID
By default, the Docker container runs as non-root with UID=1000 and GID=1000. To set this to your own UID/GID, simply update the `environment` section in your `docker-compose.yml` like so:
```yml
environment:
UID: YOUR_UID
GID: YOUR_GID
```
### Logging
<details>
<summary>Docker environment variables (click to expand)</summary>
You can control backend log verbosity with the `YTDL_LOG_LEVEL` environment variable (or `ytdl_log_level`).
Common Docker env vars used by the provided `docker-compose.yml` (plus logging):
- Default: `info` (mostly startup messages, warnings, and errors)
- Use `debug` to enable verbose yt-dlp/debug diagnostics
- Supported values follow standard Winston levels (for example: `error`, `warn`, `info`, `verbose`, `debug`)
- `ytdl_mongodb_connection_string`: MongoDB connection string (default compose file points to `mongodb://ytdl-mongo-db:27017`)
- `ytdl_use_local_db`: set to `'false'` to use MongoDB instead of the local JSON DB
- `write_ytdl_config`: set to `'true'` to write env-backed settings into `appdata/default.json` on startup
- `UID` / `GID`: set the app user/group IDs used inside the container (default behavior drops to `1000:1000`)
- `YTDL_LOG_LEVEL` (or `ytdl_log_level`): backend log level, default `info`
- Valid log levels: `error`, `warn`, `info`, `verbose`, `debug`
- `ytdl_ssl_cert_path` / `ytdl_ssl_key_path`: enable HTTPS by pointing to mounted cert/key files
- `ytdl_reverse_proxy_whitelist`: comma-separated CIDR ranges allowed to connect (reverse proxy IPs, not client IPs)
Example Docker Compose snippet:
```yml
environment:
YTDL_LOG_LEVEL: debug
ytdl_mongodb_connection_string: 'mongodb://ytdl-mongo-db:27017'
ytdl_use_local_db: 'false'
write_ytdl_config: 'true'
# UID: 1000
# GID: 1000
# YTDL_LOG_LEVEL: debug
# ytdl_ssl_cert_path: /mnt/keys/fullchain.pem
# ytdl_ssl_key_path: /mnt/keys/privkey.pem
# ytdl_reverse_proxy_whitelist: 172.28.0.100/32
```
If you prefer, you can also use Docker's `user: "UID:GID"` setting instead of `UID`/`GID`.
</details>
## MongoDB
For much better scaling with large datasets please run your YoutubeDL-Material instance with MongoDB backend rather than the json file-based default. It will fix a lot of performance problems (especially with datasets in the tens of thousands videos/audios)!
@ -175,12 +176,6 @@ To get started, go to the settings menu and enable the public API from the *Extr
Once you have enabled the API and have the key, you can start sending requests by adding the query param `apiKey=API_KEY`. Replace `API_KEY` with your actual API key, and you should be good to go! Nearly all of the backend should be at your disposal. View available endpoints in the link above.
## iOS Shortcut
If you are using iOS, try YoutubeDL-Material more conveniently with a Shortcut. With this Shorcut, you can easily start downloading YouTube video with just two taps! (Or maybe three?)
You can download Shortcut [here.](https://routinehub.co/shortcut/10283/)
## Contributing
If you're interested in contributing, first: awesome! Second, please refer to the guidelines/setup information located in the [Contributing](https://github.com/voc0der/YoutubeDL-Material/wiki/Contributing) wiki page, it's a helpful way to get you on your feet and coding away.

@ -4,7 +4,7 @@
If you would like to see the latest updates, use the `nightly` tag on Docker.
If you'd like to stick with more stable releases, use the `latest` tag on Docker or download the [latest release here](https://github.com/Tzahi12345/YoutubeDL-Material/releases/latest).
If you'd like to stick with more stable releases, use the `latest` tag on Docker or download the [latest release here](https://github.com/voc0der/YoutubeDL-Material/releases/latest).
| Version | Supported |
| -------------------- | ------------------ |

@ -1,7 +1,7 @@
{
"name": "YoutubeDL-Material",
"description": "An open-source and self-hosted YouTube downloader based on Google's Material Design specifications.",
"repository": "https://github.com/Tzahi12345/YoutubeDL-Material",
"repository": "https://github.com/voc0der/YoutubeDL-Material",
"stack": "container",
"logo": "https://i.imgur.com/GPzvPiU.png",
"keywords": ["youtube-dl", "youtubedl-material", "nodejs"]

@ -507,7 +507,7 @@ async function downloadReleaseZip(tag) {
// get name of zip file, which depends on the version
const tag_without_v = safeTag.substring(1, safeTag.length);
const zip_file_name = `youtubedl-material-${tag_without_v}.zip`;
const latest_zip_link = `https://github.com/Tzahi12345/YoutubeDL-Material/releases/download/${encodeURIComponent(safeTag)}/${encodeURIComponent(zip_file_name)}`;
const latest_zip_link = `https://github.com/voc0der/YoutubeDL-Material/releases/download/${encodeURIComponent(safeTag)}/${encodeURIComponent(zip_file_name)}`;
// download zip from release
const res = await fetch(latest_zip_link);
@ -580,7 +580,7 @@ async function isNewVersionAvailable() {
}
async function getLatestVersion() {
const res = await fetch('https://api.github.com/repos/tzahi12345/youtubedl-material/releases/latest', {method: 'Get'});
const res = await fetch('https://api.github.com/repos/voc0der/youtubedl-material/releases/latest', {method: 'Get'});
const json = await res.json();
if (json['message']) {
@ -2557,8 +2557,8 @@ app.get('/api/rss', async function (req, res) {
description: 'YoutubeDL-Material downloads',
id: utils.getBaseURL(),
link: utils.getBaseURL(),
image: 'https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/src/assets/images/logo_128px.png',
favicon: 'https://raw.githubusercontent.com/Tzahi12345/YoutubeDL-Material/master/src/favicon.ico',
image: 'https://github.com/voc0der/YoutubeDL-Material/blob/master/src/assets/images/logo_128px.png',
favicon: 'https://raw.githubusercontent.com/voc0der/YoutubeDL-Material/master/src/favicon.ico',
generator: 'YoutubeDL-Material'
});

@ -33,7 +33,7 @@ exports.initialize = function () {
});
}
// Sometimes this value is not properly typed: https://github.com/Tzahi12345/YoutubeDL-Material/issues/813
// Sometimes this value is not properly typed: https://github.com/voc0der/YoutubeDL-Material/issues/813
JWT_EXPIRATION = config_api.getConfigItem('ytdl_jwt_expiration');
if (!(+JWT_EXPIRATION)) {
logger.warn(`JWT expiration value improperly set to ${JWT_EXPIRATION}, auto setting to 1 day.`);

@ -1,6 +1,6 @@
apiVersion: v2
name: youtubedl-material
description: A Helm chart for https://github.com/Tzahi12345/YoutubeDL-Material
description: A Helm chart for https://github.com/voc0der/YoutubeDL-Material
# A chart can be either an 'application' or a 'library' chart.
#

@ -5,7 +5,7 @@
replicaCount: 1
image:
repository: tzahi12345/youtubedl-material
repository: voc0der/youtubedl-material
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""

@ -14,6 +14,9 @@ services:
# ytdl_ssl_cert_path: /mnt/keys/bindable-internal/lurker/fullchain-or-ca.pem
# ytdl_ssl_key_path: /mnt/keys/bindable-internal/lurker/privkey.pem
# Backend log level (optional): error, warn, info, verbose, debug
# YTDL_LOG_LEVEL: info
# Reverse Proxy Whitelist (optional)
# Whitelists the reverse proxy's IP (the direct connecting IP, not end clients)
# This checks which reverse proxy is allowed to connect, not client IPs
@ -27,7 +30,8 @@ services:
# user: "1000:1000"
restart: always
depends_on:
- ytdl-mongo-db
ytdl-mongo-db:
condition: service_healthy
volumes:
- ./appdata:/app/appdata
- ./audio:/app/audio
@ -38,8 +42,15 @@ services:
- "8998:17442"
image: voc0der/youtubedl-material:nightly
ytdl-mongo-db:
# If you are using a Raspberry Pi, use mongo:4.4.18
image: mongo:4
# If you are using an older Raspberry Pi / 32-bit setup, use mongo:4.4.18
image: mongo:8
healthcheck:
test: ["CMD-SHELL", "mongosh --eval 'db.runCommand({ping:1}).ok' --quiet"]
interval: 15s
timeout: 30s
retries: 5
start_period: 35s
start_interval: 1s
logging:
driver: "none"
container_name: mongo-db

@ -713,11 +713,11 @@ export class PostsService {
// gets tag of the latest version of youtubedl-material
getLatestGithubRelease() {
return this.http.get('https://api.github.com/repos/tzahi12345/youtubedl-material/releases/latest');
return this.http.get('https://api.github.com/repos/voc0der/youtubedl-material/releases/latest');
}
getAvailableRelease() {
return this.http.get('https://api.github.com/repos/tzahi12345/youtubedl-material/releases');
return this.http.get('https://api.github.com/repos/voc0der/youtubedl-material/releases');
}
afterLogin(user, token, permissions, available_permissions) {

@ -295,7 +295,7 @@
<mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['enable_rss_feed']" ><ng-container i18n="Enable RSS Feed setting">Enable RSS Feed</ng-container></mat-checkbox>
<p><ng-container i18n="RSS Feed prefix">Be careful enabling this with multi-user mode! User data may be exposed.</ng-container></p>
<button mat-stroked-button (click)="openGenerateRSSURLDialog()" [disabled]="!new_config['Extra']['enable_rss_feed']" i18n="Generate RSS URL">Generate RSS URL</button>
<p style="margin-top: 12px;"><a target="_blank" href="https://github.com/Tzahi12345/YoutubeDL-Material/wiki/RSS-Feed"><ng-container i18n="RSS feed documentation">See documentation here.</ng-container></a></p>
<p style="margin-top: 12px;"><a target="_blank" href="https://github.com/voc0der/YoutubeDL-Material/wiki/RSS-Feed"><ng-container i18n="RSS feed documentation">See documentation here.</ng-container></a></p>
</div>
</div>
</div>
@ -306,14 +306,14 @@
<div class="row">
<div class="col-12 mt-3">
<h6>Chrome</h6>
<p><a href="https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/chrome-extension/youtubedl-material-chrome-extension.zip?raw=true"><ng-container i18n="Chrome ext click here">Click here</ng-container></a>&nbsp;<ng-container i18n="Chrome click here suffix">to download the official YoutubeDL-Material Chrome extension manually.</ng-container></p>
<p><a href="https://github.com/voc0der/YoutubeDL-Material/blob/master/chrome-extension/youtubedl-material-chrome-extension.zip?raw=true"><ng-container i18n="Chrome ext click here">Click here</ng-container></a>&nbsp;<ng-container i18n="Chrome click here suffix">to download the official YoutubeDL-Material Chrome extension manually.</ng-container></p>
<p><ng-container i18n="Chrome setup suffix">You must manually load the extension and modify the extension's settings to set the frontend URL.</ng-container></p>
<mat-divider class="ext-divider"></mat-divider>
</div>
<div class="col-12">
<h6>Firefox</h6>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/youtubedl-material/" target="_blank"><ng-container i18n="Firefox ext click here">Click here</ng-container></a>&nbsp;<ng-container i18n="Firefox click here suffix">to install the official YoutubeDL-Material Firefox extension right off the Firefox extensions page.</ng-container></p>
<p><a href="https://github.com/Tzahi12345/YoutubeDL-Material/wiki/Firefox-Extension" target="_blank"><ng-container i18n="Firefox setup prefix link">Detailed setup instructions.</ng-container></a>&nbsp;<ng-container i18n="Firefox setup suffix">Not much is required other than changing the extension's settings to set the frontend URL.</ng-container></p>
<p><a href="https://github.com/voc0der/YoutubeDL-Material/wiki/Firefox-Extension" target="_blank"><ng-container i18n="Firefox setup prefix link">Detailed setup instructions.</ng-container></a>&nbsp;<ng-container i18n="Firefox setup suffix">Not much is required other than changing the extension's settings to set the frontend URL.</ng-container></p>
<mat-divider class="ext-divider"></mat-divider>
</div>
<div class="col-12">
@ -380,7 +380,7 @@
<div class="container-fluid">
<div class="row">
<div class="col-12 mt-3">
<div><a target="_blank" href="https://github.com/Tzahi12345/YoutubeDL-Material/wiki/Notifications"><ng-container i18n="Documentation">Documentation</ng-container></a></div>
<div><a target="_blank" href="https://github.com/voc0der/YoutubeDL-Material/wiki/Notifications"><ng-container i18n="Documentation">Documentation</ng-container></a></div>
<mat-checkbox color="accent" [(ngModel)]="new_config['Extra']['enable_notifications']"><ng-container i18n="Enable notifications setting">Enable notifications</ng-container></mat-checkbox>
</div>
<div class="col-12 mt-1">

Loading…
Cancel
Save