Here it is a more generic version of the .service file, also with instructions on how to set-up:
1) In order to create the .service file you can use the following command from terminal:
Code: Select all
sudo nano /etc/systemd/system/qbittorrent.service
2) Once created, copy the following basic .service configuration and paste it inside the previously created file:
Code: Select all
[Unit]
Description=qbittorrent-nox
Documentation=man:qbittorrent-nox
DefaultDependencies=yes
After=network-online.target nss-lookup.target
Before=multi-user.target
[Service]
User=[i][b]insertyourusername[/b][/i]
Group=[b]insertyourusergroup[/b]
Type=simple
ExecStart=/usr/bin/qbittorrent-nox [-options]
Nice=10
StandardError=null
StandardOutput=null
TimeoutSec=360s
[Install]
WantedBy=multi-user.target
3) Before saving, please
modify the
user and
usergroup variables to fit your own needs. Also, r
emember to pass any options to the qbittorrent-nox deamon by appending them
at the end of the ExecStart line. ( for example, if you want to use a different port then add the
--webui-port=8082 at the end of the line. The complete line should then read:
ExecStart=/usr/bin/qbittorrent-nox --webui-port=8082).
4) Use the following command to update systemctl service and create symlinks:
Code: Select all
sudo systemctl enable qbittorrent.service
5) Finally run qbittorrent-nox using the following command:
Please note:
The example .service file provided by
morfikov is more complex since it uses various functions such as Requirements, IOScheduling and CPUShares. But if you are not acquainted with your hardware and/or with advanced features of .service I suggest using the basic configuration listed above.
(also, each hardware works differently so, for example, my settings on a LeMaker Banana Pro might not be optimal on a Raspberry Pi....)