{"id":2503,"date":"2021-04-29T18:16:56","date_gmt":"2021-04-30T02:16:56","guid":{"rendered":"http:\/\/wonghoi.humgar.com\/blog\/?p=2503"},"modified":"2021-04-30T15:49:02","modified_gmt":"2021-04-30T23:49:02","slug":"aria2-webui-notes","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2021\/04\/29\/aria2-webui-notes\/","title":{"rendered":"Aria2 WebUI Notes"},"content":{"rendered":"\n<p>Aria2 is a convenient command line downloader that works like curl\/wget on http\/ftp, but it also support many other protocols, and it <code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">aria2<\/code> natively multipart download!<\/p>\n\n\n\n<p>Instructions for Aria2 on Entware hosted by Lighttpd (defaults to Port 81): <a href=\"https:\/\/www.snbforums.com\/threads\/aria2-webui-on-asuswrt-merlin.63290\/\">https:\/\/www.snbforums.com\/threads\/aria2-webui-on-asuswrt-merlin.63290\/<\/a><\/p>\n\n\n\n<p>Instructions for Nginx on Entware (defaults to Port 82): <a href=\"https:\/\/hqt.ro\/nginx-web-server-with-php-support-through-entware\/\">https:\/\/hqt.ro\/nginx-web-server-with-php-support-through-entware\/<\/a><\/p>\n\n\n\n<p>Instructions for Aria2 on Entware: <a href=\"https:\/\/hqt.ro\/aria2-download-manager-through-entware\/\">https:\/\/hqt.ro\/aria2-download-manager-through-entware\/<\/a><\/p>\n\n\n\n<p>There are some minor details that changed. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Install the base (core) software first\n# This example is for entware\nopkg install aria2\n\n# Download the package from Github zip to \/opt\/tmp\nwget -c -O \/opt\/tmp\/webui-aria2.zip https:\/\/github.com\/ziahamza\/webui-aria2\/archive\/master.zip --no-check-certificate\n\n# Make sure you have some web server installed (nginx, httpd, apache, etc.)\n# Nginx HTTP server instructions\n# https:\/\/hqt.ro\/nginx-web-server-with-php-support-through-entware\/\n# Make sure you know what {Webroot} is\n# for Nginx, {Webroot} is \/opt\/share\/nginx\/html\n\n# Unpack to the zip file at \/opt\/tmp and clean up the zip\nunzip \/opt\/tmp\/webui-aria2.zip -d \/opt\/tmp\/ &amp;&amp; rm \/opt\/tmp\/webui-aria2.zip\n# Move\/rename to desired location\nmv \/opt\/tmp\/webui-aria2-master {Webroot}\/aria2<\/pre>\n\n\n\n<p>Nginx defaults to port 82 (change it to where you set your web server). The WebUI can be accessed at http:\/\/your_server_here:82\/aria2\/docs. <\/p>\n\n\n\n<p>\/doc is inconvenient, so I created a redirection by placing this index.html under aria2&#8217;s root folder:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;meta http-equiv=\"Refresh\" content=\"0; url='.\/docs'\" \/><\/pre>\n\n\n\n<p>The RPC host breaks out of the box because the you&#8217;ll need to make a few adjustments to <code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">\/opt\/etc\/aria2.conf<\/code> before you can start the service without crashing it (so the WebUI of course will complain with a lot of cryptic error messages):<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Basic Options\ndir={Change it to a viable folder that has enough space if \/opt\/var\/aria2\/downloads\n is is not big enough}\n\n# RPC Options\n# Unless you want to get a certificate, you'll need to use unsecure mode:\nrpc-secure=false\n# Change your rpc-secret to be matched in \"Connection Settings\" in the WebUI\nrpc-secret=whatever_passphrase_you_like<\/pre>\n\n\n\n<p>After you get the config file correct <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Start the installed aria2 service \n$ (the package already have a service wrap over aria2c)\n# aria2 seem to assume it's port 81 so the init.d script has a \"S81\" prefix, but aria2 does not control the port, where you put the WebUI in http. So it's just a cosmetic filename naming convention.\n\/opt\/etc\/init.d\/S81aria2 start<\/pre>\n\n\n\n<p>If the service wouldn&#8217;t start (some bad configs might have the service reported as &#8220;done&#8221; and after you check again in a second with &#8220;<code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">S81aria2 check<\/code>&#8220;, it&#8217;ll report as &#8220;dead&#8221;. You can debug by looking at what went wrong at <code>\/opt\/var\/log\/aria2.log<\/code>. That&#8217;s how I figured I need to turn off &#8220;<code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">rpc-secure<\/code>&#8221; parameter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"201\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34-1024x201.png\" alt=\"\" class=\"wp-image-2505\" srcset=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34-1024x201.png 1024w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34-300x59.png 300w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34-768x151.png 768w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34-1536x301.png 1536w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2021\/04\/image-34.png 1784w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_2503\" class=\"pvc_stats all  \" data-element-id=\"2503\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Aria2 is a convenient command line downloader that works like curl\/wget on http\/ftp, but it also support many other protocols, and it aria2 natively multipart download! Instructions for Aria2 on Entware hosted by Lighttpd (defaults to Port 81): https:\/\/www.snbforums.com\/threads\/aria2-webui-on-asuswrt-merlin.63290\/ Instructions &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2021\/04\/29\/aria2-webui-notes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2503\" class=\"pvc_stats all  \" data-element-id=\"2503\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[44,39,42],"tags":[],"class_list":["post-2503","post","type-post","status-publish","format-standard","hentry","category-hardware","category-linux","category-web-services"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/2503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=2503"}],"version-history":[{"count":4,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/2503\/revisions"}],"predecessor-version":[{"id":2508,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/2503\/revisions\/2508"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=2503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=2503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=2503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}