Skip to content
David edited this page Dec 3, 2024 · 23 revisions

Docker

There are two basic steps to install iSponsorBlockTV using Docker. Step 1 involves creating a config.json file using the graphical configuation or command-line tools. Step 2 involves creating and running the service via docker compose or run. In both steps, you will need to enter the pathway to your iSponsorBlockTV data directory. Alternatively, you can install iSponsorBlock from the source.

Step 1: Create a config file

Choose one of the following configurators to add devices and configure options.

Option 1: Using the new graphical configurator tool:

You can use the graphical setup wizard (powered by textual). If you want to auto discover your device, you need to run the container with the --net=host flag. This only works on linux.

Run it with the following command:

docker run --rm -it \
-v /PATH_TO_YOUR_DATA_DIR:/app/data \
--net=host \ # Remove line on windows and macOS
-e TERM=$TERM -e COLORTERM=$COLORTERM \ #Remove if you get errors/graphical glitches
ghcr.io/dmunozv04/isponsorblocktv \
--setup

Option 2: Using the text-based cli configurator tool:

This is a great option if you experience issues with the graphical configurator Docker users can run it with the following command:

docker run --rm -it \
-v /PATH_TO_YOUR_DATA_DIR:/app/data \
ghcr.io/dmunozv04/isponsorblocktv \
--setup-cli

Note, the CLI will ask you for a TV Link Code. You can find this on your Device's Youtube app, by going to Settings -> Link with TV code

Step 2: Install and run the iSponsorBlockTV Docker service

Option 1: Using docker-compose

services:
    iSponsorBlockTV:
        image: ghcr.io/dmunozv04/isponsorblocktv
        container_name: iSponsorBlockTV
        restart: unless-stopped
        volumes:
        - /PATH_TO_YOUR_DATA_DIR:/app/data #enter the same pathway as you used for your configurator in step 1

Similar to Step 1, create a config file

docker compose run iSponsorBlockTV --setup-cli

After completing setup, use docker-compose up -d to start.

Option 2: Using docker run

Run the container with docker run: The container doesn't need the --net=host flag anymore, so you can run it like this:

docker run -d \
--name iSponsorBlockTV \
--restart=unless-stopped \
-v /PATH_TO_YOUR_DATA_DIR:/app/data \
ghcr.io/dmunozv04/isponsorblocktv

Option 3: Quadlet

Before setting up the container, you will need to generate configs. Follow the instructions in the earlier docker steps, optionally replacing docker with podman. Place the generated configs in /etc/containers/config/isponsorblocktv/

You can set up a quadlet service using the following config:

[Unit]
Description="Sponsorblock for networked youtube clients"
Wants=network-online.target
After=network-online.target

[Install]
WantedBy=multi-user.target default.target

[Service]
Restart=always
TimeoutStartSec=900

[Container]
Image=ghcr.io/dmunozv04/isponsorblocktv:latest
Volume=/etc/containers/config/isponsorblocktv:/app/data

Place that in a file at /etc/containers/systemd/isponsorblocktv.container, run systemctl daemon-reload, and you should now have a systemd service titled isponsorblocktv that you can start, stop, and enable/disable the same as any other systemd service.

From source

Install

You need to install python version 3.8 or higher first, and to make it available in your PATH. After, clone the repo. Then you need to download the dependencies with pip: python3 -m pip install -r requirements.txt Or python -m pip install -r requirements.txt

Lastly, run main.py

Setup

run main.py --setup