install kodi raspberry pi tutorial

The Ultimate Guide to Install Kodi on Raspberry Pi (OSMC)

Nowadays, we often use the Raspberry Pi for everything and anything.
But what are the strengths of a Raspberry Pi? Small size, low-energy consumption and absolute silence.
What else do you need to build a media center?
Raspberry Pi is the best hardware to do this for cheap, and Kodi is the software solution to go with it.

OSMC is a lightweight Linux distribution, created especially to run Kodi on Raspberry Pi. It can be flashed on a SD card with the installation wizard or by downloading the latest image for your Raspberry Pi model.

In this post, I’ll show you how to install OSMC and start using Kodi.
I’ll try to answer all questions you could possibly ask about this, from the OS download to how to play your favorite video or song in the media player.

By the way, if you want to use a universal remote with Kodi on Raspberry Pi, you’ll need that USB receiver from Flirc (Amazon). It’s awesome, they just created what was missing to use a Raspberry Pi as a media center.

Introduction

Before getting started, I need to clarify a few things for this tutorial.

Raspberry Pi

If you are on this website, with this project idea, you should know already what a Raspberry Pi is. But I’m also here to help absolute beginners, so I’ll give you a short introduction.

A Raspberry Pi in a single board computer, not powerful but with other strengths.
It’s tiny (it holds in your hand), cheap (some models under $40) and quiet (no fan required).
It consumes almost nothing and has all the necessary ports for a media-center (network, Wi-Fi, HDMI, audio jack).

Raspberry Pi is the perfect device to turn your old TV into a smart TV or to upgrade your current smart TV with the latest apps for a media center.
You can also travel with it, and then use it at home, at your parents’ home or while traveling, with the same content, whatever the TV you’ll find on your way ^^

OSMC

The Raspberry Pi runs mainly Linux distributions (you can find my favorites here).
Linux is an operating system (like Windows or macOS) that you can find in several variants (called distributions).

To create our media center, we’ll use OSMC as our Linux distribution for this project.
OSMC is a free and open-source distribution, dedicated to media center hosting.
It’s a lightweight distribution, easy to install, which will do the job perfectly on any Raspberry Pi model.

Kodi

Most people don’t really know the difference between OSMC and Kodi.
That’s why I’m taking the time to explain these words before going any further.

Kodi is the software we’ll use to browse into our media center (like Spotify for music).
OSMC is the operating system running on the Raspberry Pi (like Windows on a PC).

Kodi allows you to play videos, music and other digital media files from local and network storage media or the Internet.

We’ll use Kodi over OSMC because the main goal of this project is to have a dedicated Raspberry Pi for our media center.
But if you already have a Raspberry Pi on Raspberry Pi OS and want to try Kodi, it’s possible.
Kodi is now available directly in the default repository, you can get it with:
sudo apt install kodi

OSMC Installation

Here are the required steps to install OSMC on a Raspberry Pi:

  • Download the OSMC installer or the image file from the official website.
  • Flash OSMC on your SD card.
  • Insert the SD card in the Raspberry Pi and start it to complete the initial configuration.

Let’s see how to do this in details.

Download OSMC

There are three ways to install OSMC on a Raspberry Pi:

  • With the official installer, that you can use from your computer.
    It’s compatible with Windows, macOS and Linux and will guide you for the SD card creation.
    A few additional options are available for the initial configuration.
    For some reasons, it’s the only way to use a USB stick currently, the other options don’t work.
  • By downloading an image, and doing this manually.
    Get the file corresponding to your Raspberry Pi model and flash it with Etcher or any other tool.
  • Or by using Raspberry Pi Imager.
    OSMC is now available in the OS list, so if you are used to it, it might be the easiest solution.

All downloads for the OSMC distribution are available on this page.

I’ll explain all methods in the next section. Pick the one you prefer, the end result will be the same.
Maybe Raspberry Pi imager is the easiest solution for most of you, as you won’t need to download anything new on your computer.

However, the installer allows you to configure a few things, like the network. If you are using Wi-Fi only or need to set a static IP address, it’s probably your best option.

Flash the SD Card

Pick one method, follow the instructions and jump to the following part after that, to start the Raspberry Pi for the first time.

Method 1: OSMC Installer

  • Go to the Download page.
  • Click on the icon corresponding to your computer operating system:
  • Click on the downloaded file to run it.
    A wizard will shows up, asking you a few questions to create the SD card.
osmc installer tool

The installer will guide you through the following steps:

  • Welcome
    • Select your language.
    • Choose your device (Raspberry Pi) and model.
  • Select version
    • Just pick the latest version available.
  • Install options
    • There are several options. Use SD card or USB stick for your first try.
  • Networking
    • Here is an essential step if you want to use Wi-Fi or if you don’t have DHCP.
    • You need to select the connection method to use.
    • And then check the box “configure network manually” to enter details about your network (Wi-Fi SSID, IP address, …).
  • Media selection
    • Insert your SD card or USB stick and select it in the list.
  • License agreement
    • Check the box to accept the license.

Then the app will start downloading and installing OSMC on your media.
Once done, you can skip the end of this section and jump to the “First start” paragraph below.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Method 2: Use the image file

If you prefer, you can go to the Downloads page on the official website, and download the image corresponding to your device.
Click on “Disk images” to get the list of files, and then click on the latest version for your model:

You can then use Etcher or any other tool to flash it into your SD card.
Etcher is a free tool you can download on this page
Then install it and start it.

You will get an intuitive interface with three parts: image location, SD card selector and a “Flash!” button.

  • On the left, browse to find your image file on your computer.
  • Insert your SD card into your computer.
  • And then click on “Flash!” to start the SD card creation.
    It should be fast, as the image takes less than 300 MB.

At the end of this process, you are ready to start OSMC for the first time.

Method 3: Use Raspberry Pi Imager

Finally, OSMC is now listed in the OS list in Raspberry Pi Imager, so it might be the easiest way to install it for most of you:

  • Download and install Raspberry Pi Imager if you don’t have it yet on your computer.
    It’s a must-have for any Raspberry Pi user, as you’ll use it all the time to install new operating systems.
  • Start Raspberry Pi Imager
    It looks like that:
    raspberry pi imager manual
    I have a complete guide on this website on how to use Raspberry Pi Imager, but I’ll give you the short version here.
  • Click on “Choose OS” and find OSMC under “Media player OS”

    By the way, LibreELEC is almost the same thing as OSMC. You can read my article here explaining the differences between LibreElec and OSMC.
  • Finally, choose the OSMC version corresponding to your Raspberry Pi model.
  • Insert your SD Card, and click on “Choose SD card” to select it in the list.
  • You can then click on “Write” to start the installation.

That’s it, a few seconds later your media should be ready, you can go to the next paragraph to continue the installation.

First start

Insert the SD card or USB stick in your Raspberry Pi and start it.
I’ll explain to you what happens in the next steps.

Splash screen

This first step is automatic. You have nothing to do.
OSMC will do the required tasks to make your system works (resizing the SD card, installing files, etc.).

At the end of the progress bar, you get a success message and the Raspberry Pi reboots.

Welcome menu

After a brief preview of the Kodi menu, the Welcome menu shows up.
In this menu, you’ll need to enter your preferences:

  • Language
    • Select your preferred language for the Kodi interface.
  • Timezone
    • Select the continent and city corresponding to your current timezone.
    • I don’t find this menu very intuitive.
      I used the touchpad from my Bluetooth keyboard, and it became easier (I think it’s built to be used with a mouse, not the arrows).
  • Hostname
    • You can keep the default value or choose a custom name.
  • SSH
    • This is enabled by default, and I recommend keeping it like that.
    • It could be easier for some things we’ll see after.
    • If you don’t use it after the installation, you can disable it at any time.
  • License
    • Accept the license and continue.
  • Look
    • The welcome menu gives you a choice between two themes.
    • Take the one you prefer, but you can change this later.
      I’m choosing the “Classic” theme, so you may have a few differences in the following if you go with the other one.
  • Sign Up
    • This is not mandatory, skip it and exit the welcome wizard.

Once this menu is complete, the Kodi interface comes back into your screen:

I’ll call this interface “Kodi”, even if I know that the limit is blurred between OSMC and Kodi.
You’ll find OSMC and Kodi stuff in this menu, not a big deal, you don’t need to know the correct word to use it 🙂

Kodi

If you followed these installation steps, you should get the same menu as in the picture above.

You now have a better idea of what to expect with this distribution on your Raspberry Pi. As you can see, there are many things available 🙂
You can already try to browse, but I’ll help you to make the most of it in the rest of this article.

Your first steps with Kodi

Let’s see this Kodi interface in details now.

Add media files into Kodi

Just after the installation, media entries in the menu are empty (Movies, Music, etc.).
I will now explain how to add your files in it. There are several methods.

USB Drive

The most common way to read a file on Kodi will be to use a USB key or an external drive (especially if you have all your photos or movies on it).

In this case, plug the drive on the Raspberry Pi and all your files will be available directly.
OSMC and Kodi will mount automatically your disk and display all files available.

For example, if I go to Music > Files > USB, and click on it, I get the mp3 files and can play them directly.

Copy files into the Raspberry Pi

You can’t directly save your files from the USB drive to your SD card from the files menus.

  • To do this, you need to go to the Settings Menu > File Manager.
  • Then select your file in the left panel and choose a destination folder on the right panel.
    The first time, you may need to click on “Add source” and add the Home folder > Music from the list for example.
  • Finally, right-click on the file and choose “Copy” to save it on your Raspberry Pi.

There are other interesting options here, I’ll let you try them.

Network share

If you have a share available on your network (like a NAS or a shared folder on another PC), you can also access it from Kodi, to play media files over the network.

To do this go to Movies > Add videos (or any other media).
Then you need to find your network share by clicking “Browse” and follow the wizard.

Kodi can handle many server types (SMB, NFS, HTTP, …), and you can also add the network location directly (probably the only way if guest access is not allowed to your share).
You’ll find help about the syntax to use in each case on the Kodi wiki.

Once your media source properly added, you can access all media on this server directly from the Kodi interface (or the web interface).

File transfer

One of my favorite method is to have a larger SD Card on your Raspberry Pi (see my recommended products if you need one), and then transfer files to watch/listen directly on the Raspberry Pi via SFTP.

SFTP comes with SSH, but most people don’t think of this.
As you got an SSH connection to your Raspberry Pi, you can use software like WinSCP, FileZilla or rsync/scp to transfer a file to and from it.
You can even open a port in your router (NAT), to transfer files remotely, from another network on the Internet.

FileZilla

To do this, I connect to the Raspberry Pi using software like FileZilla, WinSCP or even scp/rsync on Linux.
You need the Raspberry Pi address to connect to it, you can find it in the settings > System information.
Default username and password are osmc / osmc.

Once connected, you can transfer files in the corresponding directory (Movies, Music, Pictures, TV Shows).
To see them in Kodi, you need to put files in /home/osmc, the correct folder.

Media files not available after transfer?

If you uploaded media files into /home/osmc/Movies, for example, and they are not visible in Kodi, you have to add a new media source with your home folder:

  • Go in Videos > Files.
  • Select Add videos.
  • In the menu, click on Browse and choose Home folder > Movies
  • Submit, adjust the default settings if needed.
  • Exit.

Then go back to Videos > Files.
Choose your new source (Movies) and you’ll see the list of Videos on the SD card.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

You have to do the same thing for each media type if needed (Pictures and Music).

Web Interface

You may have missed it, but directly after the installation, a web interface for Kodi is directly available.
You can access it by typing your Raspberry Pi IP Address in your browser: http://X.X.X.X

This interface is responsive so that you can use it from your tablet or smartphone.

Before this, you need to know your IP address.
I’ll give you four ways:

  • If you have set your IP address in the OSMC Wizard
    • You already know your IP address, it’ll be the same as you enter the wizard.
  • If you are in the OSMC menu, it’s easy:
    • Go in the Settings (icon on top of the menu)
    • Then “System information”
  • If you are on another computer on the network, here are two last ways:
    • Go to your router web interface, most of the time it’ll give you all connected devices with their names and IP addresses.
    • Follow this article about how to find your Raspberry Pi IP address (and use the network scanner method).

SSH

We have enabled the SSH service in the welcome menu and so it’s possible to connect to OSMC via SSH.
On Windows, you can use Putty to do this.
On Linux and Mac, the “ssh” command is already included (more details here).

Then connect to the Raspberry Pi, entering the IP address (see above if you don’t know how to find it) and the default user credentials:

  • Login: osmc
  • Password: osmc

Once connected, I recommend changing this default password with the command:
passwd

You are now in the OSMC system, basically a Debian-like system, where you can use your Debian skills to do what you need 🙂

Kodi addons

Ok. You now know how to read media files on your Raspberry Pi with Kodi.
But it’s not different of what you can do on Raspberry Pi or your game console, so why is Kodi so popular?

The powerful feature of Kodi is that you can install add-ons.
An add-on is something like an app on your smartphone.
A smartphone without app store is not so funny. A smartphone with 5M apps is something different 🙂

There are also many add-ons in Kodi. I will introduce you some of them.
The problem is that you will find anything and everything on the Internet.
I will sort them by “legality” but beware of what you will find elsewhere.

Official Kodi add-ons

In this first part, I’ll show you only add-ons from the official repository.
So everything is fine here, don’t worry.

YouTube

The first essential add-on is YouTube.
To install it follow these steps:

  • Go in Settings > Add-ons.
  • Select Install from repository > Video Add-ons.
  • Find YouTube on the list (Yes, at the bottom, but use the up arrow to go at the end directly).
  • Click on it, then choose “Install” and confirm.

The add-on will be download and installed quickly.

To use it go back to the main menu, and then “Add-ons”.
Choose “Video add-ons” and then YouTube.
For now, you can’t use YouTube directly, you need an API key.

You need to create a project in the Google developer’s console to do this. It’s a long process to get them, so I’ll not explain it here (I’ll probably do a specific post about this later), and just redirect you to this website for a tutorial.

Quick tip here however, once you have all the credentials to use the API, don’t type them directly on your Raspberry Pi 🙂
You can enable the web configuration page, and access http://IP:50152/api to enter the information:

On the first start, you may be asked some configuration question like language and country. You can also sign in on your account if you want.

The interface is not extraordinary but will allow you to find and watch your favorite YouTube videos 🙂

The RaspberryTips YouTube channel on Kodi

Soundcloud

Another example with SoundCloud here. If you don’t know, SoundCloud is a popular platform to share and listen to music online.
You can install it on Kodi too, the same way as for YouTube:

  • Go to Settings > Add-ons > Music add-ons.
  • Find and install SoundCloud.

Back into your main menu > Add-ons> Music add-ons, you’ll see the SoundCloud app.
No need for an API key here, it will work directly:

Other default apps

You should now understand that any add-on you find in the main repository is easy to install and use and that you can use it legally.
So I let you browse this catalog and install any add-on you are interested in before moving to the next paragraph 🙂

Gray Kodi add-ons

Let’s go into the “we don’t really know” section on the legality ladder.
I consider an add-on as “gray”, as soon as you have to add a new source or install an app from a zip file.

Use a VPN

It’s more advice than an add-on.
Maybe I’m paranoid, but I recommend taking security measures at this level, to protect your personal data.

But with Kodi, the border between legal and illegal is thin, and you should use a VPN.
A VPN will encrypt and anonymize your Internet traffic (from the Raspberry Pi).

Here is a good graphic from ExpressVPN explaining how a VPN protect yourself:
vpn

Click on the link to know more about how VPN work.

I will not discuss here about the best VPN provider to choose.
There are a ton of websites comparing and ordering them for you.
Most of the time, they will all do the job.
It’s more a question of budget, as there isn’t much of a difference between them.

I have a step-by-step here about NordVPN if you want to check, so that you know how to install it on Kodi especially (as some other solutions are not working on Raspberry Pi).

Also, check for news about your favorite provider. Many websites still recommend IPVanish, while they were accused of logging your activities.

Once you find your VPN provider, follow instructions from their website to install the VPN client on Kodi.

Spotify

Spotify is a major music streaming service you should already know.
There is no app available in the Kodi repository, but you can download it from a third-party source.

Here are the steps to follow to install SpotiMC:

  • Get the latest zip available on this page.
  • Download it and transfer it on your Raspberry Pi:
    • You can get in on your computer and upload it with a software like FileZilla.
    • You can also download it directly from an SSH console:
      wget http://azkotoki.org/download-file/35/script-audio-spotimc-1-0-beta5 -O spotiMC.zip
    • Try to put the file in a folder with all your add-ons.
      For example, I have a folder /home/osmc/Downloads to put all in it.
  • Then back in Kodi, go to Settings > Add-ons.
  • Choose “Install from zip file”.
    • The zip file installation is disabled by default, you need to enable it in your settings.
      So, if you get an error message, do this first and check “Unknown sources”.
  • Then browse to your download path (Home Folder > Downloads for example).
  • Click on the file to install it.

SpotiMC should now be available in your Music menu, under Music Add-ons.
On the first start, it may ask you to install dependencies, choose “Yes”.
Once done, you need to restart your Raspberry Pi to apply changes.

After the reboot, go back in Spotify, login, and you’re ready to go.
A premium account is required to use Spotify on any device :/

Another way to install Spotify is to use an external repository, you can check my entire tutorial here.

Crackle

We saw how to install an add-on from a zip file, let’s see now how to add a new repository with Crackle.

Crackle is owned by Sony and delivers a streaming service to watch popular TV series and movies.
To install it you need to add a new repository, like this:

  • Download the Eracknaphobia zip file from here.
  • Transfer it on your Raspberry Pi.
  • Go to Settings > Add-ons.
  • Choose “Install from zip file”.
  • Browse to the zip file and install it.
    You start to know how to do this 🙂
  • Then go back to the Add-ons browser but choose “Install from repository”.
  • You should now see the new repository in the list.
  • Click on “eracknaphobia’s Repo” and you will see all the available packages in this repository.
  • Crackle is in the Video add-on’s subfolder, with many other interesting add-ons:
  • Click on “Crackle” and then “Install”.
    Edit: it seems to be available in the official repository now, but anyway, you now know how to add another repository 🙂

Crackle is now available in Add-ons > Video add-ons.
It’s free, enjoy!

Other add-ons

You have now learned how to install new add-ons, whether by zip file or with a repository.
I’ll not give you all the possible add-ons to install here.
It’s not the purpose of this post. But you can now add anything.

And this is the place to start paying attention.
All add-ons are accessible as quickly as these, whether they are allowed or not. It’s up to you to judge whether it seems legal or not.

On PC, is the same service free? If not, do you already pay a subscription to this service?

You answer “no” to both questions? It will surprise me that it’s legal.

💰 Make Money Sharing Your Raspberry Pi Expertise!
Help others navigate the world of Raspberry Pi with your insights.
Become a RaspberryTips Contributor!

Kodi add-ons to avoid

There are add-ons I don’t recommend you to use on Kodi if you don’t want to have legal issues.

Here are some examples you should avoid: Exodus, Covenant, Placenta, Incursion.

These are add-ons to watch movies and TV shows for free.
As you know, it’s rarely free to get this type of content, so these add-ons are not legal at all.
Depending on your country, it can even be considered as a crime.

Using a VPN on Kodi

Before finishing this tutorial, I just want to recommend you looking for a VPN when you are using Kodi.
As a reminder, a VPN is an encrypting technology, allowing you to keep yourself anonymous and protect your data online.

The other benefit is that you can often use it to watch movies or series that are not available in your country, same thing for services.
It’s not mandatory, but it’s a great add-on to improve your experience with Kodi.

If you want to give it a try, I have an in-depth tutorial on how to install NordVPN on Raspberry Pi OS or Kodi, that will explain step-by-step how to register and configure everything easily.

Recently, I switched to a cheaper solution, with Ivacy VPN.
It’s working very well, you can check your latest offer by clicking here.
I’ll share a tutorial very soon on how to install it on your Raspberry Pi.

Whatever the solution, there is a 30-day money-back guarantee, so you don’t take any risk by trying one of them now:

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Recommended hardware to take the most out of Kodi on Raspberry Pi

  • Raspberry Pi 3B+: You don’t need more, and OSMC doesn’t even work on Raspberry Pi 4 for the moment, so keep it simple and affordable, pick a Raspberry Pi 3 and leave it plugged on your TV.
  • Flirc USB receiver: Allow you to use any universal remote with your Raspberry Pi. It should be more convenient than using your keyboard to zap 🙂
  • Harmony remote: Replace all you remote with only one, and work great with the Flirc receiver. There is also a smartphone app that you will love.
  • A giant SD card: It’s you are more the kind of guy to store all your media files on the device, and don’t use the streaming services so much, you’ll need a big SD card. This is the best available right now, with a capacity from 32GB to 1TB!
Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.

Conclusion

If I sum up, you should have learned how to:

  • Install Kodi on your Raspberry Pi via OSMC.
  • Use basic features available in Kodi like playing media files
  • How to install add-ons in different ways :
    • Official repository (YouTube).
    • From a downloaded zip file (Spotify).
    • From a third-party repository (Crackle).

I also tried to warn you about legal issues when installing third-party add-ons on Kodi.
Kodi is legal and safe, but you need to be careful when you install something on it.

I hope this post will help you to start understanding how Kodi works.
It’s a big topic, so I can’t introduce everything in only one article.
There are many websites about Kodi and the official wiki can also help you
Feel free to check it if you need more information:

OSMC Wiki
Kodi Wiki

Similar Posts

4 Comments

  1. Hi Patrick,

    I just wanted to say kudos to you and your work! I’m an average linux user that recently got started into the raspberry world and your tutorials have been really helpful. Definitely amongst the most detailed and friendly out there.

    I started with the ambition to make my own DNS/VPN with the raspberry and I’ve found so many other interesting projects through your site. Keep it up and thanks for sharing 😀

    1. Hi Pereza,

      Thank you very much for this comment

      I am glad to have been of some help!

      Patrick

  2. You made some good points there. I did a search on the issue and found most people will consent with your site.

Comments are closed.