HOW-TO:Install Kodi for Linux: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(XBMC is now installable from official Debian repositories)
(Added note that the PPA is unmaintained, and removed the recommendation to use it)
 
(145 intermediate revisions by 27 users not shown)
Line 1: Line 1:
{{mininav|[[General topics]]{{l2|[[Devices]]}}|[[Installing]]{{l2|[[Linux]]}}|page=HOW-TO:Install XBMC for Linux}}
{{Mininav|[[Linux]] {{L2| [[Installing]] }} }}
{{see also|XBMC for Linux specific FAQ}}


These are instructions for people who already have a Linux-based OS set up. If you have not installed a Linux-based OS yet, you might wish to try out [[XBMCbuntu]] which will install both the OS and XBMC with an easy installer.


==Official Team XBMC repositories==
== Installing Kodi on Ubuntu-based distributions with Team Kodi PPA ==


===Ubuntu===
'''Please note that currently the Team Kodi PPA is not maintained due to the previous sole maintainer stepping away from the responsibility. '''
;Simple Install Instructions


{{note|1=[http://help.ubuntu.com/community/UsingTheTerminal Click here to find out how to use the terminal.]}}
For now the only options are building from source, using Flatpak or a distro such as Debian which includes Kodi in their distribution.


*Before you run these comands type "sudo echo" into the terminal and hit Enter.
*Then copy the area below up to sudo add...
*Go back to the terminal, hit the middle mouse button and when it prompts hit Enter.
*Copy the part after sudo add... and paste it to the terminal.
*If it askes you if you want to install enter y and hit Enter


<source lang="bash">
{{Warning|Ubuntu releases 16.04 LTS ("Xenial") or later, respectively, include their own Kodi builds in their official package repositories, customized to satisfy their interpretations of what is acceptable under their open-source mandates. If you have installed your distribution's Kodi packages, please purge them using the command <syntaxhighlight lang="shell" inline>sudo apt purge kodi\*</syntaxhighlight> before trying to install team-xbmc PPA packages.}}
sudo apt-get install python-software-properties pkg-config
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xbmc


</source><br />


;Repositories
{{Warning|Releases from Team Kodi PPA are NOT compatible with Debian GNU / Linux and distributions built on top of Debian's binary package repositories! Please refer to '''Debian''' section of this page for installation instructions on such distributions!}}
*https://launchpad.net/~team-xbmc/+archive/ppa  '''ppa:team-xbmc/ppa'''
*https://launchpad.net/~team-xbmc/+archive/unstable  '''ppa:team-xbmc/unstable'''
*https://launchpad.net/~team-xbmc/+archive/xbmc-nightly  '''ppa:team-xbmc/xbmc-nightly'''


Frodo is available from Ubuntu 11.10 (Oneiric Ocelot) to 13.04 (Raring Ringtail), you can install from the team-xbmc PPA as follows or replace the ppa with the desired from above.
See [[SFTP]] or [http://help.ubuntu.com/community/UsingTheTerminal Click here to find out how to use the terminal.]


<source lang="bash">
sudo apt-get install python-software-properties pkg-config
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xbmc
</source>


===XBMCbuntu===
=== Adding Team Kodi PPA repository ===
{{main|XBMCbuntu}}
{{#lst:XBMCbuntu|intro}}


==Standard OS repositories==
Use the command line terminal in Ubuntu, and enter the following commands. Follow the prompts as you would any other software installation.


A number of distributions now provide packages for XBMC. Since installation via distribution packages is simple (usually one or two commands) and the easiest way to get started, this section includes the minimum information on doing that. Distributions are listed in alphabetical order. Following the instructions provided should result in you having a working stand-alone XBMC installation.
<syntaxhighlight lang="shell">
sudo apt install software-properties-common
sudo add-apt-repository -y ppa:team-xbmc/ppa
sudo apt install kodi
</syntaxhighlight>


===Arch===
{{#lst:Official_Ubuntu_PPA|repos}}


As stable xbmc releases are already available through the '''community''' repository, please make sure you have it enabled in your '''/etc/pacman.conf'''. After that it's as simple as using pacman to install the most recent version of xbmc in the repository along with all of its dependencies:
Note that this PPA only provides builds for Ubuntu i386 and Ubuntu amd64 but ''not for Ubuntu armhf'', which can run on a Raspberry Pi.


pacman -Sy xbmc


===Foresight===
=== Installing binary add-ons (PVR, audio decoders, audio encoders, screensavers, visualizations, audio DSP) ===
{{See|Ubuntu binary add-ons}}


xbmc is in official repositories and can be installed by running:


sudo conary install xbmc
=== Installing a development build ===
{{See also|Development builds}}
To install a beta/unstable version of {{Kodi}} you must first add the unstable repository, then install XBMC. Use <code>ppa:team-xbmc/xbmc-nightly</code> for nightly builds and <code>ppa:team-xbmc/unstable</code> for [[Development_builds|beta]] builds.


===Gentoo===
<syntaxhighlight lang="shell">
sudo apt install software-properties-common
sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly
sudo apt install kodi
</syntaxhighlight>


xbmc is in the official portage tree as media-tv/xbmc. Install with:
Note that if you have any addons (such as PVR clients), these must be updated as well (they will not be updated automatically):
  sudo emerge --autounmask xbmc
<syntaxhighlight lang="shell">
sudo apt install kodi-pvr-mythtv
</syntaxhighlight>


===Mageia===


PVR-enabled XBMC is available in the official repositories. You can install it with the graphical package manager or with the following command:
=== Upgrading ===
urpmi xbmc
<section begin="Ubuntu upgrade" />
To update Kodi when a new version is released, just do a general system/package or use the following commands in the terminal (or via [[SFTP]]):


Mageia 2 ships with XBMC 11.0 (Eden); Mageia 1 ships with XBMC 10.1 (Dharma). Both have opdenkamp's PVR support added.
<syntaxhighlight lang="shell">
sudo apt update
sudo apt upgrade --with-new-pkgs
</syntaxhighlight>
<section end="Ubuntu upgrade" />


===Mandriva===


XBMC 10.1 (Dharma) with PVR support is available in '''contrib/updates''' of Mandriva 2010.1. You can install it with
=== Downgrading to a stable version from a development version ===
If you install a nightly build or an unstable release and want to return to a stable release, follow these instructions:


urpmi xbmc  
Remove the unstable or nightly PPA:
<syntaxhighlight lang="shell">
apt-cache policy | grep -Eo 'team-xbmc/(unstable|nightly)' | sudo xargs -r add-apt-repository -ryP
</syntaxhighlight>


Mandriva 2009.1 and 2010.0 have older versions of XBMC that can be installed by running:
Then restore the stable version with the following commands:
<syntaxhighlight lang="shell">
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get remove kodi kodi-x11
sudo apt-get install kodi
</syntaxhighlight>


urpmi --searchmedia Backports xbmc


Of course, you can [http://wiki.mandriva.com/en/Docs/Basic_tasks/Installing_and_removing_software#Advanced_use:_Backports_and_candidate_updates install from contrib/backports] or from contrib/release using the GUI tool rpmdrake. Note that all these methods are most easily used if you have [http://wiki.mandriva.com/en/Docs/Basic_tasks/Installing_and_removing_software#Do_you_have_the_online_software_repositories_set_up_correctly.3F the full software sources enabled].
=== Downgrading between newer and older stable versions ===
If you want to return to the next most recent stable release, follow these instructions:


===Debian===
Remove the current stable packages and PPA:
<syntaxhighlight lang="shell">
sudo apt purge kodi\*
sudo add-apt-repository -r ppa:team-xbmc/ppa
</syntaxhighlight>


XBMC from Debian uses Debian's packaged libraries instead of the ones embedded in XBMC source releases. You can learn about the differences here: [http://balintreczey.hu/blog/introducing-xbmc-from-debian XBMC from Debian].
Then install the "oldstable" version with the following commands:
You can install latest XBMC version by running:
<syntaxhighlight lang="shell">
sudo add-apt-repository -y ppa:team-xbmc/kodi-old
sudo apt install kodi
</syntaxhighlight>


sudo apt-get install xbmc


To install Frodo 12.3 on Wheezy you will need to enable [http://backports.debian.org/Instructions/ wheezy-backports].
=== Reverting to an earlier nightly ===
ALthough launchpad doesn't list older nightlies in their PPA, they are usually still available for download directly from the website. Visit the [https://launchpad.net/~team-xbmc/+archive/ubuntu/xbmc-nightly/+packages?field.name_filter=&field.status_filter=superseded&field.series_filter= xbmc-nightly repository index], where you will then have to download the appropriate .deb files and manually install them using <code>sudo dpkg -i [path to downloaded file]</code>.


==Third-party repositories==


===Ubuntu===
=== Uninstalling ===
;Wsnipex - Xvba and improved Vdpau (not mainline)
If you need to uninstall Kodi and purge its global configuration files (for instance, in the attempt to troubleshoot a persistent crash or other errors), do so by using the first of the following commands. If that fails to solve the issue, you will likely need to remove your user settings folder with all of your settings and library data to return to a state equivalent to what existed before Kodi was first installed on the system. This will not delete any videos or music, but just the settings and library data itself, but it is still recommended to keep a backup of them in case it's discovered that they weren't at issue and you are able to effect another solution. An example of how to accomplish a backup and then deletion of your user settings is provided on the last two lines, the highlighted one being responsible for making the backup which can thereafter be found in your home folder with the filename kodi-backup_''timestamp''.tar.xz.
*https://launchpad.net/~wsnipex/+archive/xbmc-xvba-frodo  '''ppa:wsnipex/xbmc-xvba-frodo'''
*https://launchpad.net/~wsnipex/+archive/xbmc-xvba  '''ppa:wsnipex/xbmc-xvba'''


;Nathan Renniewaldock (contains older Ubuntu support, etc)
<syntaxhighlight lang="shell" highlight="2-3">
*https://launchpad.net/~nathan-renniewaldock/+archive/xbmc-stable  '''ppa:nathan-renniewaldock/xbmc-stable'''
sudo apt purge kodi\*
*https://launchpad.net/~nathan-renniewaldock/+archive/xbmc-nightly  '''ppa:nathan-renniewaldock/xbmc-nightly'''
tar cf - "${HOME}/.kodi/" | xz -z9e - >"${HOME}/kodi-backup_$(date +%m%d%y-%H%M).tar.xz"
rm -Ri "${HOME}/.{kodi,xbmc}/"
</syntaxhighlight>


===Fedora and CentOS===


xbmc builds for Fedora and CentOS 6 can be installed via the [http://rpmfusion.org/ RPM Fusion] set of repositories. Follow the [http://rpmfusion.org/Configuration RPM Fusion Configuration guide] to set up the repositories and install by running:


sudo yum install xbmc
== Flatpak ==


===openSUSE===
If you want to use the flatpak version and do not know, if your distro supports flatpak check https://flatpak.org/setup/ for install instructions.


xbmc is available in the [http://ftp.skynet.be/pub/packman/suse/ Packman] repository. To install, add the Packman repository ('''YaST (package manager) --> repositories --> repositories manager --> add --> community repositories'''), after which you can install by running:
After you've sorted that, go to https://flathub.org/apps/tv.kodi.Kodi and hit the install button or copy the instructions at the end of the page to your terminal and execute them.


sudo zypper in XBMC


More information is available on the [[HOW TO install XBMC on openSUSE Linux]] page.
=== Beta channel ===
You can also run Kodi flatpak betas, if you install the flatpak beta remote.  


===Debian Squeeze===
<syntaxhighlight lang="shell" highlight="2-3">
Debian officially supports xbmc since Wheezy. However there are repositories which as well provide a xbmc for older debian-versions.
flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
Excellent packages of recent xbmc versions (currently 12.0, updated regularly) for debian Squeeze (stable) can be found here:
</syntaxhighlight>


http://debian.oppserver.net/xbmc/
Then install via
<syntaxhighlight lang="shell" highlight="2-3">
flatpak install flathub-beta tv.kodi.Kodi
</syntaxhighlight>


Instructions are in German but the code snippets regarding the adding of the sources should be understandable to anyone who speaks debian (or apt). Packages seem to be built from git repository and are updated at seemingly random times (probably based on the available time of the repository maintainers).
You should now have an entry on your system, that's labeled `Kodi (Beta)`, that you can use to run the beta. Be warned, it will use the same paths as the older versions, so they might clash. Usually they go along well, but make backups, if you need your data.


'''Please note:''' the packages in this repository depend on packages from debian-multimedia and debian backports, so you will have to add those to your sources.list as well!


===Mint PPC===
Have a Power PC computer? XBMC can be built for that, with some limitations:


http://forum.xbmc.org/showthread.php?tid=173287
== Embedded/Appliance type install==


== Autostarting XBMC ==


There's several ways to start automatically XBMC:
=== LibreELEC ===
* [[HOW-TO:Install_XBMC_for_Linux#Upstart_init_script|Upstart script xbmc.conf in /etc/init (short and sweet)]]
{{main|LibreELEC}}
* [[HOW-TO:Install_XBMC_for_Linux#Modify_the_inittab|Modifying the inittab (log winded)]]
{{#lst:LibreELEC|intro}}
* [[HOW-TO:Install_XBMC_for_Linux#Add_a_new_init_script|Add a new init script]]


===Upstart init script===
Create a '''<code>/etc/init/xbmc.conf</code>''' with following contents.
<source lang="xml">
# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc


description    "XBMC-barebones-upstart-script"
== Third Party Repositories ==
author          "Matt Filetto"
<!-- Please only list repos that use an internal ffmpeg library -->


start on (filesystem and stopped udevtrigger)
The instructions in this section are for unofficial Linux binaries that are un/semi supported by Team Kodi. Most of those binaries use system ffmpeg or even worse totally untested libav, which is not recommended for {{kodi}} as we support ffmpeg only.
stop on runlevel [016]


# tell upstart to respawn the process if abnormal exit
respawn


script
=== Debian ===
  exec su -c "xinit /usr/bin/xbmc --standalone -- -nocursor :0" $USER
Debian GNU/Linux ships its own '''Kodi from Debian''' flavor with following changes:
end script
</source><br />


{{note|<code> -- -nocursor</code> option '''kills all X cursor''' on XBMC startup and does not interfere with mouse use/operation}}
* Only system libraries are used (no embedded third-party libraries except of libdvdread and libdvdnav)
* Old web interface (Chorus) is shipped to ensure Debian Free Software Guides (DFSG) compatibility


You may have to edit '''<code>/etc/X11/Xwrapper.config</code>''' and replace the last line that says:
as well as a subset of Kodi binary addons packaged in [https://qa.debian.org/[email protected] main repository of Debian].


<source lang="xml">
allowed_users=console
</source>


to  
{{Warning|'''Team Kodi offers no official support to "Kodi from Debian"!''' Please refer to links below for support!}}


<source lang="xml">
The support for Kodi from Debian is provided via the following channels:
allowed_users=anybody
# [https://forum.kodi.tv/showthread.php?tid=363611 Kodi from Debian - Support Thread] on Kodi forums
</source><br />
# [https://github.com/xbmc/xbmc/issues Github issues]
# [https://bugs.debian.org Debian Bug Tracker]


XBMC will now auto-start on boot and restart/respawn if killed or crashed.


=== Modify the inittab ===
==== Checking installed and available Kodi packages ====


This was tested on Arch Linux.
You can check what versions of Kodi and its binary add-ons are installed with the following command:


To automatically start xbmc on your system, do the following:
<syntaxhighlight lang=bash>
dpkg -l | grep kodi
</syntaxhighlight>


To check what versions of Kodi are available, use this command:


First you need to make some changes to <code>/etc/inittab</code>. Comment out (add a #) to this line:
<syntaxhighlight lang=bash>
apt-cache policy kodi*
</syntaxhighlight>


<pre>
id:3:initdefault
</pre>


to
==== Installing Kodi on Debian Unstable or Testing ====


<pre>
Installation of Kodi from Debian on Debian unstable ("sid") and testing is straightforward:
#id:3:initdefault
</pre>


and uncomment
<syntaxhighlight lang=bash>
sudo apt update
sudo apt install kodi
</syntaxhighlight>


<pre>
To install Kodi binary add-ons (like '''PVR IPTV Simple''', for example):
id:5:initdefault
</pre>


Then add this line to the bottom:
<syntaxhighlight lang=bash>
sudo apt install kodi-pvr-iptvsimple
</syntaxhighlight>


<pre>
'''NOTE''': Make sure user running Kodi belongs to the following groups
x:5:wait:login -f <YOUR_XBMC_USERNAME> </dev/tty7 &>/dev/tty7
(for example, for user '''kodi''')
</pre>


Using wait instead of respawn means that you can exit out of xbmc into the console.
<syntaxhighlight lang=bash>
$ groups kodi
kodi: cdrom,audio,render,video,plugdev,users,dialout,dip,input
</syntaxhighlight>


This needs to be done to ensure Video Acceleration API (VA-API) is properly initialized during Kodi start-up and videos playing get acceleration using VAAPI and not VDPAU on Intel or AMD cards. To add user to groups, use the command:


<syntaxhighlight lang=bash>
usermod -a -G cdrom,audio,render,video,plugdev,users,dialout,dip,input kodi
</syntaxhighlight>


*NOTE*: This is a security hole as it autologins a dedicated xbmc user without asking for a password!


==== Installing Kodi on Debian 10 "buster" ====


Now that we have the user logged in we need it to auto start XBMC.
By default, Debian buster users get Kodi 17.6 "Krypton". However, it is possible to get Kodi 19.x "Matrix" from buster-backports.
In <code>~/.xinitrc</code> add the following to the end of the file
(after removing/commenting any other exec lines that start a windowmanager):


<pre>
exec ck-launch-session xbmc
</pre>


To get Kodi 17.6 and the corresponding add-ons, use the method described in '''Debian Unstable or Testing''' section above.


Add this line to your <code>~/.bash_profile</code>


<pre>
To get Kodi 19.x and the corresponding add-ons from Debian Backports:
[[ $(tty) = "/dev/tty7" ]] && exec startx </dev/null &>/dev/null
</pre>


<syntaxhighlight lang=bash>
# Add Debian Backports repository for Debian 10 "buster"
if ! apt-cache policy 2>/dev/null | grep -q "http://.*buster-backports"; then
  echo "deb http://deb.debian.org/debian/ buster-backports main contrib" | sudo tee /etc/apt/sources.list.d/buster-backports.list
fi


And create a hushlogin file to suppress login messages.
# Update APT lists
sudo apt-get update


<pre>
# Install Kodi from backports:
touch ~/.hushlogin
sudo apt-get install {kodi,kodi-bin,kodi-data,kodi-repository-kodi,libspdlog1}/buster-backports
</pre>


# (OPTIONAL) Install Kodi binary add-ons (for example, 'PVR IPTV Simple'):
sudo apt-get install kodi-pvr-iptvsimple/buster-backports
</syntaxhighlight>


Lastly, for the magic sauce that makes this work, add dbus to your daemons in <code>/etc/rc.conf</code>.


<pre>
==== Installing Kodi on Debian 9 "stretch" ====
DAEMONS=(... dbus ...)
</pre>


By default, Debian stretch users get Kodi 17.1 "Krypton". No higher version is packaged in backports.


You're finished. Next time you reboot you should be greeted with XBMC.
To get Kodi 17.1 and the corresponding add-ons, use the method described in '''Debian Unstable or Testing''' section above.


=== Add a new init script ===


This method works well under Debian. The current configuration is a HTPC running Debian Squeeze, with no window manager installed. The main goal here is to start an Xserver only for XBMC. It allows also to specify which user will start / own the XBMC process. This method will '''not work''' if you have a window manager installed (however, it should not be hard to modify the script to suit your needs)
=== Raspberry Pi OS ===
{{see also|HOW-TO:Install Kodi on Raspberry Pi}}
Installing on Raspberry Pi OS is done with:


*Create a new script under '''/etc/init.d/'''. Call it '''xbmc'''
<syntaxhighlight lang=bash>
*Change the rights, in order to allow it to be executable.
sudo apt-get install kodi
<pre># chmod a+x /etc/init.d/xbmc</pre>
</syntaxhighlight>
*copy the code under in the file. Modify the variables to suit your configuration:
<pre>#! /bin/sh


### BEGIN INIT INFO
Upgrading on Raspberry Pi OS is done with:
# Provides:         xbmc
# Required-Start:    $all
# Required-Stop:    $all
# Default-Start:    2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of XBMC
# Description:      starts instance of XBMC using start-stop-daemon and xinit
### END INIT INFO


############### EDIT ME ##################
<syntaxhighlight lang=bash>
 
sudo apt-get update
# path to xinit exec
sudo apt-get upgrade
DAEMON=/usr/bin/xinit
</syntaxhighlight>
 
# startup args
DAEMON_OPTS=" /usr/local/bin/xbmc --standalone -- :0"
 
# script name
NAME=xbmc
 
# app name
DESC=XBMC
 
# user
RUN_AS=sterfield
 
# Path of the PID file
PID_FILE=/var/run/xbmc.pid
 
############### END EDIT ME ##################
 
test -x $DAEMON || exit 0
 
set -e
 
case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;


  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 5
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac


exit 0</pre>
*Test the script by trying to start / stop XBMC with it.
<pre># /etc/init.d/xbmc start
........
# /etc/init.d/xbmc stop</pre>
*If all is ok, you can add the script to your configuration, by issuing a "update-rc.d"
<pre># update-rc.d xbmc defaults</pre>
*If XBMC does not start, you may need to allow X to start from non-consoles.  Under Debian/Ubuntu, run:
<pre># dpkg-reconfigure x11-common</pre>
and choose "Anyone".
*You can now reboot the server, XBMC should be started just after the boot sequence.


==Installation from source==
== Installation from source ==
If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. See our '''[[Compiling Kodi]]''' guide.


If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. While compiling from source does not differ very much between distributions (except for installation of build dependencies), a few different guides are available in this wiki.


*[[HOW-TO compile XBMC for Linux from source code]]
{{Updated|20}}
*[[HOW-TO compile XBMC for Linux on Debian/Ubuntu]] - This is a tutorial on how to compile and install XBMC on Debian and Ubuntu.
*[[HOW-TO compile XBMC for Linux on Fedora Red Hat Enterprise Linux CentOS]] - This is a tutorial on how to install XBMC on Fedora 8/9/10, RHEL & CentOS 5.2.
*[[HOW-TO install XBMC for Linux on Arch Linux, a Step-by-Step Guide]]


[[Category:Linux]]
[[Category:Linux]]
[[Category:How-to]]
[[Category:How-to]]
[[Category:Installation|Linux]]
[[Category:Installation|Linux]]
[[Category:XBMC Manual]]
{{frodo updated}}

Latest revision as of 11:11, 14 January 2024

Home icon grey.png   ▶ Linux
▶ Installing
▶ HOW-TO:Install Kodi for Linux


Installing Kodi on Ubuntu-based distributions with Team Kodi PPA

Please note that currently the Team Kodi PPA is not maintained due to the previous sole maintainer stepping away from the responsibility.

For now the only options are building from source, using Flatpak or a distro such as Debian which includes Kodi in their distribution.


Stop hand.png Ubuntu releases 16.04 LTS ("Xenial") or later, respectively, include their own Kodi builds in their official package repositories, customized to satisfy their interpretations of what is acceptable under their open-source mandates. If you have installed your distribution's Kodi packages, please purge them using the command sudo apt purge kodi\* before trying to install team-xbmc PPA packages.


Stop hand.png Releases from Team Kodi PPA are NOT compatible with Debian GNU / Linux and distributions built on top of Debian's binary package repositories! Please refer to Debian section of this page for installation instructions on such distributions!


See SFTP or Click here to find out how to use the terminal.


Adding Team Kodi PPA repository

Use the command line terminal in Ubuntu, and enter the following commands. Follow the prompts as you would any other software installation.

sudo apt install software-properties-common
sudo add-apt-repository -y ppa:team-xbmc/ppa
sudo apt install kodi


The Kodi repositories are as follows:

Note: Although the URL still has "Team XBMC" in the title, these are the current URLs for Kodi.

https://launchpad.net/~team-xbmc/+archive/ppa ppa:team-xbmc/ppa Final release builds
https://launchpad.net/~team-xbmc/+archive/unstable ppa:team-xbmc/unstable Betas and release candidates
https://launchpad.net/~team-xbmc/+archive/xbmc-nightly ppa:team-xbmc/xbmc-nightly Nightly builds

Note that this PPA only provides builds for Ubuntu i386 and Ubuntu amd64 but not for Ubuntu armhf, which can run on a Raspberry Pi.


Installing binary add-ons (PVR, audio decoders, audio encoders, screensavers, visualizations, audio DSP)

See: Ubuntu binary add-ons


Installing a development build

To install a beta/unstable version of Kodi you must first add the unstable repository, then install XBMC. Use ppa:team-xbmc/xbmc-nightly for nightly builds and ppa:team-xbmc/unstable for beta builds.

sudo apt install software-properties-common
sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly
sudo apt install kodi

Note that if you have any addons (such as PVR clients), these must be updated as well (they will not be updated automatically):

sudo apt install kodi-pvr-mythtv


Upgrading

To update Kodi when a new version is released, just do a general system/package or use the following commands in the terminal (or via SFTP):

sudo apt update
sudo apt upgrade --with-new-pkgs


Downgrading to a stable version from a development version

If you install a nightly build or an unstable release and want to return to a stable release, follow these instructions:

Remove the unstable or nightly PPA:

apt-cache policy | grep -Eo 'team-xbmc/(unstable|nightly)' | sudo xargs -r add-apt-repository -ryP

Then restore the stable version with the following commands:

sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get remove kodi kodi-x11
sudo apt-get install kodi


Downgrading between newer and older stable versions

If you want to return to the next most recent stable release, follow these instructions:

Remove the current stable packages and PPA:

sudo apt purge kodi\*
sudo add-apt-repository -r ppa:team-xbmc/ppa

Then install the "oldstable" version with the following commands:

sudo add-apt-repository -y ppa:team-xbmc/kodi-old
sudo apt install kodi


Reverting to an earlier nightly

ALthough launchpad doesn't list older nightlies in their PPA, they are usually still available for download directly from the website. Visit the xbmc-nightly repository index, where you will then have to download the appropriate .deb files and manually install them using sudo dpkg -i [path to downloaded file].


Uninstalling

If you need to uninstall Kodi and purge its global configuration files (for instance, in the attempt to troubleshoot a persistent crash or other errors), do so by using the first of the following commands. If that fails to solve the issue, you will likely need to remove your user settings folder with all of your settings and library data to return to a state equivalent to what existed before Kodi was first installed on the system. This will not delete any videos or music, but just the settings and library data itself, but it is still recommended to keep a backup of them in case it's discovered that they weren't at issue and you are able to effect another solution. An example of how to accomplish a backup and then deletion of your user settings is provided on the last two lines, the highlighted one being responsible for making the backup which can thereafter be found in your home folder with the filename kodi-backup_timestamp.tar.xz.

sudo apt purge kodi\*
tar cf - "${HOME}/.kodi/" | xz -z9e - >"${HOME}/kodi-backup_$(date +%m%d%y-%H%M).tar.xz"
rm -Ri "${HOME}/.{kodi,xbmc}/"


Flatpak

If you want to use the flatpak version and do not know, if your distro supports flatpak check https://flatpak.org/setup/ for install instructions.

After you've sorted that, go to https://flathub.org/apps/tv.kodi.Kodi and hit the install button or copy the instructions at the end of the page to your terminal and execute them.


Beta channel

You can also run Kodi flatpak betas, if you install the flatpak beta remote.

flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo

Then install via

flatpak install flathub-beta tv.kodi.Kodi

You should now have an entry on your system, that's labeled `Kodi (Beta)`, that you can use to run the beta. Be warned, it will use the same paths as the older versions, so they might clash. Usually they go along well, but make backups, if you need your data.


Embedded/Appliance type install

LibreELEC

LibreELEC (short for "Libre Embedded Linux Entertainment Center") is small and very fast booting, open source JeOS (Just enough Operating System). LibreELEC is a complete media center software suite for embedded systems and computers, as it comes with a pre-configured version of Kodi and optional third-party PVR backend software.


Third Party Repositories

The instructions in this section are for unofficial Linux binaries that are un/semi supported by Team Kodi. Most of those binaries use system ffmpeg or even worse totally untested libav, which is not recommended for Kodi as we support ffmpeg only.


Debian

Debian GNU/Linux ships its own Kodi from Debian flavor with following changes:

  • Only system libraries are used (no embedded third-party libraries except of libdvdread and libdvdnav)
  • Old web interface (Chorus) is shipped to ensure Debian Free Software Guides (DFSG) compatibility

as well as a subset of Kodi binary addons packaged in main repository of Debian.


Stop hand.png Team Kodi offers no official support to "Kodi from Debian"! Please refer to links below for support!


The support for Kodi from Debian is provided via the following channels:

  1. Kodi from Debian - Support Thread on Kodi forums
  2. Github issues
  3. Debian Bug Tracker


Checking installed and available Kodi packages

You can check what versions of Kodi and its binary add-ons are installed with the following command:

dpkg -l | grep kodi

To check what versions of Kodi are available, use this command:

apt-cache policy kodi*


Installing Kodi on Debian Unstable or Testing

Installation of Kodi from Debian on Debian unstable ("sid") and testing is straightforward:

sudo apt update
sudo apt install kodi

To install Kodi binary add-ons (like PVR IPTV Simple, for example):

sudo apt install kodi-pvr-iptvsimple

NOTE: Make sure user running Kodi belongs to the following groups (for example, for user kodi)

$ groups kodi
kodi: cdrom,audio,render,video,plugdev,users,dialout,dip,input

This needs to be done to ensure Video Acceleration API (VA-API) is properly initialized during Kodi start-up and videos playing get acceleration using VAAPI and not VDPAU on Intel or AMD cards. To add user to groups, use the command:

usermod -a -G cdrom,audio,render,video,plugdev,users,dialout,dip,input kodi


Installing Kodi on Debian 10 "buster"

By default, Debian buster users get Kodi 17.6 "Krypton". However, it is possible to get Kodi 19.x "Matrix" from buster-backports.


To get Kodi 17.6 and the corresponding add-ons, use the method described in Debian Unstable or Testing section above.


To get Kodi 19.x and the corresponding add-ons from Debian Backports:

# Add Debian Backports repository for Debian 10 "buster"
if ! apt-cache policy 2>/dev/null | grep -q "http://.*buster-backports"; then
  echo "deb http://deb.debian.org/debian/ buster-backports main contrib" | sudo tee /etc/apt/sources.list.d/buster-backports.list
fi

# Update APT lists
sudo apt-get update

# Install Kodi from backports:
sudo apt-get install {kodi,kodi-bin,kodi-data,kodi-repository-kodi,libspdlog1}/buster-backports

# (OPTIONAL) Install Kodi binary add-ons (for example, 'PVR IPTV Simple'):
sudo apt-get install kodi-pvr-iptvsimple/buster-backports


Installing Kodi on Debian 9 "stretch"

By default, Debian stretch users get Kodi 17.1 "Krypton". No higher version is packaged in backports.

To get Kodi 17.1 and the corresponding add-ons, use the method described in Debian Unstable or Testing section above.


Raspberry Pi OS

Installing on Raspberry Pi OS is done with:

sudo apt-get install kodi

Upgrading on Raspberry Pi OS is done with:

sudo apt-get update
sudo apt-get upgrade


Installation from source

If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. See our Compiling Kodi guide.