What's new

[GUIDE] Installing aMule with Entware

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

noric

Senior Member
Ok, after a lot of reading and effort I've finally set up aMule working on my RT-N66U with entware. Probably easy for some of you, but let's help those that aren't very experienced. :eek:
I found this quite tricky because you need to change quite a lot of the default settings and it's not easy because 1) they are not very documented and 2) you don't have a GUI to play with. In the end I installed aMule in Ubuntu, configured it, grabbed the needed files and pasted them in the router's aMule.
I also read several guides about aMule on NAS systems, to configure the web interface and the remote GUI.

Prerequisite: I assume you have entware already installed. Please refer to Merlin's guide about how to install entware.

1) log in via telnet and type:
Code:
opkg install amule

2) type:
Code:
/opt/etc/init.d/S57amuled start

3) type:
Code:
/opt/etc/init.d/S57amuled stop

4) type:
Code:
echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1
This will create your aMule's password. Just enter your desired password where I wrote "yourpasswordhere". The command will output a long string, which you need to copy.

5) Download the attachment at the end of my post. Open in notepad++ (not windows notepad) the downloaded amule.conf file. Search "ECPassword=" and paste the string you copied at point 4. Search "Password=" and do the same.
Now search "TempDir=" and "IncomingDir=". These are the downloads folders, which you may want to change to your likings. Defaults are in /mnt/sda1/Torrent
You may want to change other settings in amule.conf. Just to mention some of them: MaxUpload (default is 0, i.e. unlimited upload speed; measured in kB), MaxDownload (default is 0, i.e. unlimited download speed; measured in kB), MinFreeDiskSpace (default is 10240, i.e. stop downloading if less than 10GB of free disk space).
I suggest that you also change the default TCP (Port=) and UDP (UDPPort=) ports, because they are blacklisted by some servers AFAIK.

7) Open shareddir.dat in notepad++ and enter here the folders you want to share with aMule. In the file I provide I share the folder /mnt/sda1/Media: adjust or delete this to your likings. One folder per line.
Please note that the Temp and Incoming folders are shared even if they aren't listed here.

8) Copy addresses.dat, amule.conf, nodes.dat, server.met, shareddir.dat to \\rt-n66u\entware\var\amule (it's /opt/var/amule if you copy via telnet).

9) Edit the firewall-start script as per Merlin's guide about Transmission: refer to the "Firewall configuration" section of that guide. Just use, instead of 51413, the port numbers you chose for TCP and UDP in amule.conf.

10) I found that you sometimes are given low id if aMule starts too early when you reboot your router. To workaround the issue, edit the services-start script (refer to Merlin documentation and google if you don't know how to do it) and enter "sleep 60" instead of "sleep 10".

11) reboot and everything should work! :)
You can use amule's web interface at the address 192.168.1.1:4711 in your web browser. Or you can download aMuleGUI from www.amule.org. Just download amule from there: open the downloaded archive and grab only the file called aMuleGUI.exe (for windows), that is the remote GUI. Open aMuleGUI.exe and input the router's ip (192.168.1.1) and port number 4712.

12) If you want to remove aMule from automatic startup at boot, see post #20. Credits to @Martineau.

Remember, when you want to edit amule.conf, you need to stop the daemon first. In telnet type "/opt/etc/init.d/S57amuled stop", do the changes you want to amule.conf, in telnet type "/opt/etc/init.d/S57amuled start".

One warning: I haven't enabled ipfilter automatic updates because they make aMule crash. This is a known bug, unfortunately.
You can manually update ipfilter by manually downloading ipfilter file from http://upd.emule-security.org/ipfilter.zip, extracting guarding.p2p and renaming it ipfilter.dat, stopping amule (in telnet "/opt/etc/init.d/S57amuled stop"), copying ipfilter.dat to \\rt-n66u\entware\var\amule, starting amule (in telnet "/opt/etc/init.d/S57amuled start").
I suggest doing this every once in a while.

Final note. You may want to have a look at this great webUI (credits to Matteo Ragni): https://github.com/MatteoRagni/AmuleWebUI-Reloaded
The installation steps differ from what the author says:
1) in telnet "/opt/etc/init.d/S57amuled stop"
2) browse to \\rt-n66u\entware\share\amule\webserver. You will find a folder called "default": rename it to whatever you want. Put the extracted folder here (i.e. in webserver folder) and rename it "default".
3) in telnet "/opt/etc/init.d/S57amuled start".

Attachment: View attachment amule.zip
 
Last edited:
Hi,

Wrestling with Optware version here. The ipkg version is 2.3.1rc1-2. I can't find a amuleGUI for this one. The protocol for EC (External Connections) is different from 2.2.6 and 2.3.1. In teh repo theres is no amuleGUI.exe compiled for this one.
Also, amule Android can't keep connection alive; it does connect and then give a "parsing error" message and disconnects.

Regards.
 
Nope, protocol is different.
The web UI is fine, as long as it lacks functionality, accuracy and stability.
The WebUI you recommended (AmuleWebUI-Reloaded), does it add any pluses apart form the visual appeareance? Couldn't find the link to download the whole package at once.

I wish I could have the time to learn how to build ipkg packages and build one for the 2.3.1. Amule seems to be stalled since 2011 :(

Regards.
 
That web-ui is a bit better, but you definitely need amuleGUI for anything serious.

Sorry I can't help you more with optware. I've only experimented with entware and its amule 2.3.1 package. :(
 
Got it!! Finally I got everything. I'm gonna test it some more time and add a guide for optware :D:D:D
 
I found that the custom webUI template doesn't always stick: sometimes it reverts to the default one. I changed the instructions in the first post accordingly: this way it does stick.
 
I found that the custom webUI template doesn't always stick: sometimes it reverts to the default one. I changed the instructions in the first post accordingly: this way it does stick.

Yeah, I found the same problem and gave it the same solution, replacing the default one.
 
Hello, thanks for this guide.
Everything is working as expected, but I have a question: How can I stop amule to start automatically after reboot? I'd like to start amule manually only when I need it.
 
Hello, thanks for this guide.
Everything is working as expected, but I have a question: How can I stop amule to start automatically after reboot? I'd like to start amule manually only when I need it.
I suggest that you don't delete/edit "S57amuled", because it not only starts aMule at boot, but also properly shuts it down on reboot.
You could instead put the following lines at the end of "/jffs/scripts/services-start":
Code:
sleep 60
/opt/etc/init.d/S57amuled stop
This way aMule will start at boot, but it will stop very soon. And you won't have to manually stop aMule when you reboot your router.
 
I suggest that you don't delete/edit "S57amuled", because it not only starts aMule at boot, but also properly shuts it down on reboot.
You could instead put the following lines at the end of "/jffs/scripts/services-start":
Code:
sleep 60
/opt/etc/init.d/S57amuled stop
This way aMule will start at boot, but it will stop very soon. And you won't have to manually stop aMule when you reboot your router.

...or to prevent aMule from even starting @boot.....in init-start

Code:
chmod   -x   /opt/etc/init.d/S57amuled

sleep 120

chmod   +x  /opt/etc/init.d/S57amuled

EDIT: Whoops :oops:...clearly this only works for scripts stored in /jffs or /tmp but I was attempting to show the technique used to selectively alter/delay the execution of a script that exists elsewhere.
 
Last edited:
Ah, the good old days of emule. I tried it a few years ago and even then it seemed dead. I can't imagine it being very alive today.
 
in init-start

Code:
chmod   -x   /opt/etc/init.d/S57amuled

sleep 120

chmod   +x  /opt/etc/init.d/S57amuled
Good idea. Probably the best solution.

Ah, the good old days of emule. I tried it a few years ago and even then it seemed dead. I can't imagine it being very alive today.
It's slow, indeed. But every now and then I use it for rare songs that I can't find with any torrent. It's slow, but you always find what you search.
 
Hello, I've tried the second solution to prevent aMule from starting, but after rebooting aMule is still running:
I've removed from services-start
Code:
sleep 60
/opt/etc/init.d/S57amuled stop

and after I've created /jffs/scripts/init-start and made it executable.
Here is my /jffs/scripts/init-start

Code:
#!/bin/sh

# Prevent aMule to start
chmod -x /opt/etc/init.d/S57amuled
sleep 120
chmod +x /opt/etc/init.d/S57amuled

After rebooting amule is still running.
 
Perhaps, your hard disk is not yet mounted, when init-start is executed.

Try this other route. Delete init-start. And edit services-start in the following way:
Code:
#!/bin/sh
...
chmod -x /opt/etc/init.d/S57amuled
/opt/etc/init.d/rc.unslung start
chmod +x /opt/etc/init.d/S57amuled
...
Of course the three dots stand for any other code you may have in that file.
 
Here is my services-start after the mods suggested:
Code:
#!/bin/sh
script="/opt/etc/init.d/rc.unslung"

i=60
until [ -x "${script}" ]
do
        i=$(($i-1))
        if [ "$i" -lt 1 ]
        then
                logger "Could not start Entware"
                exit
        fi
        sleep 1
done
${script} start

chmod -x /opt/etc/init.d/S57amuled
/opt/etc/init.d/rc.unslung start
chmod +x /opt/etc/init.d/S57amuled

I've inserted the new lines at the bottom, but probably I made something wrong.

Thanks
 
Yes, sorry, my services-start looks different. Probably because I'm on an older firmware.

This should work:
Code:
#!/bin/sh
script="/opt/etc/init.d/rc.unslung"

i=60
until [ -x "${script}" ]
do
        i=$(($i-1))
        if [ "$i" -lt 1 ]
        then
                logger "Could not start Entware"
                exit
        fi
        sleep 1
done
chmod -x /opt/etc/init.d/S57amuled
${script} start
chmod +x /opt/etc/init.d/S57amuled

If that doesn't work either, post the content of "/opt/etc/init.d/rc.unslung".
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top