The Asus RT-N66U is the wireless router that has been serving my home Wi-Fi needs for the past 2 years or so. This router is a very powerful piece of equipment that comes with dual-band Wi-Fi, Gigabit switching, USB ports plus many more features. It also ships with ASUSWRT Download Master – a client to download files over HTTP, FTP, BitTorrent, eMule and NZB networks. For downloads, I am particularly only interested in BitTorrent downloads using the Transmission BitTorrent client – the default BitTorrent client of many UNIX and Linux distributions.
This article will provide the necessary steps to install the Transmission client for torrent downloads on the Asus RT-N66U router. If you plan to install Transmission client on another Asus wireless router, this article may still be useful for you.
Asuswrt-Merlin is a customised version of the default Asuswrt firmware developed by Asus. Asuswrt-Merlin includes various improvement and fixes over the original Asuswrt. This is a prerequisite (Not really, but I have not tried this on stock Asus firmware). The Asuswrt-Merlin firmware builds are available here. Download the correct firmware based on the router model and flash it the same way as you would flash any regular Asus firmware. Additional information is available on the Asuswrt-Merlin Wiki site.
Router System Config
We will need access to the terminal for installation, so remember to turn on the SSH service on the router. The SSH option can be found under
Administration -> System.
You will also need a SSH client. Install PuTTY, a free SSH client, if you do not have one.
Besides SSH, also enable the JFFS partition. This is required by Entware. The first time you enable JFFS, select the option “
Format JFFS partition at next boot” and reboot the router.
Prepare USB Disk
The router runs on Linux and it has support for vfat, ext2 and ext3 filesystems. The USB disk though has to be formatted to either ext2 or ext3 filesystems only. My personal preference is to use the ext3 filesystem for the USB disk. You can use the MiniTool Partition Wizard Home Edition to modify the partitions of the USB disk within Windows. Create a primary partition and format it as ext3.
Once the disk is formatted, plug the disk to one of the USB ports in the router.
Directory and mount-point structure
Take note of the following directories.
/opt – A softlink to the Entware installation on the USB disk
/opt/torrent – directory for torrent downloads within the USB disk
Configure Entware and Transmission
The default download tools from Asus are based on Optware – a software repository that offers various software programs that can be installed on your router. Entware is a modern alternative to Optware. For this article, we will be using Entware. Note that you cannot use both Optware and Entware at the same time.
SSH to the router using the admin account and install Entware. If the IP address of the router is
192.168.1.1, ssh in like this.
$ ssh firstname.lastname@example.org
Install Entware by running the
Once Entware has been installed by the script, proceed to install the Transmission client.
# opkg update # opkg install transmission-daemon # opkg install transmission-remote # opkg install transmission-cli # opkg install transmission-web
Next, create directories for torrent downloads.
# mkdir -p /opt/torrent/download # mkdir -p /opt/torrent/incomplete # mkdir -p /opt/torrent/watchdir
Now, we will need to modify the Transmission config file at
/opt/etc/transmission/settings.json. The important directory related configuration parameters are below.
"download-dir": "/opt/torrent/download", "incomplete-dir": "/opt/torrent/incomplete", "watch-dir": "/opt/torrent/watchdir",
You can change the upload, download limit and other settings based on your requirements.
We will also need to open up both the TCP and UDP ports 51413 that is used by the Transmission client for torrent downloads. Create a new script called
/jffs/scripts and make it executable. If you have changed the default port numbers in the
settings.json file, you will need to change the port numbers accordingly below.
# cd /jffs/scripts # echo "#!/bin/sh" > firewall-start # echo "iptables -I INPUT -p tcp --dport 51413 -j ACCEPT" >> firewall-start # echo "iptables -I INPUT -p udp --dport 51413 -j ACCEPT" >> firewall-start # chmod +x firewall-start
We are done and we can manually start the client.
# /jffs/scripts/firewall-start # /opt/etc/init.d/S88transmission start
The web interface for the Transmission BitTorrent client can be accessed on port 9091. If your router’s IP address is
192.168.1.1, try opening the URL
http://192.168.1.1:9091/ from your browser.
Q1: Transmission client does not run after router reboot.
A1: Normally, the Transmission client is started automatically after router reboot by scripts installed under the
/jffs partition. Check for the following scripts in
# ls -l /jffs/scripts -rwxrwxrwx 1 admin root 76 Jun 5 17:36 post-mount -rwxrwxrwx 1 admin root 53 Jun 5 17:36 services-start -rwxrwxrwx 1 admin root 43 Jun 5 17:36 services-stop
Next, check the softlink
/tmp/opt. It should point to the entware directory in the USB disk.
# ls -ld /tmp/opt lrwxrwxrwx 1 admin root 21 Jan 1 2011 /tmp/opt -> /tmp/mnt/sdb1/entware
If you not familiar on how to perform a repair of the installation, I recommend performing a re-install of the Entware setup to solve the problem. Alternatively, you may manually start the Transmission client process after every router reboot.