Linux Nas

From ElectroDragon
Jump to: navigation, search


  • sudo apt-get install minidlna
  • Config file sudo nano /etc/minidlna.conf, example:
# Name that the DLNA server presents to clients.
friendly_name=RASPI MINIDLNA
# set port, can visit later via port
  • service start: sudo service minidlna restart, or auto start: update-rc.d minidlna defaults
  • remote play options:
  1. On another RPI: VLC, XMBC KODI,
  2. appstore or android: BubbleUPnP, MediaHouse, mxplayer
  3. smart TV
  4. PC: potplayer
  • User watch max issue: nano edit: /etc/sysctl.conf, add line: fs.inotify.max_user_watches=65536, and run command /sbin/sysctl -p
  • In minidlna conf: also enable inotify=yes and notify_interval=300


  • Install the samba, update maybe necessary: sudo apt-get install samba samba-common-bin
  • edit config file, we use nano here, some typing work will be needed: nano /etc/samba/smb.conf
  • (may not necessry) Give the workgroup and windows support, change the following settings, normally workgroup is default WORKGROUP
workgroup = your_workgroup_name
wins support = yes
  • Edit following contents at the end of the conf file:
  • complex set (reference only)
# shared name
   comment= Pi Home
# shared folder  
   # only guest=no 
   create mask=0777 
   directory mask=0777 # may not necessary
   public=yes # yes or no for public
   valid users = root pi # allowed user
  • simple set
# shared name
   comment= Pi Home
# shared folder  
   valid users = root pi
  • Then restart the samba service ‘’‘’/etc/init.d/samba restart or service samba restart or service smbd restart
  • Finally add the new users pi, and enther the password twice and you can browse raspberrypi in the windows now:
smbpasswd -a pi
pdbedit -a pi
  • If can not write file, add line force user = root


Step Header text Header text
Install apt-get install transmission-daemon Example
  • Use root for transmission-daemon
  • in case hard disk mounted as root, and not changeable
  • sudo nano /etc/init.d/transmission-daemon
  • change USER=debian-transmission to USER=root
  •  ? usermod -a -G debian-transmission root
  •  ? adduser root debian-transmission (add user root to group debian-transmission)
  •  ? cat /etc/passwd set debian-transmission number id to 0:0
match the mounted disk
setting config file
  • Run the command to edit setting file:
sudo nano /etc/transmission-daemon/settings.json
Setting steps - turn off or edit whitelist IP "rpc-whitelist-enabled": false, so you can login remotely 192.168.1.*
Setting steps - set correct Download folder "download-dir": "/media/SSK",
Setting steps - Change the login user name and password for RPC
"rpc-password": "root",
"rpc-username": "root",
Setting steps - set all downloaded files' permission to 777 "umask": 0
Setting steps - reload config
  • and then restart after you finish editing the configuration file
sudo service transmission-daemon reload
sudo service transmission-daemon restart
  • Kill all daemon to ensure you can edit the setting files.
killall transmission-daemon

Use in OpenWrt

Xuneli Xware (Obsolete)

Steps Header text Header text
prerequisite use root, mount disk, and xunlei will automatically use it and put file in TDDOWNLOAD folder Example
APP file Example
install APP example folder /home/pi/XL Example
run setup command
  • chmod 777 * -R
  • run ./portal
set right for xunlei file copy activation code into
Set auto start
  • sudo nano /etc/rc.local
  • add the line before exit 0
  • ./home/pi/XL/portal
  • fdisk -l to check if the media mounted or not
  • Auto mount media disk, if failed auto mount reboot it.


  • Can download file from Baiduyun or 115


  • All the config file see on this page.
Header text Header text Header text
Install apt-get install aria2 -
create session file sudo touch /home/pi/aria2.session -
create config file sudo nano /home/pi/aria2.conf use file below
run with conf file sudo aria2c --conf-path=/home/pi/aria2.conf -
run in daemon mode sudo aria2c --conf-path=/home/pi/aria2.conf -D -
Set auto start
  • sudo nano /etc/init.d/aria2
  • sudo chmod +x /etc/init.d/aria2
  • sudo update-rc.d aria2c defaults
use file below
run as service
  • sudo service aria2 start
  • sudo ps x |grep aria2
set as auto start sudo update-rc.d aria2 defaults -
set web -> install nginx apt-get install nginx
config nginx
  • nano /etc/nginx/sites-available/default
  • set port from 80 to 8080
get YAWW wget
install YAWW unzip to nginx html folder -> /usr/share/nginx/www/ or /var/www/html/
restart nginx to try run YAWW service nginx restart
install webui-aria2
debug if use HDD external -> set file-allocation=falloc to file-allocation=none

Baidu Yun by SyncY

Steps Header text Header text
  • Install python and relevant package "requests"
  • pip install requests
git clone the python files git clone -
Auth, run command ./ info -
confirm after authication, you can find folder "我的应用数据apps" in main folder
run list command to see files in apps folder ./ list

Set system locales

  • In raspi-config, first choose:
en-GB.UTF-8 UTF-8
zh.CN.GB18030 GB18030
zh_CN.UTF-8 UTF-8

and then choose: zh_CN.UTF-8 UTF-8

  • Change Timezone to Asia -shanghai
  • Install input method: apt-get install scim-pinyin
  • nano /etc/sysconfig/i18n, change the original to


./home/pi/bypy/ syncup
  • or compare
 ./home/pi/bypy/ compare