How to Install Kodi on Ubuntu 22.04 or 20.04

Kodi is a versatile and powerful media center software that provides users with a seamless and engaging entertainment experience. With Kodi installed on your Ubuntu system, you can enjoy all your favorite movies, TV shows, music, and other digital media in one centralized location.

Compared to other media center software such as Plex and Jellyfin, Kodi stands out for its versatility and customizability. Kodi’s open-source nature allows a large community of developers to contribute and create add-ons, allowing users to customize their experience and add features according to their needs.

In addition to its customizability, Kodi offers several key features that make it a preferred choice for many users:

  • Cross-platform compatibility: Kodi runs on multiple operating systems, making it accessible to many users.
  • Easy to use interface: The Kodi interface is simple and intuitive, making it easy for users to navigate and find what they want.
  • Extensive repository of add-ons: With a large community of developers, the Kodi repository offers a wide range of add-ons that can be installed to add extra functionality.
  • Advanced playback options: Kodi offers advanced playback options such as adjustable playback speed, audio and subtitle syncing, and more.
  • Supports a wide range of media formats: Kodi can play many media formats, including high-definition video, making it a preferred choice for many users.

In summary, Kodi provides Ubuntu users with a powerful and flexible platform for managing and accessing digital media content. The guide will outline the steps for installing Kodi on Ubuntu 22.04 or 20.04 LTS through Kodi’s latest stable or unstable LaunchPAD PPA and Command Line Interface (CLI) commands, ensuring a smooth and efficient installation process.

Step 1: Update Ubuntu

It’s always advisable to have the latest version of packages installed on your system. To upgrade any outdated packages, run the following command which will ensure that you have the latest version of all your packages.

sudo apt update && sudo apt upgrade

Step 2: Import Kodi LaunchPAD PPA

Before starting the installation process, it’s important to ensure that the necessary packages are already installed on your system. To check this, run the following command, which will install any commonly used packages that may be missing.

sudo apt install ca-certificates apt-transport-https software-properties-common lsb-release -y

If you have not imported a GPG key from the Ubuntu keyserver, you may encounter difficulties when trying to import GPG keys from LaunchPAD PPAs using the command line terminal. This is because the necessary directories may not have been created. To fix this, you can use the following command to generate the required directories and ensure a smooth import process.

sudo gpg --list-keys

Example output:

gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created

This step is optional, but if you encounter any difficulties during the installation process, it’s recommended to run this command and then try the previous command again.

The next task is to import the GPG key needed.

sudo gpg --no-default-keyring --keyring /usr/share/keyrings/kodi.gpg --keyserver keyserver.ubuntu.com --recv-keys 189701DA570C56B9488EF60A6D975C4791E7EE5E

Example output:

gpg: keybox '/usr/share/keyrings/kodi.gpg' created
gpg: key 6D975C4791E7EE5E: public key "Launchpad PPA for XBMC for Linux" imported
gpg: Total number processed: 1
gpg:               imported: 1

Now that the necessary GPG key has been imported, the next step is to add the Kodi Launchpad PPA to your system. You have the option to either import the stable repository or the nightly branch. For most users, it is recommended to import the stable repository instead of the nightly one as the latter is known to be highly unstable. However, if you’re feeling adventurous, you can import the nightly repository for testing purposes.

Option 1 – Import Kodi stable LaunchPAD PPA:

echo "deb [signed-by=/usr/share/keyrings/kodi.gpg] https://ppa.launchpadcontent.net/team-xbmc/ppa/ubuntu $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/kodi.list

Option 2 – Import Kodi nightly LaunchPAD PPA:

echo "deb [signed-by=/usr/share/keyrings/kodi.gpg] https://ppa.launchpadcontent.net/team-xbmc/xbmc-nightly/ubuntu $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/kodi.list

It’s important to note that the above commands will only work for Ubuntu short-term releases if the Kodi Launchpad PPA provides support for those releases.

Before proceeding with the installation, it is crucial to run an APT update to make sure that the newly imported Kodi Launchpad PPA is accurately reflected in the sources list file and that the package cache is up-to-date. To do this, execute the following command in the terminal:

sudo apt update

Step 4: Install Kodi

With the Kodi Launchpad PPA properly configured, you can now proceed with the installation of Kodi by executing the following command in the terminal.

sudo apt install kodi kodi-bin

To verify the successful installation and build of Kodi, you can run the following command in the terminal.

kodi --version

Example output:

Kodi Media Center 20.0 (20.0.0) Git:20230115-389e701cb9

Step 4: Secure Kodi with UFW Firewall

Before proceeding, you should secure Kodi with UFW Firewall which is natively installed on all Ubuntu systems. This is crucial if you are going to be letting anything remote connect to Kodi outside your home network.

First, re-install if you have removed it or check it is installed by running the following command in a terminal.

sudo apt install ufw

Once you have installed UFW, you need to enable it. This will activate the firewall and start blocking incoming connections. You can enable UFW by running the following command.

sudo ufw enable

Allow incoming connections for the default Kodi port:

By default, Kodi listens on port 17777. To allow incoming connections for Kodi, you need to allow incoming traffic on this port. You can do this by running the following command.

sudo ufw allow 17777/tcp

Note: If you’ve configured Kodi to use a different port, replace 17777 in the above command with the desired port number.

Allow incoming connections from a specific IP range:

If you want to only allow incoming connections from a specific IP range, you can use the following format.

sudo ufw allow from [IP_RANGE] to any port [PORT_NUMBER] proto [TCP/UDP]

Example:

sudo ufw allow from 192.168.1.0/24 to any port 17777 proto tcp

Allow incoming connections from a single IP address:

If you want to only allow incoming connections from a single IP address, you can use the following format.

sudo ufw allow from [IP_ADDRESS] to any port [PORT_NUMBER] proto [TCP/UDP]

Example:

sudo ufw allow from 192.168.1.100 to any port 17777 proto tcp

To ensure that the rules you’ve added are in place, you can check the status of your UFW firewall. You can do this by running the following command.

sudo ufw status

This will display the current firewall rules and show you the allowed incoming traffic based on the rules you’ve set up.

Step 5: Launch Kodi

Now that you have installed and configured the firewall on Kodi, you can now launch the software. First, you can launch Kodi using the terminal with the following command.

kodi

An alternative method to launch Kodi is through its graphical user interface (GUI) using its icon, which can be found at the following location.

Activities > Show Applications > Kodi

Example:

Once you have successfully installed Kodi on your Ubuntu system, you’re ready to start customizing it to your liking. Here are a few tips to help you get started:

  • Customize the Home Screen: The first thing you’ll see when you open Kodi is the home screen, which can be customized to your liking. You can add or remove menu items, change the background, and more.
  • Set Up Media Libraries: Kodi allows you to create media libraries for your movies, TV shows, music, and other content. You can specify the folders on your system where your media is stored, and Kodi will automatically import the files into your libraries.
  • Install Add-ons: Kodi has a large repository of add-ons that can greatly enhance your experience. You can install add-ons for a variety of purposes, such as streaming movies, live TV, and more.
  • Configure Settings: Kodi has a variety of settings that you can customize to your liking. For example, you can change the appearance, enable subtitles, and adjust playback settings.
  • Get Familiar with Keyboard Shortcuts: Kodi has a variety of keyboard shortcuts that can save you time and make navigation easier. For example, you can use the up arrow key to access the menu, and the down arrow key to select a menu item.

By following these tips and customizing Kodi to your liking, you’ll be able to get the most out of your media player and enjoy a truly personalized experience.

Examples of Kodi default screens on Ubuntu:

Additional Commands & Tips

Update Kodi

Since Kodi is installed using the APT package manager, checking for updates is made easy with either Ubuntu’s graphical user interface (GUI) updater or through the command line terminal, which is often considered a more efficient method. It is important to note that for users who have installed the unstable Kodi Launchpad PPA, regular updates are necessary, as this PPA is very active. It is recommended to check for updates daily.

To check for updates and install them, including any updates for Kodi, simply run the following command in the terminal.

sudo apt update && sudo apt upgrade

This command will check for available updates and prompt you to install them if any are found, including any updates for Kodi.

Remove Kodi

If you decide that you no longer want Kodi installed on your Ubuntu system, or if you wish to switch from the nightly version to the latest stable release or from the Kodi Launchpad PPA to the version from the Ubuntu default repository, you can remove Kodi using the following command in the terminal.

sudo apt remove kodi kodi-bin

This command will remove Kodi and all its dependencies from your system. If you also wish to remove the configuration files, use the following command.

sudo apt remove --purge kodi kodi-bin

For users that installed the LaunchPAD PPA and want to remove it, use the following command.

sudo rm /etc/apt/sources.list.d/kodi.list

Conclusion

Installing Kodi on Ubuntu is a simple and straightforward process, and with this comprehensive guide, you should be able to do it without any issues. Whether you are a new or seasoned Ubuntu user, this guide will help you install Kodi on your Ubuntu system with ease.

Frequently Asked Questions

Can I install Kodi on Ubuntu using the Ubuntu Software Center?

Yes, you can install Kodi on Ubuntu using the Ubuntu Software Center. Simply search for Kodi in the Ubuntu Software Center and click the install button.

Is Kodi available in the default Ubuntu repository?

Yes, Kodi is available in the default Ubuntu repository, and you can install it using the Terminal or the Ubuntu Software Center but it may not be up-to-date.

Can I install other add-ons on Kodi after installation on Ubuntu?

Yes, you can install other add-ons on Kodi after installation. Simply navigate to the add-ons section in the Kodi settings menu and install the add-ons you would like to use.

Why should I use Kodi on my Ubuntu system compared to Plex, and Jellyfin?

Kodi is a popular media player that offers a wide range of features, including the ability to play movies, TV shows, music, and other multimedia content. Unlike Plex and Jellyfin, Kodi is an open-source platform, which means that it is free to use and highly customizable. Additionally, Kodi has a large community of users and developers who constantly contribute to the platform, making it a great choice for those who want a robust and flexible media player.

Why install Kodi from the Kodi Launchpad PPA on Ubuntu, what are the benefits?

Installing Kodi from the Kodi Launchpad PPA on Ubuntu offers several benefits over installing Kodi from the default Ubuntu repository. The Kodi Launchpad PPA is maintained by the Kodi team, which means that you will always have access to the latest version of Kodi. Additionally, installing Kodi from the Kodi Launchpad PPA provides automatic updates, making it easy to stay up-to-date with the latest features and bug fixes. Furthermore, installing Kodi from the Kodi Launchpad PPA ensures that you have access to the latest plugins and add-ons, which can greatly enhance your Kodi experience.

Share to...