No description
  • Jinja 64.4%
  • Shell 35.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kevin Heyer c9a9235881
All checks were successful
/ lint (push) Successful in 6s
Hand only root's files to metube and resume adopt
adopt failed on a Proxmox mount point in an unprivileged container:
the recursive chown hit .Trash-1000, owned by an id that is not mapped
into the container (nobody), which root there cannot change. Only the
files the old service wrote as root go to metube now; files of other
owners stay as they are. A download directory that itself belongs to
nobody is refused before any change, with a hint for the host.

An adoption that stopped after adopt.yml has already moved /opt/metube
to /opt/metube.pre-iac; the check now reads it from there and adopt.sh
continues instead of reporting no installation.

Tested: community-like install with an ext4 loop mount on
/opt/metube_downloads and an immutable .Trash-1000 owned by nobody; the
pushed commit reproduced the chown error, the new code resumed on the
same guest (old tree read from /opt/metube.pre-iac, .Trash-1000 left
alone, other files owned by metube, history kept, smoke green, second
run changed=1). check-app.sh green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:02:50 +02:00
.forgejo/workflows Add the app metube 2026-10-22 15:12:40 +02:00
.vibe Add the app metube 2026-10-22 15:12:40 +02:00
docs Hand only root's files to metube and resume adopt 2026-10-22 19:02:50 +02:00
files Keep mounted or own download directories on adopt 2026-10-22 18:20:44 +02:00
handlers Add the app metube 2026-10-22 15:12:40 +02:00
tasks Hand only root's files to metube and resume adopt 2026-10-22 19:02:50 +02:00
templates Keep mounted or own download directories on adopt 2026-10-22 18:20:44 +02:00
tests Add the app metube 2026-10-22 15:12:40 +02:00
.clinerules Add the app metube 2026-10-22 15:12:40 +02:00
.cursorrules Add the app metube 2026-10-22 15:12:40 +02:00
.windsurfrules Add the app metube 2026-10-22 15:12:40 +02:00
AGENTS.md Add the app metube 2026-10-22 15:12:40 +02:00
CHANGELOG.md Keep mounted or own download directories on adopt 2026-10-22 18:20:44 +02:00
CLAUDE.md Add the app metube 2026-10-22 15:12:40 +02:00
docker-compose.yml Add the app metube 2026-10-22 15:12:40 +02:00
GEMINI.md Add the app metube 2026-10-22 15:12:40 +02:00
iac.json Keep mounted or own download directories on adopt 2026-10-22 18:20:44 +02:00
README.md Keep mounted or own download directories on adopt 2026-10-22 18:20:44 +02:00

iac-metube

MeTube – Web-Oberfläche für yt-dlp: Videos und Audio von YouTube und vielen anderen Seiten herunterladen, mit Playlists und Kanal-Abos. Als LXC auf Proxmox VE (Debian 13) oder als Docker Compose. Teil von iac.

Installation (auf der Proxmox-Node)

bash -c "$(curl -fsSL https://iac.heyer.systems/metube/ct.sh)"   # LXC

Ohne Dialog: IAC_NONINTERACTIVE=1 und var_*-Variablen – am einfachsten mit dem Generator auf https://iac.heyer.systems/apps/metube/.

Standard: 2 CPU, 2 GiB RAM (der Bau der Web-Oberfläche braucht so viel), 32 GiB Disk – die Disk nach dem erwarteten Umfang der Downloads wählen. Eine VM gibt es nicht.

Docker

mkdir -p /opt/metube && cd /opt/metube
curl -fsSL https://iac.heyer.systems/metube/docker-compose.yml -o docker-compose.yml
docker compose up -d

Das offizielle Image ghcr.io/alexta69/metube, Downloads in ./downloads. Port und User in einer .env daneben (PORT_8081=127.0.0.1:8081, PUID, PGID). Update: docker compose pull && docker compose up -d.

Zugang

Web-Oberfläche: http://<ip>:8081/.

MeTube hat keine Anmeldung. Wer die Seite erreicht, kann herunterladen, Downloads löschen und Cookies hinterlegen. Die Firewall lässt Port 8081 deshalb nur aus privaten Netzen zu (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). Mit Login nur über einen Reverse-Proxy mit Anmeldung (z. B. iac-traefik mit iac-authelia).

Aufbau

Upstream veröffentlicht nur das Docker-Image, keine fertigen Dateien und keine Prüfsummen. iac baut deshalb jede Version im Gast so, wie das Dockerfile von MeTube es tut:

Quelle git clone des Release-Tags, geprüft gegen den Commit, den die GitHub-API für den Tag meldet
Web-Oberfläche gebaut mit Node.js 22 (nodejs.org, geprüft gegen SHASUMS256.txt) und pnpm über corepack, Pakete aus dem Lockfile mit Prüfsummen. Node.js wird nach dem Bau gelöscht
Python Python 3.13 von Debian, Pakete (yt-dlp, deno …) aus uv.lock mit Prüfsummen, installiert mit uv (Prüfsumme des Releases)
ffmpeg 8.1 als statischer Build von BtbN (geprüft gegen checksums.sha256) wie im Docker-Image – Debians ffmpeg 7.1 kann in YouTubes HLS-Formaten nicht springen (Clip-Downloads ohne Bild). Kommt bei jeder neuen MeTube-Version neu
PO-Token bgutil-pot v0.8.1 plus Plugin für yt-dlp – hilft gegen „Sign in to confirm you're not a bot“. Upstream hat keine Prüfsummen; die Prüfsummen der getesteten Version stehen in tasks/main.yml
Programm /opt/metube/releases/metube-<version>, aktiv ist der Link /opt/metube/current. Die vorige Version bleibt liegen
Dienst metube als User metube in einer systemd-Sandbox, schreibt nur in /var/lib/metube und den Download-Ordner
Daten /var/lib/metube/downloads (Downloads, änderbar mit metube_download_dir), state (Warteschlange, Verlauf, Abos, Cookies), tmp
Einstellungen /etc/metube/metube.env (von iac), eigene Werte in /etc/metube/local.env – alle Umgebungsvariablen von MeTube, z. B. OUTPUT_TEMPLATE oder YTDL_OPTIONS; danach systemctl restart metube
Logs journalctl -u metube

Anderer Download-Ordner (z. B. der Mountpoint einer eigenen Disk): beim Anlegen var_metube_download_dir=/srv/media/youtube, später metube_download_dir=/srv/media/youtube in /etc/iac/settings.env und update. iac setzt DOWNLOAD_DIR und erlaubt der Sandbox das Schreiben dort; vorhandene Dateien verschiebt es nicht. Nicht unter /home, /root oder /opt/metube.

Update (im Gast)

update

Baut die getestete MeTube-Version aus iac.json (Renovate hebt sie nach einem grünen CI-Lauf an) und startet den Dienst neu. yt-dlp kommt mit jeder MeTube-Version – MeTube-Releases folgen yt-dlp meist innerhalb von Tagen. Die Selbst-Aktualisierung von yt-dlp (YTDL_NIGHTLY_UPDATE_TIME) ist aus. Zurück zur vorigen Version: ln -sfn /opt/metube/releases/metube-<alt> /opt/metube/current && systemctl restart metube.

Bestehende Installation übernehmen

Installationen des Proxmox-VE-Community-Scripts (ct/metube.sh) übernimmt adopt.sh im bestehenden Gast – Downloads, Verlauf, Abos und eigene Einstellungen bleiben. Liegen die Downloads auf einem Mountpoint oder in einem eigenen Pfad, bleiben sie dort und adopt.sh trägt den Pfad als metube_download_dir ein. Ablauf und andere Wege: docs/MIGRATION.md.

bash -c "$(curl -fsSL https://iac.heyer.systems/metube/adopt.sh)"

Selbsttest (im Gast)

bash /var/lib/iac/src/core/bin/iac-smoke

Prüft neben Dienst, Port und Health: Web-Oberfläche, gemeldete Version, User metube, ffmpeg 8.1, deno, PO-Token-Plugin und bgutil-pot – ohne Internet.