How to Install Jellyfin on nixOS Latest

Jellyfin is an open-source media server that allows you to stream movies, TV shows, and music on your home network. It's easy to use and can be installed on nixOS in just a few steps. In this tutorial, we'll walk you through the process of installing Jellyfin.

Prerequisites

Before you begin, ensure that you have the following:

  • A computer with nixOS Latest installed
  • A stable internet connection
  • Terminal access

Step 1 - Update Your Packages

First, make sure your system is up-to-date by running the following command:

$ sudo nixos-rebuild switch

This will update all your installed packages, including your system's kernel.

Step 2 - Installing Jellyfin

With nixOS, you can install Jellyfin as a package directly from the nixOS channel. Run the following command to install the package:

$ nix-env -i jellyfin

The package installation may take a while, depending on your internet speed.

Step 3 - Configuring Jellyfin

After installing Jellyfin, you will need to configure it to work according to your preferences. You need to configure a few things before you can access your media collection:

  • Port: This is the port you will use to access Jellyfin. The default port is 8096.
  • Media directories: This is where you will store your media files.

Run the following command to open the Jellyfin configuration file:

$ sudo nano /etc/jellyfin/jellyfin.conf

Edit the file to set the serverUrl value with the following command:

{
  "serverUrl": "http://localhost:8096/",
    "directories": [
      "/path/to/media",
      "/another/path/to/media"
    ]
}

Replace /path/to/media with the path that contains your media files.

Step 4 - Starting Jellyfin

After configuring Jellyfin, you can start it by running the following command:

$ systemctl start jellyfin

If you want Jellyfin to start automatically when you boot your system, run:

$ systemctl enable jellyfin

Step 5 - Accessing the Jellyfin Web Interface

After starting Jellyfin, you can access the web interface by entering the following URL in your web browser:

http://localhost:8096/

You can now select your media collection and start streaming your favorite movies and TV shows.

Conclusion

That's it! With this tutorial, you've learned how to install and configure Jellyfin on nixOS. You can now enjoy all your media files on your home network using the Jellyfin media server.