Public Repository

Last pushed: a year ago
Short Description
Tvheadend server for the ARM based Raspberry PI
Full Description

Tvheadend Docker Image

Orginaly just made for ARM architecture but now also supporting x86/x64 platform, see Dockerfile.x86_64 and/or get the x86_64-image!

Turn your Raspberry PI (or x86_64 machine) within 15 minutes into a TV streaming and recording server for your local network! This project uses the well known Tvheadend software, is based on alpine Linux, which is with ~5 MB much smaller than most other distribution base, and thus leads to a slimmer Tvheadend target image.

Find the full source code at GitHub or the ready-to-run images in the DockerHub for the ARM or x86_64 platform and do not forget to star the repository ;-)



  • Install a debian Docker package, which you download here and install with dpkg -i package_name.deb. Alternatively install HypriotOS, which is based on Raspbian a debian derivate and results to a fully working docker host, see Getting Started!
  • Get the right DVB-C/S/T Linux firmware, e.g.
/lib/firmware $ wget
  • Change your network interface to a static IP
$ cat /etc/network/interfaces
  allow-hotplug eth0
  iface eth0 inet static
    address 192.168.PI.IP
    gateway 192.168.XXX.XXX
  • Integrate your NAS permanently
$ cat /etc/fstab
  192.168.NAS.IP:/nfs/Public /mnt nfs auto  0 0

Alternatively ... if you are lazy, use a docker volume plugin, which enables the volume type NFS to be mounted directly within the container, see Netshare docker plugin. After install you can use it like this

$ docker run -it --volume-driver=nfs --volume NFShost/path:/data alpine /bin/ash
$ cd /data
$ touch testfile
  • Pull the respective docker image $ docker pull netzfisch/rpi-tvheadend


To build and tag the image by yourself, e.g. for the Intel x86_64 platform do

$ vim Dockerfile.x86_64
$ docker build -t netzfisch/tvheadend:test Dockerfile.x86_64
$ docker tag netzfisch/tvheadend:test netzfisch/tvheadend:4.0.9

Find the automated build for that at DockerHub.


Get ready to roll and run the container:

$ docker run --detach \
             --name tvheadend \
             --restart unless-stopped \
             --volume /mnt/Configs/tvh-config:/config \
             --volume /mnt/Movies:/recordings \
             -p 9981-9982:9981-9982 \
             --privileged netzfisch/rpi-tvheadend

Finally configure Tvheadend via the web interface at http://192.168.PI.IP:9981. An initial user is created, so you will be logged in flawless, and setup wizard should start immediately!

HEADS UP If you are running into problems like

2016-10-02 18:32:25.705 dvr: Unsupported charset ASCII using ASCII
2016-10-02 18:32:25.705 dvr: Recording error: Unable to create file

check the Web-GUI [ Recording > DVR-Profile > Advanced View > Filename Charset ] if set to a supported charset format, e.g. UTF-8! At my installation it was set to ASCII which failed to write to the NAS, and cost me too much time to debug ;-( ... encoding in 2016 still sucks!


If you run into trouble, try to get a clean setup at docker host level

$ docker stop tvheadend && docker rm tvheadend # stop and remove container
$ rmmod dvb_usb_vp7045 dvb_usb dvb_core        # remove DVB-T linux modules
$ modprobe dvb_usb_vp7045                      # reload DVB-T linux modules
$ docker run --detach \                        # create new containter
             --name tvheadend \

and than go into the container for further debugging:

$ docker exec -it tvheadend /bin/ash


If you find a problem, please create a GitHub Issue.

Have a fix, want to add or request a feature? Pull Requests are welcome!


The MIT License (MIT), see LICENSE file.

Docker Pull Command

Comments (3)
10 months ago

Trying to build tvheadend from git master got me running into

10 months ago

And again running into encoding problems:

2016-12-30 23:36:24.655 [   INFO] subscription: 0010: "DVR: Die Frau in Rot" subscribing on channel "BR Fernsehen Süd", weight: 300, adapter: "TechniSat SkyStar USB 2 HD CI", network: "Astra", mux: "11836.5H", provider: "ARD", service: "BR Fernsehen Süd", profile="pass"
2016-12-30 23:36:25.162 [  ERROR] dvr: Unsupported charset ISO_8859-15 using ASCII
2016-12-30 23:36:25.179 [  ERROR] dvr: Unsupported charset ISO_8859-15 using ASCII
2016-12-30 23:36:25.179 [  ERROR] dvr: Recording error: "Die Frau in Rot": Unable to create file

After that the whole tvheadend becomes unresponsive, as described at

2016-12-30 23:36:40.175 [WARNING] mpegts: too much queued table input data (over 2MB), discarding new
$ dmesg | tail -1
[14028.217338] TCP: request_sock_TCP: Possible SYN flooding on port 9981. Dropping request.  Check SNMP counters.

$ uname -a
Linux tvheadend 4.4.39-hypriotos-v7+ #1 SMP PREEMPT Sun Dec 18 15:01:46 UTC 2016 armv7l GNU/Linux
$ cat /proc/sys/net/ipv4/tcp_syncookies
a year ago

Re: how to mount an NFS share to store recordings:

Synology DiskStation NAS ( exporting the share:

admin@DiskStation:~$ sudo grep all_squash /etc/exports

Raspberry Pi ( mounting the share:

osmc@osmc:~$ sudo grep all_squash /etc/fstab /mnt/rec.all_squash nfs nfsvers=3,rw,nolock,x-systemd.automount,noauto 0 0

osmc@osmc:~$ ls -lan /mnt/rec.all_squash/Battledogs/
total 388612
drwxrwxr-x 2 1024 100      4096 May 23 23:24 .
drwxrwxrwx 5    0   0      4096 May 23 23:24 ..
-rw-rw-r-- 1 1024 100 397922304 May 23 23:44 Battledogs.Horrorthriller,-USA-2013.2016-05-23.22-01.ts