Install Aria2 on your NAS (Buffalo LS410D)

Pre-requisite:

  1. Open SSH
  2. Install IPKG

Install Aria2:

  1. Update Ipkg and install aria2
    • ipkg update

      ipkg install aria2

  2. Create folder aria2 in /opt/etc
    • mkdir /opt/etc/aria2

  3. Create a config file
    • nano /opt/etc/aria2/aria2.conf

  4. Copy code below to your file then Save it.
    • daemon
      dir=/mnt/disk1/share
      max-connection-per-server=4
      enable-rpc=true
      rpc-user=admin
      rpc-passwd=password
      rpc-listen-all=true
      rpc-port-all=true
      log=/opt/etc/aria2/aria2.log
      log-level=warn
      auto-save-interval=30
      event-poll=poll
      # other options to your choise here

Create configuration to let aria2 run when NAS start

  1. Create a aria2 config to setup aria2 run when NAS start.
    • nano /opt/etc/init.d/S90aria2

  2. Copy content below to file:
    • #!/bin/sh

      RETVAL=0

      case “$1” in
      start)
      echo -n “Starting aria2c daemon: ”
      umask 0000
      /opt/bin/aria2c –conf-path=/opt/etc/aria2/aria2.conf
      RETVAL=$?
      echo
      ;;
      stop)
      echo -n “Shutting down aria2c daemon: ”
      /usr/bin/killall aria2c
      RETVAL=$?
      echo
      ;;
      restart)
      stop
      sleep 3
      start
      ;;
      *)
      echo $”Usage: $0 {start|stop|restart}”
      RETVAL=1
      esac

      exit $RETVAL

  3. Set write permission
    • chmod 755 /opt/etc/init.d/S85aria2

  4. Reboot:
    • reboot

Consider, when you change something of your /opt/etc/aria2/aria2.conf file you must enter a:

/opt/etc/init.d/S85aria2 restart