Systemd
Systemd service
Section titled “Systemd service”Location for the systemd service file:
/etc/systemd/system/qbittorrent.serviceModify the path to the binary and your local username.
[Unit]Description=qBittorrent-nox serviceWants=network-online.targetAfter=network-online.target nss-lookup.target
[Service]Type=execUser=qbtuserExecStart=/usr/local/bin/qbittorrent-noxRestart=on-failureSyslogIdentifier=qbittorrent-nox
[Install]WantedBy=multi-user.targetAfter any changes to the services reload using this command.
systemctl daemon-reloadNow you can enable the service
systemctl enable --now qbittorrent.serviceNow you can use these commands
systemctl stop qbittorrentsystemctl start qbittorrentsystemctl restart qbittorrentSystemd user service
Section titled “Systemd user service”You can also use a local systemd service.
~/.config/systemd/user/qbittorrent.serviceYou can use this configuration with no modification required.
[Unit]Description=qbittorrentWants=network-online.targetAfter=network-online.target nss-lookup.target
[Service]Type=execExecStart=%h/bin/qbittorrent-noxRestart=on-failureSyslogIdentifier=qbittorrent-nox
[Install]WantedBy=default.targetAfter any changes to the services reload using this command.
systemctl --user daemon-reloadNow you can enable the service
systemctl --user enable --now qbittorrentNow you can use these commands
systemctl --user stop qbittorrentsystemctl --user start qbittorrentsystemctl --user restart qbittorrent