{"id":4708,"date":"2019-07-11T16:26:16","date_gmt":"2019-07-11T19:26:16","guid":{"rendered":"https:\/\/blog.clusterweb.com.br\/?p=4708"},"modified":"2019-07-11T16:26:44","modified_gmt":"2019-07-11T19:26:44","slug":"install-rtorrent-with-flood-on-ubuntu-server","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=4708","title":{"rendered":"Install rTorrent with Flood on Ubuntu server"},"content":{"rendered":"<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">There are multiple web interface for\u00a0<a class=\"aq cc im in io ip\" href=\"https:\/\/alternativeto.net\/software\/rtorrent\/\">rTorrent<\/a>\u00a0like the most known ruTorrent. But all these alternatives haven\u2019t a good UI. Here comes Flood, A modern web UI for\u00a0<a class=\"aq cc im in io ip\" href=\"https:\/\/alternativeto.net\/software\/rtorrent\/\">rTorrent<\/a>\u00a0with a Node.js backend and React frontend.<\/p>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">The project is still work-in-progress but it\u2019s already usable and features are added frequently.<\/p>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">You can find their Github here and more screenshots :\u00a0<a class=\"aq cc im in io ip\" href=\"https:\/\/github.com\/jfurrow\/flood\">https:\/\/github.com\/jfurrow\/flood<\/a><\/p>\n<p data-selectable-paragraph=\"\"><!--more--><\/p>\n<h2 class=\"iq ir eq bh bg fj is it iu iv iw ix iy iz ja jb jc\" data-selectable-paragraph=\"\">1. Install rTorrent<\/h2>\n<p class=\"hy hz eq bh ia b ib jd id je if jf ih jg ij jh il\" data-selectable-paragraph=\"\">The easiest way is to install it from the repo, run:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">apt-get install rtorrent -y<\/span><\/pre>\n<h2 class=\"iq ir eq bh bg fj is it iu iv iw ix iy iz ja jb jc\" data-selectable-paragraph=\"\">2. Configure rTorrent<\/h2>\n<p class=\"hy hz eq bh ia b ib jd id je if jf ih jg ij jh il\" data-selectable-paragraph=\"\">We need to create a dedicated user to avoid running rTorrent with root:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">adduser --disabled-password rtorrent<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Now we will create a configuration file :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">nano \/home\/rtorrent\/.rtorrent.rc<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">and copy the following:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\"># Where rTorrent saves the downloaded files\r\ndirectory = \/srv\/torrent\/downloads\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Where rTorrent saves the session\r\nsession = \/srv\/torrent\/.session\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Which ports rTorrent can use (Make sure to open them in your router)\r\nport_range = 50000-50000\r\nport_random = no\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Check the hash after the end of the download\r\ncheck_hash = yes\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Enable DHT (for torrents without trackers)\r\ndht = auto\r\ndht_port = 6881\r\npeer_exchange = yes\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Authorize UDP trackers\r\nuse_udp_trackers = yes\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># Enable encryption when possible\r\nencryption = allow_incoming,try_outgoing,enable_retry\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\"># SCGI port, used to communicate with Flood\r\nscgi_port = 127.0.0.1:5000\r\n<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">You can customize the downloads path<\/p>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">If you haven\u2019t created the folders (download and session), you need to do it :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">mkdir \/srv\/torrent<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">mkdir \/srv\/torrent\/downloads<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">mkdir \/srv\/torrent\/.session<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">And set the permissions<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">chmod 775 -R \/srv\/torrent<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">chown rtorrent:rtorrent -R \/srv\/torrent<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">chown rtorrent:rtorrent \/home\/rtorrent\/.rtorrent.rc<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Then we need to create a systemd startup service to launch rTorrent at boot<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">nano \/etc\/systemd\/system\/rtorrent.service<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">And add to the file :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">[Unit]\r\nDescription=rTorrent\r\nAfter=network.target\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">[Service]<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">User=rtorrent\r\nType=forking\r\nKillMode=none\r\nExecStart=\/usr\/bin\/screen -d -m -fa -S rtorrent \/usr\/bin\/rtorrent\r\nExecStop=\/usr\/bin\/killall -w -s 2 \/usr\/bin\/rtorrent\r\nWorkingDirectory=%h\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">[Install]<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">WantedBy=default.target<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Then enable it at boot and start it :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">systemctl enable rtorrent.service<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">systemctl start rtorrent<\/span><\/pre>\n<h2 class=\"iq ir eq bh bg fj is it iu iv iw ix iy iz ja jb jc\" data-selectable-paragraph=\"\">3. Install Flood<\/h2>\n<p class=\"hy hz eq bh ia b ib jd id je if jf ih jg ij jh il\" data-selectable-paragraph=\"\">You need first to install Node.js :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">curl -sL https:\/\/deb.nodesource.com\/setup_8.x | sudo -E bash -<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">sudo apt-get install -y nodejs<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">if you don\u2019t have Curl installed :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">apt-get install curl<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Then clone their repo:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">cd \/srv\/<mark class=\"me mf cz\">torrent<\/mark><\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">git clone https:\/\/github.com\/jfurrow\/flood.git<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">if you don\u2019t have Git installed :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">apt-get install git<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">We need copy template config file:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">cd flood<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">cp config.template.js config.js<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Then install Flood :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">npm install --production<\/span><\/pre>\n<h2 class=\"iq ir eq bh bg fj is it iu iv iw ix iy iz ja jb jc\" data-selectable-paragraph=\"\">4. Start Flood<\/h2>\n<p class=\"hy hz eq bh ia b ib jd id je if jf ih jg ij jh il\" data-selectable-paragraph=\"\">Before lauching flood we will create a systemD to lauch Flood at startup ( easier to start , stop )<\/p>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Create a dedicated user to run Flood:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">adduser --disabled-password flood<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Add permissions<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">chown -R flood:flood \/srv\/torrent\/flood\/<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Then create the script :<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">nano \/etc\/systemd\/system\/flood.service<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">and copy this:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">[Service]<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">WorkingDirectory=\/srv\/torrent\/flood\r\nExecStart=\/usr\/bin\/npm start\r\nRestart=always\r\nStandardOutput=syslog\r\nStandardError=syslog\r\nSyslogIdentifier=notell\r\nUser=flood\r\nGroup=flood\r\nEnvironment=NODE_ENV=production\r\n<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">[Install]<\/span><span class=\"iq ir eq bh jj b dg jn jo jp jq jr jl n jm\" data-selectable-paragraph=\"\">WantedBy=multi-user.target<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Enable it at boot and start it:<\/p>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">systemctl enable flood<\/span><\/pre>\n<h2 class=\"iq ir eq bh bg fj is it iu iv iw ix iy iz ja jb jc\" data-selectable-paragraph=\"\">5. Testing<\/h2>\n<pre class=\"hj hk hl hm hn fx do ji\"><span class=\"iq ir eq bh jj b dg jk jl n jm\" data-selectable-paragraph=\"\">systemctl start flood<\/span><\/pre>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">You should now can access it with\u00a0<a class=\"aq cc im in io ip\" href=\"http:\/\/yourip:3000\/\">http:\/\/YourIP:3000<\/a><br \/>\nFinally it will ask you to create a user\/password and you\u2019re ready to go.<\/p>\n<p class=\"hy hz eq bh ia b ib ic id ie if ig ih ii ij ik il\" data-selectable-paragraph=\"\">Congratulation ! Flood with rTorrent is installed \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are multiple web interface for\u00a0rTorrent\u00a0like the most known ruTorrent. But all these alternatives haven\u2019t a good UI. Here comes Flood, A modern web UI for\u00a0rTorrent\u00a0with a Node.js backend and React frontend. The project is still work-in-progress but it\u2019s already usable and features are added frequently. You can find their Github here and more screenshots [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[751,91,1,730,830,725,42,51,439,495,68,548],"tags":[1362,291,923,1361,759,273,983],"class_list":["post-4708","post","type-post","status-publish","format-standard","hentry","category-android","category-banco-de-dados","category-viazap","category-clusterweb","category-debian","category-hospedagem","category-leitura-recomendada","category-linux-linuxrs","category-midia","category-profissional-de-ti","category-redes-2","category-ubuntu-2","tag-flood","tag-install","tag-on","tag-rtorrent","tag-server","tag-ubuntu","tag-with"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4708"}],"version-history":[{"count":2,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4708\/revisions"}],"predecessor-version":[{"id":4710,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4708\/revisions\/4710"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}