Skip to content


Kodi image

Kodi is a Home Media Server (basically your own personal Netflix), formerly known as XBMC. Kodi is currently an optional package that can be installed from the RetroPie-Setup script.

General Information

Check out the site for more information about Kodi.


Visit the RetroPie-Setup Screen, select Optional Packages, and choose Kodi. After installation, you will be able to go to the Ports section and start Kodi from the newly added entry.

Raspberry PI - DRM-enabled services

For streaming services that use DRM to encrypt/scramble the video content (Netflix/Amazon Prime/etc.), Kodi needs an additional Debian package which is not automatically installed (libwidevinecdm0). To install it, run the following command from a login shell:

sudo apt install -y libwidevinecdm0
The same package needs to be installed in order to play DRM enabled content from a web browser (Firefox/Chromium) on the RaspiOS desktop.

PVRs Installation

By default, RetroPie doesn't install any PVRs (personal video recorders). If you want to install them, run the following commands in a terminal:

Search available PVRs:

apt search kodi-pvr
Install one PVR, in this case the IPTV Simple Client:
sudo apt install kodi-pvr-iptvsimple
Install all PVRs:
sudo apt install kodi-pvr*

Joypad Support

The latest Kodi module (Kodi 17/17.6) includes joypad support by default. Some joypads are detected and work out-of-the-box like PS3, Xbox360, Logitech, iBuffalo, Retrolink SNES, and more. If your joypad doesn't work OOTB or you prefer to add your custom keymap, create the file /home/pi/.kodi/userdata/keymaps/joystick.xml like the following:

Example joystick.xml

<?xml version="1.0" encoding="UTF-8"?>
    <joystick name="USB gamepad">
      <button id="3">Select</button>
      <button id="2">Back</button>
      <axis id="1" limit="+1">Right</axis>
      <axis id="1" limit="-1">Left</axis>
      <axis id="2" limit="-1">Up</axis>
      <axis id="2" limit="+1">Down</axis>

You can see what your joystick name is with cat /proc/bus/input/devices.

For more information on how to create your custom keymaps for Kodi, check here

Xbox 360:

If you are experiencing problems with your Xbox controls, see the following examples and adapt for your version of controller - HERE - Example 1 - Example 2 - Example 3

Kodi as its own system instead of in ports

The first method here is a cleaner method that won't mess with the RetroPie setup script updates. (Note: in the future, you will have to manually update /home/pi/.emulationstation/es_systems.cfg, as it will not be overwritten by RetroPie updates.) Once you've installed Kodi from the optional menu of the setup script, drop into a terminal with F4 or access the pi over SSH.

Create an es_systems.cfg file so that Kodi will show up in EmulationStation:

cp /etc/emulationstation/es_systems.cfg /home/pi/.emulationstation/es_systems.cfg
nano /home/pi/.emulationstation/es_systems.cfg
Add the following codeblock anywhere after <systemList> and before </systemList>:
    <extension>.sh .SH</extension>
    <command>bash %ROM%</command>

Save your changes with ctrl+x , y , enter.

Then make a Kodi ROM directory:

mkdir /home/pi/RetroPie/roms/kodi

Create the launch script and make it executable:

echo "kodi-standalone" > /home/pi/RetroPie/roms/kodi/
chmod +x /home/pi/RetroPie/roms/kodi/

Type emulationstation to go back into EmulationStation, and Kodi should be there as its own system.

Adding a VPN

Install dependencies:

sudo apt update
sudo apt install openvpn psmisc

From the terminal in RetroPie Download Addon:


In Kodi:

  • Go to addons
  • Select the open box icon
  • Install from Zip
  • Navigate to where you just downloaded the repo
  • Install the repository
  • Go back to addons
  • Select the open box icon
  • Now select install from repository
  • Select VPN Manager for OpenVPN

Then follow the directions to configure your VPN provider. If it's unsupported (like NordVPN) you can set it to user defined, manually import the server configurations, and set them up as their own source in the Kodi file manager so they are accessible to the addon.

Old configs

# Kodi on Raspbian Wheezy
## Black Screen Freeze Fix

If you find yourself having troubles with your screen freezing when you exit Kodi, you can replace the code in `/roms/ports/` with



rm $LOG_FILE 2> /dev/null

/usr/lib/kodi/kodi.bin --standalone &

while [[ ! -f $LOG_FILE ]] ; do
  sleep 1s

while read line ; do
  if [[ ${line} =~ "application stopped" ]] ; then
    echo "Killing kodi"
done < <(tail --pid=$$ -f -n0 $LOG_FILE)

killall kodi.bin

fbset -depth 8 && fbset -depth 16

(note there may be some issues with the framebuffer but its the only functioning fix at the moment short of compiling Kodi 15)
Back to top