Learn how to install Transmission and manage torrents remotely.
Transmission is a simple torrent daemon with a built-in web UI. It is generally used on NAS devices, but it can also be used on ASUS routers.
Installation environment details.
| Category | Details | | :------- | :-------------------: | | Hardware | AC88U | | Firmware | ASUSWRT-MERLIN 386.12 | | Package | Entware armv7sf-k2.6 |
The essential requirements are as follows:
Access the router via SSH in the terminal.
Install the package.
opkg update
opkg install transmission-web
After updating Entware, install the web interface.
Before modifying the settings, stop Transmission.
If you do not stop it, you will not be able to make changes.
/opt/etc/init.d/S88transmission stop
Use the script to stop Transmission.
Edit the Transmission configuration file, /opt/etc/transmission/settings.json, using the default editor, vi.
Open the configuration file.
vi /opt/etc/transmission/settings.json
Open the configuration file using vi.
Modify the properties.
Check the properties to modify.
"download-dir": "/mnt/XIYOsD10/home/xiyo/downloads",
"incomplete-dir": "/mnt/XIYOsD10/var/tmp/transmission/incomplete",
"rpc-password": "test1234",
"rpc-username": "root",
"watch-dir": "/mnt/XIYOsD10/home/xiyo/watchdir",
XIYOsD10 is the name of the mounted storage.
Transmission will automatically create the directories specified in the configuration file if they do not exist, so you do not need to create them manually.
To find a word, press / and enter the text you want to search for.
To edit text, press i to switch to insert mode.
After finishing your edits, press ESC to switch back to command mode.
To save, in command mode, type :wq and press Enter to save and exit the editor.
Start Transmission.
/opt/etc/init.d/S88transmission start
Use the script to start Transmission.
Open the firewall to effectively connect with peers.
Add the ports to the firewall that will allow inbound connections.
iptables -I INPUT -p tcp --dport 51413 -j ACCEPT
iptables -I INPUT -p udp --dport 51413 -j ACCEPT
Add the ports used by Transmission to the firewall.
TCP is used for downloading files, while UDP is used for connecting to trackers and peers.
Since the firewall rules will disappear every time the router restarts, set it up so that the rules are applied on each restart.
FILE="/jffs/scripts/firewall-start"; \
[ ! -f "$FILE" ] && \
echo "#!/bin/sh" > "$FILE" && \
chmod +x "$FILE"; \
echo -e "\n# Allow Transmission" >> "$FILE"; \
echo "iptables -I INPUT -p tcp --dport 51413 -j ACCEPT" >> "$FILE"; \
echo "iptables -I INPUT -p udp --dport 51413 -j ACCEPT" >> "$FILE"
If the firewall-start file does not exist, create it and add the firewall rules to the file.
Set Transmission to start automatically every time the router restarts.
Since Transmission uses additional storage, it should not run until the storage is mounted.
Set it to run immediately after the drive is mounted.
Check for the file.
Verify if the script to run after mounting exists, and create it if it does not.
FILE="/jffs/scripts/post-mount"; \
[ ! -f "$FILE" ] && \
touch "$FILE" && \
chmod +x "$FILE" && \
echo "#!/bin/sh" > "$FILE"
If the post-mount file does not exist, create it and add execution permissions.
Add the auto-execution script.
Add the command to run automatically after mounting.
FILE="/jffs/scripts/post-mount"; \
SEARCH_STRING=". /jffs/addons/diversion/mount-entware.div # Added by amtm"; \
ADD_COMMAND="/opt/etc/init.d/S88transmission start"; \
grep -q "$SEARCH_STRING" "$FILE" || \
echo -e "\n# Entware addmon start" >> "$FILE" && \
echo "$ADD_COMMAND" >> "$FILE"
If you have installed or removed diversion, the mount script for diversion will exist.
In that case, the auto-execution script is already included, so no further action is needed.
If it does not exist, add the script to automatically run Transmission.
You can access the web UI by navigating to http://RouterIP:9091 in your browser.
The ID and password are the values set in the configuration file.
The Transmission client has the capability to access remote servers.
After launching, simply enter the same information as you would for web access.
If you use the default settings for storage mounting, your mounted storage names will likely be sda1, sdb1, etc.
In this case, the storage names may change every time the router restarts. Therefore, you need to ensure that the mounts are always fixed.