MiniDLNA Arch Linux
DLNA (Digital Living Network Aliance), is collection of interoperability guidelines which set the protocols for multimedia communication
## install minidlna
```
sudo pacman -S minidlna
```
## configure minidlna
```
port=8200
network_interface=wlp4s0
user=
media_dir=/home//Videos/
db_dir=/home//.local/share/minidlna/cache
log_dir=/home//.local/share/minidlna/log
enable_subtitles=yes
```
## create necessary folders
```
mkdir -p $XDG_DATA_HOME/minidlna/{cache, log}
sudo mkdir /run/minidlna
sudo chown : /run/minidlna
```
* cache stores the sqlite db, and `/run/minidlna` contains the pid file
* permissions are important as we are changing the user as well
## configure firewall rules
```
# nft add rule
sudo nft add rule inet filter input [position 1] tcp dport 8200 accept comment trivnet1
sudo nft add rule inet filter input [position 1] udp dport 1900 accept comment ssdp
```
* positions are optional arguments here, depending on the ruleset of the firewall but essentially it has to be before this line:
```
meta pkttype host limit rate 5/second counter reject with icmpx admin-prohibited
```
* if errors persist just temporarily remove the entire ruleset like so `sudo nft flush ruleset`
## change runtime user
```
sudo systemctl edit minidlna.service
```
```
# write the following in between the instructed lines on override.conf
[Service]
ProtectHome=off
User=
Group=
```
## start minidlna
```
sudo systemctl start minidlna
```
## verify the service
```
http://:8200
```
#### sources: