Skip to content

DLNA Media Server

The DLNA Media server enables sharing media files with UPnP/DLNA-compatible devices on your network, including smart TVs, gaming consoles, and media player applications.

DLNA (Digital Living Network Alliance) creates a unified media sharing ecosystem. UPnP (Universal Plug and Play) provides the discovery and control protocols underlying DLNA functionality. MikroTik’s implementation serves as a Digital Media Server (DMS), making media files available to compatible devices on your network.

ComponentDescription
Media Server (DMS)Stores and serves media content (MikroTik router)
Control PointDiscovers and controls devices
RendererPlays content on display devices
  • Stream photos, videos, and music to DLNA-compatible devices
  • Automatic device discovery via UPnP
  • IP-based and hostname-based access control
  • Multiple media server instances with different content
  • Works with common DLNA clients (smart TVs, consoles, mobile apps)

DLNA media server works with:

  • Smart TVs (Samsung, LG, Sony, Philips, etc.)
  • Gaming consoles (PlayStation, Xbox)
  • Set-top boxes
  • Mobile devices with DLNA apps (BubbleUPnP, VLC, etc.)
  • Kodi and other DLNA-compatible software
RequirementDetails
StorageExternal USB drive, SATA, or NVMe storage
InterfaceAt least one Ethernet interface
RouterOSv6.x or later with system package

Media files must be stored on external storage:

# Check available disks and their numbers
/disk/print
# Format disk by number (use number from /disk/print output)
/disk/format-drive numbers=0
# Verify the disk is available and note its mount point (for example, `usb1`)
/disk/print

Sub-menu: /ip media

PropertyTypeDescriptionDefault
allowed-hostnamestringHostname access restrictionempty
allowed-ipIP/IPv6IP address access restrictionempty
friendly-namestringServer name on networkempty
interfacestringNetwork interface to serveempty
pathstringMedia directory pathempty
disabledyes/noDisable media serverno

friendly-name: The name displayed to DLNA clients on the network. If not set, defaults to “RouterOS”.

interface: The network interface where the media server will listen. Specify an actual interface name (e.g., ether2, bridge1). If using a bridge interface, create it first with /interface/bridge/add name=bridge1.

path: Path to the media directory on connected storage (e.g., usb1/media).

allowed-ip: Restrict access to a specific IP address (single host only — CIDR ranges are not supported). Use multiple server entries with different allowed-ip values to permit multiple individual hosts.

allowed-hostname: Restrict access to specific device hostnames (requires reverse DNS).

Create a basic media server on a LAN interface:

# Create media server on ether2 (replace with your LAN interface name)
/ip/media/add friendly-name="MikroTik Media" interface=ether2 path=usb1/media

Verify the configuration:

/ip/media/print

Example output:

[admin@MikroTik] /ip/media> print
Flags: X - DISABLED
0 path="usb1/media" interface=ether2 friendly-name="MikroTik Media"
allowed-ip=0.0.0.0 allowed-hostname="" status="Running"

Create separate media servers for different content or users:

# Main media library
/ip/media/add friendly-name="Family Media" interface=ether2 path=usb1/media
# Separate server for kids content
/ip/media/add friendly-name="Kids Media" interface=ether2 path=usb1/kids
# Restricted server (single IP only — CIDR ranges not supported)
/ip/media/add friendly-name="Adults Media" interface=ether2 path=usb1/adults allowed-ip=192.168.1.100

Restrict media access to specific IP addresses:

# Only allow a specific IP (single host — CIDR ranges are not supported)
/ip/media/add friendly-name="Restricted" interface=ether2 path=usb1/restricted allowed-ip=192.168.1.100
# To permit multiple hosts, add separate entries per IP
/ip/media/add friendly-name="Living Room" interface=ether2 path=usb1/livingroom allowed-ip=192.168.1.101
/ip/media/add friendly-name="Living Room" interface=ether2 path=usb1/livingroom allowed-ip=192.168.1.102

Restrict access by device hostname:

# Allow specific hostname
/ip/media/add friendly-name="TV Room" interface=ether2 path=usb1/tv allowed-hostname=LivingRoomTV
# Multiple hostnames (comma-separated)
/ip/media/add friendly-name="Bedroom" interface=ether2 path=usb1/bedroom allowed-hostname=BR_TV,BR_PHONE
# List all configured media servers
/ip/media/print
# View detailed configuration
/ip/media/print detail
# Disable a media server
/ip/media/set 0 disabled=yes
# Enable a media server
/ip/media/set 0 disabled=no
# Change friendly name
/ip/media/set 0 friendly-name="New Name"
# Update media path
/ip/media/set 0 path=usb1/newmedia
# Remove a media server
/ip/media/remove 0

Check media server status:

# View active media servers
/ip/media/print
# Check system resources when streaming
/system/resource/print

Organize your media files following DLNA conventions:

usb1/
└── media/
├── Videos/
│ ├── Movies/
│ └── TV/
├── Music/
│ ├── Artists/
│ └── Albums/
└── Pictures/
└── Photos/

DLNA supports various media formats:

Media TypeCommon Formats
VideoAVI, MKV, MP4, MOV, WMV
AudioMP3, WAV, FLAC, AAC, OGG
ImagesJPEG, PNG, GIF, BMP

Ensure UPnP and DLNA traffic is allowed on your LAN:

# Allow UPnP discovery (optional - usually handled automatically)
/ip/firewall/filter/add chain=input protocol=udp port=1900 action=accept comment="UPnP SSDP"
# Allow multicast for device discovery
/ip/firewall/filter/add chain=input protocol=udp dst-address=239.255.255.250 action=accept comment="UPnP multicast"

The interface parameter controls where the media server advertises:

# Serve on a bridge interface (create it first if it doesn't exist)
/interface/bridge/add name=bridge1
/ip/media/add interface=bridge1 path=usb1/media friendly-name="Main Media"
# Serve on specific VLAN
/ip/media/add interface=vlan100 path=usb1/media friendly-name="Guest Media"
# Serve on specific ethernet port
/ip/media/add interface=ether2 path=usb1/media friendly-name="Office Media"
IssueSolution
Not visible on networkVerify interface binding and firewall rules
Storage not availableCheck /disk print output
Path incorrectVerify directory exists on storage
SMIPS deviceDLNA not supported on SMIPS
IssueSolution
Video won’t playCheck format compatibility with client
Audio stutteringCheck network bandwidth, try wired connection
Images not loadingVerify file permissions and format
# Check media server configuration
/ip/media/print detail
# Verify storage is available
/disk/print
# Check available disk space
/system/resource/print
# View logs for errors
/log print where topic~"media"

Consider these security implications when enabling DLNA:

  • DLNA has no authentication - any device on the network can access
  • Media files are accessible to all LAN devices by default
  • UPnP discovery can expose device information
  1. Use access restrictions: Limit by IP or hostname when possible
  2. Separate media networks: Use VLANs to isolate media traffic
  3. Limit content exposure: Create separate servers for sensitive content
  4. Disable when not in use: Turn off if not needed
  5. Monitor access: Check which devices connect to media server
# Create restricted media server (one entry per allowed IP — CIDR not supported)
/ip/media/add friendly-name="Secure Media" interface=ether2 path=usb1/secure allowed-ip=192.168.1.50
/ip/media/add friendly-name="Secure Media" interface=ether2 path=usb1/secure allowed-ip=192.168.1.100
# Create open media server for general use
/ip/media/add friendly-name="Public Media" interface=ether2 path=usb1/public

DLNA and SMB serve different purposes:

FeatureDLNASMB
Use CaseMedia streamingFile sharing
AuthenticationNoneUsername/password
Device SupportSmart TVs, consolesComputers, NAS
ProtocolUPnP/DLNASMB/CIFS
Best ForMedia playbackFile management

For comprehensive file sharing alongside DLNA, consider also configuring SMB.

  • SMB: Windows-compatible file sharing
  • Container: Run media server containers
  • Wake on LAN: Wake media devices remotely
  • UPnP: Universal Plug and Play settings