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
/disk/print
# Format and partition if needed
/disk/format-drive drive=usb1
# Mount storage
/disk/mount/add name=media drive=usb1 partition=1

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. Use bridge to serve to all LAN devices.

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

allowed-ip: Restrict access to specific IP addresses or ranges. Supports both IPv4 and IPv6.

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

Create a basic media server on the bridge interface:

# Create media server
/ip/media/add friendly-name="MikroTik Media" interface=bridge path=usb1/media

Verify the configuration:

/ip/media/print

Example output:

[admin@MikroTik] /ip/media> print
Flags: X - disabled name
0 ="media1" friendly-name="MikroTik Media" interface=bridge
path=usb1/media disabled=no

Create separate media servers for different content or users:

# Main media library
/ip/media/add friendly-name="Family Media" interface=bridge path=usb1/media
# Separate server for kids content
/ip/media/add friendly-name="Kids Media" interface=bridge path=usb1/kids
# Restricted adult content
/ip/media/add friendly-name="Adults Media" interface=bridge path=usb1/adults allowed-ip=192.168.1.100

Restrict media access to specific IP addresses:

# Only allow specific IP
/ip/media/add friendly-name="Restricted" interface=bridge path=usb1/restricted allowed-ip=192.168.1.100
# Allow IP range
/ip/media/add friendly-name="Living Room" interface=bridge path=usb1/livingroom allowed-ip=192.168.1.0/24

Restrict access by device hostname:

# Allow specific hostname
/ip/media/add friendly-name="TV Room" interface=bridge path=usb1/tv allowed-hostname=LivingRoomTV
# Multiple hostnames (comma-separated)
/ip/media/add friendly-name="Bedroom" interface=bridge 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 main bridge (all LAN devices)
/ip/media/add interface=bridge 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 mountedCheck /disk/mount status
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 mounted
/disk/mount/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
/ip/media/add friendly-name="Secure Media" interface=bridge path=usb1/secure allowed-ip=192.168.1.50,192.168.1.100
# Create open media server for general use
/ip/media/add friendly-name="Public Media" interface=bridge 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