Skip to content

Environment Variables

Environment variables allow you to modify how TVApp2 functions within a docker container. Ensure that you understand the setting you are changing before you modify these values, otherwise, TVApp2 may fail to start due to misconfigurations.


TZ

1.0.0 Etc/UTC

The TZ environment variable specifies the timezone that your docker container will utilize. This is useful for syncing your local time with console outputs such as our logging system.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - TZ=Etc/UTC # (1)
  1. ℹ Changing this env variable will change the time for anything related to the TVApp2 docker container.
  Etc/UTC
  Africa/Cairo
  Africa/Johannesburg
  Africa/Lagos
  America/Argentina/Buenos_Aires
  America/Bogota
  America/Caracas
  America/Chicago
  America/El_Salvador
  America/Juneau
  America/Lima
  America/Los_Angeles
  America/Mexico_City
  America/New_York
  America/Phoenix
  America/Santiago
  America/Sao_Paulo
  America/Toronto
  America/Vancouver
  Asia/Almaty
  Asia/Ashkhabad
  Asia/Bahrain
  Asia/Bangkok
  Asia/Chongqing
  Asia/Dubai
  Asia/Ho_Chi_Minh
  Asia/Hong_Kong
  Asia/Jakarta
  Asia/Jerusalem
  Asia/Kathmandu
  Asia/Kolkata
  Asia/Kuwait
  Asia/Muscat
  Asia/Qatar
  Asia/Riyadh
  Asia/Seoul
  Asia/Shanghai
  Asia/Singapore
  Asia/Taipei
  Asia/Tehran
  Asia/Tokyo
  Atlantic/Reykjavik
  Australia/ACT
  Australia/Adelaide
  Australia/Brisbane
  Australia/Sydney
  Europe/Athens
  Europe/Belgrade
  Europe/Berlin
  Europe/Copenhagen
  Europe/Helsinki
  Europe/Istanbul
  Europe/London
  Europe/Luxembourg
  Europe/Madrid
  Europe/Moscow
  Europe/Paris
  Europe/Riga
  Europe/Rome
  Europe/Stockholm
  Europe/Tallinn
  Europe/Vilnius
  Europe/Warsaw
  Europe/Zurich
  Pacific/Auckland
  Pacific/Chatham
  Pacific/Fakaofo
  Pacific/Honolulu
  Pacific/Norfolk
  US/Mountain


WEB_IP

1.0.0 0.0.0.0

The WEB_IP environment variable allows you to define what IP address will be bound to the TVApp2 docker image.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - WEB_IP=0.0.0.0 # (1)
  1. ℹ Specify 0.0.0.0 to bind to all local IP addresses.


WEB_PORT

1.0.0 4124

The WEB_PORT environment variable allows you to define what port the TVApp2 docker container will listen to.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - WEB_IP=4124 # (1)
  1. ℹ The default port is 4124


WEB_ENCODING

1.3.0 deflate, br

The WEB_ENCODING environment variable allows you to customize the HTTP Accept-Encoding request and response header. This value specifies what content encoding the sender can understand when sending these requests.

Most users will not need to modify this value unless you are running Jellyfin and receive the following error when attempting to sync EPG data between Jellyfin and the TVApp2 container:

Jellyfin Error

[ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel 
XXXXXXXXXXXXXXX (Source 2) System.Xml.XmlException: '', hexadecimal value 0x1F, 
is an invalid character. Line 1, position 1.

If you receive the above error and you have already customized this environment variable to include gzip, you must remove it from your accepted encoders string to fix the error.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - WEB_ENCODING: 'gzip, deflate, br'
docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - WEB_ENCODING: 'deflate, br'


URL_REPO

1.0.0 https://git.binaryninja.net/binaryninja

The URL_REPO environment variable allows you to specify what Github repo is used to communicate with in order to fetch IPTV data. This is used as an internal environment variable by the developers and should not be changed by the end-user; otherwise you will be unable to fetch IPTV data.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - URL_REPO=https://git.binaryninja.net/binaryninja # (1)
  1. ⚠ It is highly recommended that you do not change this value otherwise you will not be able to download the latest M3U playlists and EPG guide data.


FILE_URL

1.2.0 urls.txt

The FILE_URL environment variable allows you to specify what the name of the downloaded urls.txt cache file. This file is downloaded when you first spin up the TVApp2 container.

There should be no need to utilize this environment variable unless you have a specific reason.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - FILE_URL=urls.txt # (1)
  1. ⚠ There is really no reason to modify this environment variable unless you have a specific purpose.


FILE_M3U

1.1.0 playlist.m3u8

The FILE_M3U environment variable allows you to specify what the name of the downloaded playlist.m3u8 file will be. This file is downloaded when you first spin up the TVApp2 container, and contains a list of what channels you can pick from.

There should be no need to utilize this environment variable unless you have a specific reason.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - FILE_M3U=playlist.m3u8 # (1)
  1. ⚠ There is really no reason to modify this environment variable unless you have a specific purpose.


FILE_EPG

1.1.0 xmltv.xml

The FILE_EPG environment variable specifies the filename that will be utilized when your .xml EPG playlist file is generated.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - FILE_EPG=xmltv.xml # (1)
  1. ℹ Changing this file only changes the filename locally; it does not affect the server-side fetching mechanism.


FILE_GZIP

1.1.0 xmltv.xml.gz

The FILE_GZIP environment variable specifies the filename that will be utilized when a compressed .gzip is generated and when you download the file.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - FILE_GZIP=xmltv.xml.gz # (1)
  1. ℹ Changing this file only changes the filename locally for generation and downloading. It does not affect the server-side fetching mechanism.


STREAM_QUALITY

1.1.0 hd

The STREAM_QUALITY environment variable specifies the default stream quality that will be used when you initiate a new channel to view.

Available Options:

  • hd High Definition
  • sd Standard Definition
docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - STREAM_QUALITY=hd # (1)
  1. ℹ This environment variable has the following options:
    • hd
    • sd


DIR_BUILD

1.0.0 /usr/src/app

The DIR_BUILD environment variable specifies what local folder will be utilized by the TVApp2 docker container when the container builds the app.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - DIR_BUILD=/usr/src/app # (1)
  1. ⚠ You should not change this unless you are an advanced user.


DIR_RUN

1.0.0 /usr/src/app

The DIR_RUN environment variable specifies what local folder will be utilized by the TVApp2 docker container when the container has built the app and placed it into a production folder.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - DIR_RUN=/usr/bin/app # (1)
  1. ⚠ You should not change this unless you are an advanced user.


LOG_LEVEL

1.1.0 4

The LOG_LEVEL environment variable allows you specify how deep logs should go when being output to your console.

docker-compose.yml
services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        restart: unless-stopped
        volumes:
            - /etc/timezone:/etc/timezone:ro
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./config:/config
            - ./app:/usr/bin/app
        environment:
            - LOG_LEVEL=4 # (1)
  1. ℹ The default log level is 4 (info).
Log Level Name Description
6 Trace Displays all possible logs in console, along with anything below this line.
5 Debug Displays debug / developer logs, along with anything below this line.
4 Info Displays informative logs, along with anything below this line.
3 Notice Displays important notices, along with anything below this line.
2 Warn Displays warnings, along with anything below this line.
1 Error Displays only errors, none of the log levels above this line will be shown