Installation Guide

MeTube is designed to be run as a containerized application, which is the recommended and most straightforward method for installation.

Using Docker is the simplest way to get MeTube up and running. It ensures all dependencies like Python, Node.js, yt-dlp, ffmpeg, and aria2 are correctly configured.

Docker Run

To run MeTube using a single Docker command, execute the following in your terminal. Replace /path/to/downloads with the absolute path on your host machine where you want your downloaded files to be stored.

docker run -d \
  -p 8081:8081 \
  -v /path/to/downloads:/downloads \
  ghcr.io/alexta69/metube

After running the command, MeTube will be accessible at http://<your-server-ip>:8081.

Docker Compose

For a more declarative setup, you can use Docker Compose. Create a docker-compose.yml file with the following content:

services:
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - /path/to/downloads:/downloads

Again, replace /path/to/downloads with the desired path on your host system. Then, start the container with:

docker-compose up -d

Understanding Volume Mounts

The -v /path/to/downloads:/downloads argument is crucial. It maps a directory from your host machine (/path/to/downloads) to the /downloads directory inside the MeTube container. This ensures that:

  1. Your files are persistent. They are saved on your host machine and will not be lost if the container is removed or updated.
  2. State is preserved. MeTube stores its queue and history in a .metube subdirectory within the downloads folder, so your download list persists across restarts.

Automatic Updates

The yt-dlp engine, which powers MeTube, is updated frequently to keep up with changes on video websites. The MeTube Docker image is rebuilt nightly to include the latest version of yt-dlp.

To keep your MeTube instance up-to-date automatically, it is highly recommended to use a tool like Watchtower. Watchtower will monitor for new MeTube images and automatically restart your container with the latest version.

Example command to run Watchtower:

docker run -d \
  --name watchtower \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower

Manual Installation (for Development)

If you wish to run MeTube directly on a host machine for development purposes, please see the Contributing Guide for detailed instructions.