ReadyMedia is an open-source implementation of the DLNA (Digital Living Network Alliance) protocol that allows us to stream media files from one device to another. It was formerly known as MiniDLNA. In this tutorial, we will learn how to install and configure ReadyMedia on nixOS.
There are different ways to install ReadyMedia on nixOS, but we will be using nix, a package manager used by nixOS. Here's how to install the package:
Open a terminal on your nixOS system.
Update the package index by running the command:
sudo nix-channel --update
sudo nix-env -iA nixos.ready-media
which minidlnad
This should return the path of minidlnad, which is a server component of ReadyMedia.
By default, ReadyMedia is configured to look for media files in the /var/lib/minidlna directory. However, this directory does not exist by default on nixOS, so we must create it first.
sudo mkdir -p /var/lib/minidlna
sudo chown -R minidlna:minidlna /var/lib/minidlna
sudo vi /etc/nixos/configuration.nix
services.minidlna = {
enable = true;
mediaDirs = [ "/var/lib/minidlna" ];
user = "minidlna";
};
This will enable the service, set the media directory to /var/lib/minidlna, and set the user to minidlna. You can add more directories if you want to include more media files.
Save the file and exit the editor.
Apply the changes by running the following command:
sudo nixos-rebuild switch
This will rebuild your system configuration and start the ReadyMedia service.
Once everything is set up and running, we can test the installation by streaming media files to a DLNA device. Here's how to test:
systemctl status minidlna
This should show that the service is active and running.
In this tutorial, we have learned how to install and configure ReadyMedia on nixOS. You can now enjoy streaming your media files to DLNA devices in your home network.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!