📡 Tvheadend Complete Setup 2026
Tvheadend is the open source IPTV server for Linux. Active since 2012, it runs DVB-T/C/S and IPTV, and serves Kodi/Plex/Jellyfin. Complete setup guide for Ubuntu Server 22.04 / 24.04.
Advertisement
🤔 What is Tvheadend?
Tvheadend (TVH) is a TV streaming server backend for Linux. It:
- Accepts input from DVB-T/C/S tuners, IPTV (M3U), SAT>IP, and Unix pipes
- Manages channels + EPG centrally
- Schedules DVR recordings
- Serves channels to clients (Kodi, Plex, Jellyfin) via the HTSP protocol or HTTP streams
- Has a web interface for management
- Open source since 2012, actively maintained
Compared to Threadfin: Tvheadend is far more powerful (multi-tuner, DVB support) but more complex. Threadfin is simpler for IPTV-only.
📋 Requirements
- Linux server — Ubuntu Server 22.04 LTS or 24.04 LTS
- A Raspberry Pi 4/5, NAS, or x86 mini-PC works fine
- At least 2GB RAM, 8GB storage for the OS
- For DVR: extra storage (USB/SMB/NAS)
- An M3U URL and/or DVB tuner hardware
📥 Installation on Ubuntu Server
Option A: Snap (easiest)
sudo apt update
sudo snap install tvheadend
Then open in your browser: http://server-ip:9981
Option B: APT repository (traditional)
# Add the Tvheadend PPA
sudo add-apt-repository ppa:tvheadend/tvheadend
sudo apt update
sudo apt install tvheadend
# During install: enter admin user + password
# The service starts automatically on port 9981 (web) + 9982 (HTSP)
Option C: Docker
version: "3"
services:
tvheadend:
image: linuxserver/tvheadend
container_name: tvheadend
network_mode: host
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./config:/config
- ./recordings:/recordings
restart: unless-stopped
⚙️ Step 1: Setup Wizard
- Open
http://server-ip:9981in your browser - The wizard starts automatically:
- Language → English
- Network IP → leave default (auto-detect)
- Admin user → username + strong password
- User access → create a read-only user for apps
- The wizard asks for a tuner — choose "IPTV" (no DVB hardware) or "DVB" if you have a tuner card
📺 Step 2: Add an IPTV network + M3U
- Configuration → DVB Inputs → Networks → Add
- Type: IPTV Network
- Fill in:
- Network name: e.g. "Provider X"
- Maximum Input streams: 5 (simultaneous count)
- Maximum Number of services: 5000 (channels)
- Service identifier:
auto
- Save
- The Muxes tab → Add → Auto IPTV Network → URL = your M3U URL
- Save → Tvheadend scans the channels automatically
Advertisement
📅 Step 3: EPG Grabber
- Configuration → Channel/EPG → EPG Grabber Modules
- Enable External: XMLTV
- The EPG Grabber tab → Cron multi-line:
0 */6 * * *(every 6 hours) - External Grabber Path: default
/usr/bin/tv_grab_xmltv - Or: use the xmltv socket import from your own script
- Save → manually trigger the first run
Channel mapping
Configuration → Channel/EPG → EPG Grabber Channels → match a channel with its EPG ID.
📡 Step 4: Map channels
- Configuration → Channel/EPG → Channels
- For each channel: double-click to edit
- Name (display name)
- Number (channel number)
- Icon URL (logo)
- EPG source mapping
- Or in bulk: Configuration → Channel/EPG → Services → "Map services" button
💾 Step 5: Configure DVR recordings
- Configuration → Recording → Digital Video Recorder Profiles
- Edit the default profile:
- Recording system path:
/recordings/$t - Title: enabled
- Subtitle: enabled
- Episode: enabled
- Pre-recording padding: 2 min
- Post-recording padding: 10 min
- Recording system path:
- Save
- Schedule a recording: go to the EPG → click a programme → "Record"
🔌 Step 6: Connect Kodi (HTSP)
- In Kodi: Settings → Add-ons → My Add-ons → PVR clients
- Select Tvheadend HTSP Client
- Enable + Configure:
- Host: server IP
- HTTP port: 9981
- HTSP port: 9982
- Username + Password from Tvheadend
- Save → Restart Kodi
- The TV menu in Kodi now shows the Tvheadend channels + EPG
🔌 Connecting Plex / Jellyfin
Tvheadend serves an HTTP M3U at http://server-ip:9981/playlist/channels.m3u and XMLTV at http://server-ip:9981/xmltv/channels.
Or: use Threadfin as a middle layer for HDHomeRun emulation toward Plex.
⚠️ Common problems
"No free tuner"
- Increase "Maximum Input streams" in the IPTV network
- Check whether several clients are claiming the same tuner
Stream stutter
- Configuration → Stream → Stream Profile → MPEG-TS Pass-through
- Avoid transcoding unless truly needed
EPG missing
- Check the EPG Grabber log: Configuration → Debugging
- Wrong channel EPG mapping → set it manually per channel
🆚 Tvheadend vs Threadfin vs Jellyfin native
| Tvheadend | Threadfin | Jellyfin Live | |
|---|---|---|---|
| Complexity | ★★★★★ | ★★★ | ★★ |
| DVB hardware support | ✅ | ❌ | ❌ |
| Multi-tuner management | ✅✅ | ✅ | ⚠️ |
| EPG grabber | ✅✅ | ✅ (XMLTV only) | ⚠️ |
| DVR scheduling | ✅✅ | ❌ | ✅ |
| Setup time | 1-3 hours | 15 min | 10 min |
| Best for | Power users, multi-source | Pure IPTV → Plex/Jellyfin | Quick setup |