LinuxCommandLibrary

minidlna

Creates a DLNA media server

TLDR

Start the MiniDLNA daemon using the default configuration at /etc/minidlna.conf

$ minidlna
copy

Start MiniDLNA with a specific configuration file
$ minidlna -f [path/to/minidlna.conf]
copy

Force a database rescan on startup
$ minidlna -R
copy

Run MiniDLNA in the foreground (useful for debugging)
$ minidlna -d
copy

Enable verbose debug output
$ minidlna -d -v
copy

Specify a custom media directory (overrides config)
$ minidlna -m [path/to/media]
copy

Specify a custom database directory
$ minidlna -P [path/to/pidfile]
copy

Specify a custom log file path
$ minidlna -l [path/to/logfil.log]
copy

SYNOPSIS

The minidlna command is primarily designed to run as a background daemon. Its most common invocation involves specifying a configuration file. Options can be used to override settings or for debugging purposes.

minidlna [OPTIONS]

Common usage examples include:
minidlna -f /etc/minidlna.conf
minidlna -d (for foreground debug mode)

PARAMETERS

-f <config_file>
    Specifies the path to an alternative configuration file.

-d
    Enables debug mode, running the server in the foreground and logging to stderr.

-v
    Enables verbose debug mode, providing more detailed logging output.

-q
    Enables quiet mode, suppressing most standard output.

-a <ip_address>
    Specifies the IP address on which the server should listen.

-p <port>
    Specifies the listening port for the server (default is 8200).

-s <serial>
    Sets a custom serial number for the server.

-m <model>
    Sets a custom model name for the server.

-t <friendly_name>
    Sets a custom friendly name that clients will see for the server.

-U
    Forces unbuffered I/O, often used for debugging purposes.

-r
    Requests a re-index of all media files from the configured directories.

-R
    Forces a full re-index of all media files and rebuilds the database from scratch.

-P <pid_file>
    Specifies the path for the PID (process ID) file when running as a daemon.

-L
    Directs logging output to the system's syslog facility.

-u <user>
    Changes the user (and group if -g is specified) that minidlna runs as after startup.

-g <group>
    Changes the group that minidlna runs as after startup (requires -u).

-h
    Displays the help message and exits.

-V
    Displays the version information and exits.

DESCRIPTION

minidlna, often known as ReadyMedia, is a lightweight and simple Digital Living Network Alliance (DLNA) and Universal Plug and Play (UPnP) Audio/Video media server. It enables users to effortlessly share multimedia content – including photos, music, and videos – from their Linux system to various DLNA-certified devices on the same local network. These compatible devices range from smart televisions and game consoles (like PlayStation and Xbox) to smartphones and other dedicated media players.

The server automatically scans designated directories for media files, building a database that is then presented to clients in an organized and browsable format. Designed for minimal resource consumption, minidlna is an ideal choice for embedded systems, Network-Attached Storage (NAS) devices, or older hardware, while still providing robust and reliable media streaming capabilities. Its primary configuration is managed via a dedicated text file, typically minidlna.conf, rather than relying heavily on command-line arguments for daemon operation.

CAVEATS

While command-line options exist, the primary and most robust configuration of minidlna is achieved through its configuration file (e.g., /etc/minidlna.conf). Command-line parameters often override configuration file settings or are intended for temporary debugging.

For minidlna to be discoverable and accessible, proper firewall rules must be configured to allow traffic on its listening port (default 8200 TCP/UDP) and potentially other UPnP discovery ports. Ensure the user minidlna runs as has appropriate read permissions to all shared media directories.

CONFIGURATION FILE

The core functionality and settings of minidlna are managed through its dedicated configuration file, typically located at /etc/minidlna.conf or in a user's home directory (e.g., ~/.config/minidlna/minidlna.conf). This file allows users to define critical parameters such as media directories to be scanned, the server's name, listening port, network interfaces, log file paths, and database locations. Editing this file is essential for customizing the server's behavior to specific network and media library needs.

MEDIA RESCANNING AND DATABASE MANAGEMENT

minidlna can be configured to automatically monitor media directories for changes, adding new files or removing deleted ones. However, for significant changes or troubleshooting, manual rescanning is often necessary. This can be triggered by restarting the minidlna service, or by using the command-line options -r (re-index existing files) or -R (force a full rebuild of the media database). The latter is particularly useful after adding a large collection of new media or if the database becomes corrupted.

HISTORY

Initially developed as minidlna, this lightweight UPnP AV media server gained popularity for its simplicity and efficiency. It was later rebranded as ReadyMedia, though the original name remains widely used and recognized within the Linux community. Throughout its development, the focus has remained on providing a compliant, low-resource DLNA server, making it a persistent choice for embedded systems and home network media sharing.

SEE ALSO

ushare(1), plexmediaserver(1), emby-server(1), vlc(1), ffmpeg(1), smbd(8)

Copied to clipboard