Setting up a MiniDLNA (Digital Living Network Alliance) server on Ubuntu allows you to stream media content across devices on your home network. This guide explains how to install and configure MiniDLNA to function as a media server for DLNA-compatible devices.
Step 1: Update Your System
Before installation, make sure your system is up to date:
sudo apt update && sudo apt upgrade
Step 2: Install MiniDLNA
To install MiniDLNA, run the following command:
sudo apt install minidlna
Step 3: Configure MiniDLNA
After installation, you need to configure MiniDLNA by editing its configuration file located at /etc/minidlna.conf
. Open it using a text editor:
sudo nano /etc/minidlna.conf
You’ll need to specify the following:
- Media directory: Add paths to your media files. For example:
media_dir=A,/path/to/music
media_dir=P,/path/to/pictures
media_dir=V,/path/to/videos
The A
, P
, and V
specify the type of media: Audio, Pictures, and Video.
- Friendly name: Set a name for your DLNA server:
friendly_name=MyDLNAServer
Step 4: Start the MiniDLNA Service
To start MiniDLNA, use the following command:
sudo systemctl start minidlna
You can also enable it to run automatically at startup:
sudo systemctl enable minidlna
Step 5: Access MiniDLNA Server
Once the server is running, you can access the status and configuration via a web interface by visiting:
http://localhost:8200
This interface allows you to monitor your MiniDLNA server’s activity.
Step 6: Rescan Media Files
If you add or change media files, rescan the directories by running:
sudo systemctl restart minidlna
Step 7: Connect Devices
Now, use any DLNA-compatible device (like smart TVs, phones, or gaming consoles) to find and connect to your MiniDLNA server. You’ll be able to stream your media files directly.