Qbittorrent and OpenWrt

I want to tell about my experience using qbittorrent with OpenWRT. I install qbittorrent from this repository. But after installing qbittorrent you need adjust it.

Fist you need create new user and user group:

In file: /etc/passwd add string : qbittorrent:x:227:227:qbittorrent:/home/qbittorrent:/bin/false

In file: /etc/group add string : qbittorrent:x:227:qbittorrent

In file: /etc/shadow add string : qbittorrent:x:0:0:99999:7:::

After that you need create home dir for user qbittorrent:

mkdir /home
mkdir /home/qbittorrent
chown qbittorrent:qbittorrent /home/qbittorrent

And then you need put this script to directory /etc/init.d

#! /bin/sh /etc/rc.common
USE_PROCD=1

START=98
STOP=01

DAEMON="/usr/bin/qbittorrent-nox"
USER="qbittorrent"
GROUP="qbittorrent"

start_service() {
	procd_open_instance
	procd_set_param command "$DAEMON"
	procd_set_param user $USER
	procd_set_param group $GROUP
	procd_set_param env HOME=/home/qbittorrent
	procd_close_instance
}

Allow execution:
chmod 755 /etc/init.d/qbittorrent

After run qBittorrent will appear on 8080 port. login:admin password:adminadmin.

2 Likes

Hi I have create fork on Github with Qbittorren make file and its dependencies. Now not need adjusted Qbittorren after install Openwrt because user, homedir, and init file creatinig automatically.

3 Likes

add string, already have this one: qbittorrent:x:227:227:qbittorrent:/var/run/qbittorrent:/bin/false
?
thanks