DLNA Media Server
DLNA Media Server
Section titled “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.
Overview
Section titled “Overview”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.
Key Components
Section titled “Key Components”| Component | Description |
|---|---|
| Media Server (DMS) | Stores and serves media content (MikroTik router) |
| Control Point | Discovers and controls devices |
| Renderer | Plays content on display devices |
Capabilities
Section titled “Capabilities”- 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)
Supported Devices
Section titled “Supported Devices”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
Requirements
Section titled “Requirements”Hardware Requirements
Section titled “Hardware Requirements”| Requirement | Details |
|---|---|
| Storage | External USB drive, SATA, or NVMe storage |
| Interface | At least one Ethernet interface |
| RouterOS | v6.x or later with system package |
Storage Setup
Section titled “Storage Setup”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=1Media Server Properties
Section titled “Media Server Properties”Sub-menu: /ip media
| Property | Type | Description | Default |
|---|---|---|---|
| allowed-hostname | string | Hostname access restriction | empty |
| allowed-ip | IP/IPv6 | IP address access restriction | empty |
| friendly-name | string | Server name on network | empty |
| interface | string | Network interface to serve | empty |
| path | string | Media directory path | empty |
| disabled | yes/no | Disable media server | no |
Property Details
Section titled “Property Details”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).
Configuration Examples
Section titled “Configuration Examples”Basic Setup
Section titled “Basic Setup”Create a basic media server on the bridge interface:
# Create media server/ip/media/add friendly-name="MikroTik Media" interface=bridge path=usb1/mediaVerify the configuration:
/ip/media/printExample output:
[admin@MikroTik] /ip/media> printFlags: X - disabled name 0 ="media1" friendly-name="MikroTik Media" interface=bridge path=usb1/media disabled=noMultiple Media Servers
Section titled “Multiple Media Servers”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.100Access Control by IP
Section titled “Access Control by IP”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/24Access Control by Hostname
Section titled “Access Control by Hostname”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_PHONEMedia Server Management
Section titled “Media Server Management”Common Management Commands
Section titled “Common Management Commands”# 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 0Monitoring
Section titled “Monitoring”Check media server status:
# View active media servers/ip/media/print
# Check system resources when streaming/system/resource/printDirectory Structure
Section titled “Directory Structure”Organize your media files following DLNA conventions:
usb1/└── media/ ├── Videos/ │ ├── Movies/ │ └── TV/ ├── Music/ │ ├── Artists/ │ └── Albums/ └── Pictures/ └── Photos/Supported Formats
Section titled “Supported Formats”DLNA supports various media formats:
| Media Type | Common Formats |
|---|---|
| Video | AVI, MKV, MP4, MOV, WMV |
| Audio | MP3, WAV, FLAC, AAC, OGG |
| Images | JPEG, PNG, GIF, BMP |
Network Configuration
Section titled “Network Configuration”Firewall Considerations
Section titled “Firewall Considerations”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"Interface Selection
Section titled “Interface Selection”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"Troubleshooting
Section titled “Troubleshooting”Media Server Not Visible
Section titled “Media Server Not Visible”| Issue | Solution |
|---|---|
| Not visible on network | Verify interface binding and firewall rules |
| Storage not mounted | Check /disk/mount status |
| Path incorrect | Verify directory exists on storage |
| SMIPS device | DLNA not supported on SMIPS |
Playback Issues
Section titled “Playback Issues”| Issue | Solution |
|---|---|
| Video won’t play | Check format compatibility with client |
| Audio stuttering | Check network bandwidth, try wired connection |
| Images not loading | Verify file permissions and format |
Debug Commands
Section titled “Debug Commands”# 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"Security Considerations
Section titled “Security Considerations”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
Best Practices
Section titled “Best Practices”- Use access restrictions: Limit by IP or hostname when possible
- Separate media networks: Use VLANs to isolate media traffic
- Limit content exposure: Create separate servers for sensitive content
- Disable when not in use: Turn off if not needed
- Monitor access: Check which devices connect to media server
Access Control Example
Section titled “Access Control Example”# 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/publicComparison with SMB
Section titled “Comparison with SMB”DLNA and SMB serve different purposes:
| Feature | DLNA | SMB |
|---|---|---|
| Use Case | Media streaming | File sharing |
| Authentication | None | Username/password |
| Device Support | Smart TVs, consoles | Computers, NAS |
| Protocol | UPnP/DLNA | SMB/CIFS |
| Best For | Media playback | File management |
For comprehensive file sharing alongside DLNA, consider also configuring SMB.
Related Features
Section titled “Related Features”- SMB: Windows-compatible file sharing
- Container: Run media server containers
- Wake on LAN: Wake media devices remotely
- UPnP: Universal Plug and Play settings