Storing extensive collections of family videos, ripped films, music albums, and holiday photos on an Ubuntu computer often leaves those files stranded on a single desktop. While complex media servers like Plex or Emby provide rich interfaces, they demand heavy processor overhead, background cloud accounts, and complex database management that many home users neither want nor need.
MiniDLNA (officially known as ReadyMedia) provides a clean, lightweight alternative. Built entirely around the Universal Plug and Play (UPnP) and Digital Living Network Alliance (DLNA) standards, MiniDLNA runs silently as a background service on Ubuntu, instantly cataloguing your media folders and making them discoverable on smart TVs, Roku boxes, games consoles, and mobile devices across your local Wi-Fi network.
Why Choose MiniDLNA for Home Media Streaming?
MiniDLNA focuses on simplicity, speed, and strict adherence to open standards:
- Negligible Hardware Impact: MiniDLNA consumes less than 20 megabytes of system RAM and virtually zero idle CPU, making it suitable even for modest desktop PCs or older re-purposed laptops.
- Universal Device Support: Nearly every modern smart TV (Samsung, LG, Sony, Philips, Panasonic), streaming stick, PlayStation, and Xbox includes a native DLNA media player app out of the box with zero setup required on the television side.
- No Accounts or Internet Required: Media streams directly across your local network router. If your broadband connection goes down, your smart TV continues streaming home videos without interruption.
- Direct Playback: Streams files in their native containers without attempting CPU-intensive real-time video transcoding.
Step 1: Installing MiniDLNA on Ubuntu
MiniDLNA is maintained directly in Ubuntu’s official software repositories. Open your terminal application and execute:
sudo apt update
sudo apt install minidlna -y
Ubuntu automatically installs the server daemon and registers a system service named minidlna.
Step 2: Preparing Media Folders and Setting Permissions
MiniDLNA executes under a dedicated system user account named minidlna. For the daemon to index and stream your files, that user requires read access to your target storage directories.
Suppose you store your media under standard user folders such as /home/username/Videos and /home/username/Music. Grant read and execute permissions so the service can traverse those directories:
# Allow local service accounts to read user media directories
chmod o+rx /home/username
chmod -R o+rx /home/username/Videos
chmod -R o+rx /home/username/Music
chmod -R o+rx /home/username/Pictures
If you store media on a dedicated secondary hard drive or USB drive mounted at /media/storage, ensure that mount point is accessible to system users as well.
Step 3: Configuring the MiniDLNA Configuration File
MiniDLNA configuration is managed through a single text file located at /etc/minidlna.conf. Open this file in your preferred text editor with administrative privileges:
sudo nano /etc/minidlna.conf
1. Defining Media Directory Paths
Scroll down to the section marked media_dir=. You can specify generic paths or prefix paths with specific media types: V for video, A for audio, and P for pictures:
# Specify paths with media type filters
media_dir=V,/home/username/Videos
media_dir=A,/home/username/Music
media_dir=P,/home/username/Pictures
2. Setting a Friendly Server Name
By default, your TV displays the server as your computer’s hostname. To set a custom name that looks clean on your smart TV’s input menu, find the friendly_name= directive, uncomment it by removing the leading hash mark (#), and set your chosen label:
friendly_name=Ubuntu Living Room Media
3. Enabling Automatic File Discovery (inotify)
When you download new films or copy new photos into your shared folders, you want MiniDLNA to index them immediately without requiring a manual service restart. Find the inotify= directive and ensure it is enabled:
inotify=yes
Save your edits by pressing Ctrl + O followed by Enter, then exit the editor by pressing Ctrl + X.
Step 4: Increasing the Inotify Watch Limit (Crucial for Large Libraries)
If your media collection contains thousands of songs or video files, Ubuntu’s default Linux kernel limit for file monitors (inotify watches) may run out, preventing MiniDLNA from tracking newly added files.
Raise the inotify limit by adding a persistent kernel parameter:
echo "fs.inotify.max_user_watches = 1048576" | sudo tee -a /etc/sysctl.d/90-minidlna.conf
sudo sysctl --system
Step 5: Starting the Service and Rebuilding the Media Database
Restart the MiniDLNA service to apply your configuration changes and trigger an initial media scan:
sudo systemctl restart minidlna
Enable the service so it starts automatically whenever your computer boots up:
sudo systemctl enable minidlna
To force a complete re-scan of all shared directories and refresh the SQLite media cache at any time, run:
sudo minidlnad -R
sudo systemctl restart minidlna
Step 6: Configuring the Ubuntu Firewall (UFW)
If you have Ubuntu’s built-in firewall enabled (UFW), you must open the ports used by UPnP discovery and DLNA media streaming.
MiniDLNA uses port 8200/TCP for HTTP media delivery and port 1900/UDP for SSDP network discovery. Open both ports to your local subnet:
sudo ufw allow 8200/tcp comment "MiniDLNA HTTP"
sudo ufw allow 1900/udp comment "MiniDLNA Discovery"
sudo ufw reload
Step 7: Checking Server Status in Your Web Browser
MiniDLNA includes a built-in status web page that lets you verify how many files have been successfully catalogued.
Open your web browser on your Ubuntu desktop and navigate to:
http://localhost:8200
The page displays an active summary showing the total number of audio files, video files, and picture files currently registered in the database, along with a list of connected client devices.
How to Access Your Media on a Smart TV or Console
With MiniDLNA active on your local Wi-Fi or wired network, connecting from your TV requires no passwords or complex pairing:
- Ensure your smart TV or games console is connected to the same Wi-Fi router as your Ubuntu computer.
- On your television, open the Media Player, Source, or Inputs menu.
- Select your DLNA server name (for example, Ubuntu Living Room Media).
- Browse through your categorised folders (Videos, Music, Pictures) and select any file to start playback immediately.
MiniDLNA delivers an exceptionally reliable, private home media streaming solution that keeps your favourite entertainment accessible throughout your home without third-party subscriptions or complicated software.