A IGMP -d 224.0.0.1/32 -m comment -comment "igmp membership queries, upnp/dlna" -j ACCEPT A TCP -m tcp -dport 8200 -m comment -comment minidlna -j ACCEPT An overall configuration for iptables may therefore look like the following snippet, assuming there are separate chains which handel TCP, UDP and IGMP. In addition to 1900/udp and 8200/tcp, minidlna may also require allowing muliticasts. For example, this can be done with arno's iptables firewall by editing nf and opening the ports by doing: If using a firewall the the ssdp (1900/udp) and trivnet1 (8200/tcp) ports will need to be opened. Other aspects and MiniDLNA limitations may need to be considered beforehand to ensure satisfaction from its performance. To autostart it at login, add the previous line to ~/.bash_profile. $ minidlnad -f /home/$USER/.config/minidlna/nf -P /home/$USER/.config/minidlna/minidlna.pid You can now start minidlna with the following command: $ install -Dm644 /etc/nf ~/.config/minidlna/nfĬonfiguring should be as above, specifically: This can be useful if you want to share media but do not have administrator access to the machine.Ĭreate the necessary files and directories locally and edit the configuration: Instead, run journalctl -u rvice as root to view the logs.Ĭopy the /usr/lib/tmpfiles.d/nf file to /etc/tmpfiles.d/nf and replace root with your own user and group:Īlternatively to a system service, you can run minidlna manually. The log_dir is not used by the systemd service.Add ProtectHome=off in the section if you want minidlna to be able to read/write to /home/ user/, including the db_dir or any media_dir.To do so, create a /etc/systemd/system//nf drop-in file: If you are using the systemd service, edit rvice as it will by default run as the minidlna user. If you are running without systemd, this is all you need. See FS#35325.Ĭhange user line in /etc/nf, and change the db_dir and log_dir options to directories that are writeable by that user. NetworkManager#NetworkManager-wait-online solves this issue. Sometimes the minidlna daemon fails to start while booting. Stop the daemon after rebuilding Media_DB e.g. (Results in: minidlna.c:782: fatal: Bad user 'minidlna'.) (Discuss in Talk:ReadyMedia) Reason: This doesn't work since minidlna 1.3.0-2 dropped the transient minidlna user. You can also clean or rebuild MiniDLNA DB manually after stopping MiniDLNA daemon, or analyze its debug output (Ctrl+C to exit): If the issue persists, copy or download new files first to a non-watched by inotify Downloads folder on the same drive, and then move them to appropriate media folders, since lengthy media files copying or downloading may confuse inotify. If it does not change, make sure the user running MiniDLNA has rw access to the DB folder. If files are added/deleted to monitored media directories, they may not be noticed until the device DLNA client is restarted.Ĭheck inotify updates via MiniDLNA presentation_url by comparing files count. Some do not rescan media drives on a consistent basis or at all. Inotify performance may depend on device type. To have it permanently changed, add to /etc/sysctl.d/nf # Increase inotify max watchs per user for local minidlna # sysctl fs.inotify.max_user_watches=100000 If default number of inotify watches is non-sufficient to have MiniDLNA monitor all your media folders, increase inotify watches through sysctl (100000 should be enough for most uses): When MiniDLNA is run as a regular user, it does not have the ability to change the kernel's inotify limits. Kernel adds one inotify watch per each folder/subfolder in Media_Collection Directories set in /etc/nf to monitor changes thus allowing MiniDLNA to update Media_DB in real time. The minidlna service can be managed by rvice using systemd. To change the user it runs as, see #Running minidlna as your own user below. MiniDLNA runs as the minidlna user by default. Presentation_url= # or use your device static IP Inotify=yes # 'no' for less resources, restart required for new media Media_dir=P,/home/user/Pictures # Use A, P, and V to restrict media 'type' in directory Media_dir=A,/home/user/Music # Mounted Media_Collection drive directories etc/nf #network_interface=eth0 # Self-discovers if commented (at times necessary to set) The webserver remains accessible on all interfaces, potentially creating a security problem if running on a publicly accessible host.īy default, minidlna runs as a system service (alternatively, you can run it manually). Warning: The current version of ReadyMedia has a serious bug: The -i command-line option and network_interface configuration option used to bind to a specific IP address does not apply to the HTTP server.
0 Comments
Leave a Reply. |