← How-Tos
raspberry-pi Aug 4, 2026 ◑ 2 views ◯ 6 min read

Building a Raspberry Pi HTPC with Kodi: LibreELEC Setup, Remote Control, and CEC

kodihtpclibreelecmedia centerhdmi cecir remotehome theaterhowto

This site's Raspberry Pi media coverage so far is aimed at self-hosted server infrastructure — Home Assistant, Frigate NVR, Immich photo hosting, a general home server guide — not a dedicated living-room media center you actually point a remote at and watch. Kodi on a Pi is a different use case entirely: a purpose-built HTPC (home theater PC) frontend that boots straight into a full-screen media browser, plays local and network media, and is controlled from the couch with a remote rather than SSH and a browser tab. It's a distinct enough setup, with its own remote-control and CEC considerations, to be worth covering on its own rather than folding into the general home server content.

Why a Dedicated Kodi Box Instead of Plex/Jellyfin on Your Existing Server

If you already run a home server (per this site's self-hosting guide), you might have Plex or Jellyfin running there already. A dedicated Kodi HTPC on a separate Pi is still worth it in a few specific cases: it works with a purely local media library (USB drive or network share) with zero server dependency, it handles local files with more format/codec flexibility than some server-based transcoding setups, and it gives you a proper 10-foot interface with a physical remote rather than a phone or smart TV app. Kodi can also connect back to a Jellyfin or Plex server as its backend if you want the interface without giving up server-based library management — the two aren't mutually exclusive.

Hardware Choice

Pi model4K playbackNotes Raspberry Pi 4 (4GB+)Yes, H.264/H.265 hardware decodeSolid baseline choice, well-supported by LibreELEC Raspberry Pi 5Yes, improved decode performance and USB throughputBest current choice if buying new; faster UI navigation and better handling of high-bitrate 4K remux files Raspberry Pi Zero 2 W1080p only, not recommended for 4KWorkable for a secondary bedroom TV running lower-resolution content, not a primary HTPC

Pair with an active-cooled case if running long movie-length sessions — sustained 4K decode generates enough heat to throttle a passively cooled Pi 4/5 over a two-hour film, which shows up as dropped frames or stutter partway through playback.

LibreELEC vs. Kodi on Raspberry Pi OS

ApproachProsCons LibreELEC (dedicated Kodi-only OS)Boots directly to Kodi in seconds, minimal maintenance, purpose-built and lighter weight, easiest remote/CEC supportNot a general-purpose OS — if you want the Pi to also run other services, this isn't the image to use Kodi installed on standard Raspberry Pi OSCan coexist with other software/services on the same PiMore setup work to get it auto-launching full-screen at boot, generally less polished as a dedicated HTPC experience

For a single-purpose HTPC, LibreELEC is the practical choice and what the rest of this guide assumes — it's a minimal Linux distribution that exists solely to boot into Kodi, similar in spirit to how this site's OctoPrint/print-server guide uses a purpose-built image rather than general Raspberry Pi OS.

Installation

  1. Flash LibreELEC to a microSD card (or USB SSD for better performance and reliability — media libraries with large thumbnail/artwork caches benefit noticeably from SSD speed over SD card) using the official LibreELEC USB-SD Creator tool or Raspberry Pi Imager, which has LibreELEC listed under "Media Player OS" in its OS list.
  2. First boot and network setup — LibreELEC's initial setup wizard handles WiFi/Ethernet configuration and hostname on first boot, no separate headless setup steps are typically needed since you'll have the Pi connected to a TV/display for this step anyway.
  3. Add media sources. Point Kodi at a network share (SMB/NFS from your existing home server or NAS) or a directly attached USB drive under Settings > Media > Sources. For network shares, use a static IP or hostname for the source device to avoid Kodi losing the connection if your server's address changes.
  4. Enable a media scraper (TheMovieDB, TheTVDB) so Kodi pulls proper artwork, descriptions, and metadata rather than showing a flat file browser — this is what makes the interface feel like a real media center rather than a folder listing.

HDMI-CEC: One Remote for Everything

HDMI-CEC (Consumer Electronics Control) lets Kodi respond to your TV remote directly over the HDMI cable, with no separate IR receiver or remote needed — press play/pause/volume/navigation on your existing TV remote and Kodi responds. LibreELEC has CEC support enabled by default on the Pi's HDMI output, but real-world reliability depends heavily on your TV brand's CEC implementation:

TV brand's CEC namingNotes LG SimpLinkGenerally solid CEC support Samsung Anynet+Generally solid, occasionally needs manual enabling in TV settings menu Sony Bravia SyncGenerally solid Vizio, budget/off-brand setsCEC support is inconsistent — test before relying on it as your only remote solution

If CEC proves unreliable with your specific TV, a dedicated Kodi-compatible IR remote with a USB IR receiver, or the official Kodi mobile app (which controls Kodi over your local network, no line-of-sight needed) are reliable fallbacks. Many people end up using CEC for daily playback control and keep the mobile app on hand for library browsing and search, where typing on a TV remote is painful regardless of CEC.

Auto-Play and Library Behavior Worth Configuring

Performance Tuning

SettingRecommendation GPU memory split (config.txt, if adjusting manually)LibreELEC manages this automatically in most cases; manual tuning is rarely needed unless running unusual add-ons Skin choiceDefault Estuary skin is lightweight and reliable; heavier third-party skins with animated backgrounds can feel sluggish on a Pi Zero 2 W or older Pi 4 Thumbnail/artwork cache locationStore on the same fast storage as the OS (USB SSD ideal) rather than a slow network share, since library browsing repeatedly hits this cache Whitelist refresh rate matchingEnable "Adjust display refresh rate" so Kodi switches the Pi's HDMI output to match each video's native frame rate — reduces judder on 24fps film content played on a 60Hz-default display

A Kodi HTPC on a Pi 4 or 5 costs well under $100 all-in and, once CEC or a remote is working reliably, disappears into the background the way a real living-room appliance should — a purpose-built frontend rather than a general-purpose Linux box you're asking to also behave like a media center. If you already run Jellyfin or Plex on a home server elsewhere in the house, pointing this Pi's Kodi install at that server as a backend gets you the best of both: centralized library management with a dedicated, fast, remote-friendly playback device at the TV.