A long time ago, I suggested rtorrent was something like an “rtorrent daemon.” That’s still true, of course — I don’t know of any torrent client that runs lighter and has the same range of controls as rtorrent.
I never really tried to set it up as a true daemon though, until I saw this thread on the Arch Linux forums, and its corresponding wiki page. It might not sound like it’s worth the effort, but it’s kind of nice to run the entire system in the background, unattended and preconfigured, and just drop torrents and run.
Mimicking the same concept in Crux was fairly easy; I needed to add a user called rtorrent, set up the proper subdirectories and then configure rtorrent’s rc file as I liked. The script shown in the thread and on the wiki needed scraped down a little bit, to where it’s really just a simple series of start and stop commands. (Oh, and the daemon needs either screen or dtach, depending on which you prefer.)
I don’t know if I’d go through the work of setting this up every time I wanted to install rtorrent, but I can see where this would be useful on a remote machine, or on a machine that sits by itself and does nothing but download. Oh wait, that was my original point, wasn’t it?
Btpd http://aur.archlinux.org/packages.php?ID=8049 is a decent client that includes a daemon.
Its more suitable for “lightweight” torrent users as its CLI only and not ncurses like rtorrent.
i was surprised to see that installation of rtorrent for ubuntu does not come with /etc/init.d/rtorrent by default!
i just got used to http://oleg.wl500g.info/ oleg’s custom firmware (wich is linux of course) for my router. when i installed rtorrent for the router i came with /etc/init.d/rtorrent and /etc/rtorrent.conf. all i had to do is create a new user “p2p” and configure directories and some settings to my likes.
so for my ubuntu i just mimicked the same behavior.
oh, and there’s special alias “rt” that sues to p2p user and screens -r the rtorrent session. and that’s the best part. but it come a bit annoying when you connect to remote rtorrent session being in screen yourself. always knocks me off my local screen when i wanted to detach remote one. ^a+a saves the day though.
Why don’t you use transmission-daemon? it has a nice web gui, and you can use it over ssh with transmission-client
I’ve been running rtorrent in a detatched screen session for ages now- but I often forget to quit rtorrent before powering off the PC. On the next restart, rtorrent forces a hash check that slows down all activity and locks up the PC.
Thanks to this guide, I’m one step closer to fire and forget. Thanks!
I just have rtorrent running in a screen session. Works great =)
Use this for running rtorrent as a daemon with Debian.
I put sourcecode tags on your script, in the hopes that WordPress.com doesn’t mangle the code. Cheers and thanks. š
A little more instruction for the beginners.
1. Go to the commandline
2. aptitude update
3. aptitude install tofrodos nano
4. Log in as root or use su and continue with 4. Alternative minus using the su in front of each command.
su [ Enter root password ]
4. Alternative using su
su nano /etc/init.d/rtorentdaemon
This will open the text editor nano if installed to create and edit this file /etc/init.d/rtorentdaemon
Place the contents from above into the file and edit these lines to match the user you plan to run rtorrent as.
user=āusernamerunningrtorrentā
config=ā/home/usernamerunningrtorrent/.rtorrent.rcā
base=ā/home/usernamerunningrtorrentā
An example of this file “config=ā/home/usernamerunningrtorrent/.rtorrent.rcā” can be retrieved here.
http://libtorrent.rakshasa.no/browser/trunk/rtorrent/doc/rtorrent.rc?rev=latest
Copy it from the website into a Linux editor and save. Don’t download directly since it was create with Windows it will bomb with lines break issues. You can use the dos2unix command to convert it if you download the file directly like this.
dos2unix /home/usernamerunningrtorrent/.rtorrent.rc
Is it possible to have a daemon script to start rtorrent for multiple users? I am planning to migrate my tflux-b4rt seedbox (shared with other 6 friends of mine) to rutorrent. It is a Debian box, and I would like to have rtorrent running on daemon mode, starting one session per user.