qBittorrent-NOX (version 4.6.x+) -- Initial login Credentials <-> RC-SERVICE Issues [ISSUE]
The issue:
How to run & configure the first (launch/initial) instance of qBittorrent-nox using the (open-rc) service file?
There NO initial admin password printed anywhere in stdout
output . . .
General output:
root@dell-poweredge-t310--alpine-linux: qbittorrent-nox
< Legal Notice >
qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.
No further notices will be issued.
Press 'y' key to accept and continue...
y
WebUI will be started shortly after internal preparations. Please wait...
< Information >
To control qBittorrent, access the WebUI at: http://localhost:8080
The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: LuRx4dt4V
You should set your own password in program preferences.
. . . and using instance qbittorrent-nox --profile=/var/lib/qbittorrent/
or: qbittorrent-nox --configuration=/var/lib/qbittorrent/...
does not solve the issue after running service qbittorrent-nox start
The point:
The point is that it creates a randomly generated password for the first usage of the qBittorrent-nox instance. The default login name is always admin the password (for example: LuRx4dt4V) for admin is each time randomly generated (it is encrypted and cannot be changed inside the configuration file) unless you login and then change the password in the qbittorrent-nox Web UI settings for anyone you want.
systemctl start root@qbittorrent-nox
outputs the initially generated password in the stdout
inside terminal, but there is no such output for RC-SERVICES.
rc-service --verbose qbittorrent-nox start
will launch instance inside /var/lib/qbittorrent/
and one needs an output from those files and not from /var/lib/qbittorrent/qBittorrent/
caused by qbittorrent-nox —profile=/var/lib/qbittorrent/
Launching, on the other hand, /usr/bin/qbittorrent-nox
creates instance in /$USER/$HOME
directory so there we go . . .
Example of the know-how:
qbittorrent-nox —profile=/var/lib/qbittorrent
= \
/var/lib/qbittorrent/qBittorrent/cache/ \
/var/lib/qbittorrent/qBittorrent/conf/ \
/var/lib/qbittorrent/qBittorrent/local/
V.S.:
rc-service --verbose qbittorrent-nox start
= \
/var/lib/qbittorrent/.cache/ \
/var/lib/qbittorrent/.conf/ \
/var/lib/qbittorrent/.local/
Then go to: http://localhost:8080 and try it out . . .
Conclusion:
The qBittorrent program creates its own HOME directory structure by parsing the --profile="*"
argument to qbittorrent-nox
Proposal:
Changing the /etc/conf.d/qbittorrent-nox
file to:
# qbittorrent configuration options
# extra arguments to pass to qbittorrent
command_args="--profile=/var/lib/"
# user:group
command_user="qbittorrent:qbittorrent"
# qbittorrent roots itself in this directory,
# creating its config files/logs under it
umask=0022
# comment to use traditional service management
supervisor=supervise-daemon
/etc/init.d/qbittorrent-nox
to:
#!/sbin/openrc-run
name=qbittorrent-nox
description="qbittorrent torrent daemon"
command="/usr/bin/qbittorrent-nox"
command_background=true
: ${directory:=/var/lib/qBittorrent}
: ${command_user:=qbittorrent:qbittorrent}
: ${umask:=0022}
# raise file descriptor count (many open files..)
rc_ulimit="-n 50000"
depend() {
need net
after firewall
}
start_pre() {
checkpath -d -o $command_user "$directory"
}
More details discussed at:
Alpine Linux English