Skip to content

Running Telly: Config File

Charles Larson edited this page Jan 12, 2020 · 15 revisions

Configuration

Here's an example configuration file. You will need to create this file. It should be placed in /etc/telly/telly.config.toml or $HOME/.telly/telly.config.toml or telly.config.toml in the CURRENT WORKING DIRECTORY.

NOTE For example, if telly and its config file file are in /opt/telly/ and you run telly from your home directory, telly will not find its config file because it will be looking for it in your home directory. If this makes little sense to you, use one of the other two locations OR cd into the directory where telly is located before running telly from the command line.

ATTENTION Windows users: be sure that there isn’t a hidden extension on the file. Telly can't read its config file if it's named something like telly.config.toml.txt.

You can retrieve this example config file from this wiki:

curl -fLO https://github.com/tellytv/telly/wiki/files/examples/telly.config.toml

If you are running Windows, copy-pasting that URL [only the URL] into your web browser should download the file.

# THIS SECTION IS REQUIRED ########################################################################
[Discovery]                                    # most likely you won't need to change anything here
  Device-Auth = "telly123"                     # These settings are all related to how telly identifies
  Device-ID = 12345678                         # itself to Plex.
  Device-UUID = ""
  Device-Firmware-Name = "hdhomeruntc_atsc"
  Device-Firmware-Version = "20150826"
  Device-Friendly-Name = "telly"
  Device-Manufacturer = "Silicondust"
  Device-Model-Number = "HDTC-2US"
  SSDP = true

# Note on running multiple instances of telly
# There are three things that make up a "key" for a given Telly Virtual Tuner:
# Device-ID [required], Device-UUID [optional], and port [required]
# When you configure your additional telly instances, change:
# the Device-ID [above] AND
# the Device-UUID [above, if you're entering one] AND
# the port [below in the "Web" section]

# THIS SECTION IS REQUIRED ########################################################################
[IPTV]
  Streams = 1               # number of simultaneous streams that telly virtual tuner will provide
                            # This is often 1, but is set by your iptv provider
  Starting-Channel = 10000  # When telly assigns channel numbers it will start here
  XMLTV-Channels = true     # if true, any channel numbers specified in your M3U file will be used.
# FFMpeg = true             # if this is uncommented, streams are buffered through ffmpeg; 
                            # ffmpeg must be installed and on your $PATH
                            # if you want to use this with Docker, be sure you use the correct docker image
# if you DO NOT WANT TO USE FFMPEG leave this commented; DO NOT SET IT TO FALSE [Issue #185]
  
# THIS SECTION IS REQUIRED ########################################################################
[Log]
  Level = "info"            # Only log messages at or above the given level. [debug, info, warn, error, fatal]
  Requests = true           # Log HTTP requests made to telly

# THIS SECTION IS REQUIRED ########################################################################
[Web]
  Base-Address = "0.0.0.0:6077"   # Set this to the IP address of the machine telly runs on AS SEEN BY PLEX
                                  # telly will be telling Plex to connect to URLs at this address.
  Listen-Address = "0.0.0.0:6077" # this can stay as-is

# THIS SECTION IS OPTIONAL ========================================================================
#[SchedulesDirect]           # If you have a Schedules Direct account, fill in details and then
                             # UNCOMMENT THIS SECTION
#  Username = ""             # This is under construction; There is no provider
#  Password = ""             # that works with it fully at this time

# AT LEAST ONE SOURCE IS REQUIRED #################################################################
# COPY/PASTE THIS BLOCK TO ADD MORE SOURCES #######################################################
# THIS EXAMPLE WILL NOT WORK AS-IS ################################################################
[[Source]]
  Name = ""                 # Name is optional and is used mostly for logging purposes
  Provider = "Custom"       # DO NOT CHANGE THIS
                            # "Custom" is telly's internal identifier for this 'Provider'
                            # If you change it to "SOMETHING ELSE", telly's reaction will be
                            # "I don't recognize a provider called 'SOMETHING ELSE'."
  M3U = "http://myprovider.com/playlist.m3u"  # This can be either URL or fully-qualified path.
                            # This needs to be an M3Uplus file
                            # IT CANNOT BE A STREAM ADDRESS
                            # IT CANNOT BE AN M3U THAT LINKS TO ANOTHER M3U
  EPG = "http://myprovider.com/epg.xml"       # This can be either URL or fully-qualified path.
  # THE FOLLOWING KEYS ARE OPTIONAL IN THEORY, REQUIRED IN PRACTICE
  Filter = "YOUR_FILTER_REGULAR_EXPRESSION"
                            # Telly is written in Go, and uses the Go regular expression system, 
                            # which is limited compared to other regular expression parsers.
  FilterKey = "group-title" # Telly applies the regular expression to the contents of this key in the M3U.
  FilterRaw = false         # FilterRaw will run your regex on the entire line instead of just specific keys.
  Sort = "group-title"      # Sort will alphabetically sort your channels by the M3U key provided
# END TELLY CONFIG  ###############################################################################

#f03c15 You only need one source; the ones you are not using should be commented out or deleted.#f03c15 The name and filter-related keys can be used with any of the sources.

Most testing and deployments use the TOML format for the config file. The config file can also be in JSON, YAML, HCL, and Java Properties formats if required.

For example, the cloudbox role uses json because the cloudbox project already contained infrastructure to update a json config from a template.

These alternate formats receive less testing compared to TOML by telly developers. However, the file parsing is not done by telly directly, rather by a library, so risk is low.

Note that position is significant for these elements; some of the alternate formats below do not include all possible elements; refer to the TOML example above for all available elements and their positions.

You can retrieve this example config file, auto-converted into these alternate formats, from this wiki:

curl -fLO https://github.com/tellytv/telly/wiki/files/examples/telly.config.json
curl -fLO https://github.com/tellytv/telly/wiki/files/examples/telly.config.yaml
curl -fLO https://github.com/tellytv/telly/wiki/files/examples/telly.config.hcl
curl -fLO https://github.com/tellytv/telly/wiki/files/examples/telly.config.properties
Clone this wiki locally
You can’t perform that action at this time.