WARNING: this guide is not about security, but about functionality, for example, never run applications as root. Be cautious.
sudo su
add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \
apt install -y qbittorrent qbittorrent-nox
cat > /etc/systemd/system/qbittorrent-nox.service << EOF
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
Type=forking
User=root
Group=root
UMask=000
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8212
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload && \
systemctl enable qbittorrent-nox && \
systemctl stop qbittorrent-nox && \
systemctl start qbittorrent-nox && \
systemctl status qbittorrent-nox
Using
- Web-UI URL: http://yourIP:8212/
- Username is "admin", password is "adminadmin".
- Source: https://www.linuxbabe.com/ubuntu/install-qbittorrent-ubuntu-18-04-desktop-server
sudo su
apt update && \
apt install -y apache2 && \
a2enmod proxy proxy_http headers proxy_wstunnel
DOMAIN=qbit.yourdomain.tld && \
rm -f /etc/apache2/sites-available/$DOMAIN.conf && \
cat > /etc/apache2/sites-available/$DOMAIN.conf << EOF
<VirtualHost *:80>
ServerName $DOMAIN
ErrorDocument 404 /404.html
#HTTP proxy
ProxyPass / http://localhost:8212/
ProxyPassReverse / http://localhost:8212/
#Websocket proxy
SSLProxyEngine on
<Location /:/websockets/notifications>
ProxyPass wss://localhost:8212/:/websockets/notifications
ProxyPassReverse wss://localhost:8212/:/websockets/notifications
</Location>
Header always unset X-Frame-Options
</VirtualHost>
EOF
DOMAIN=qbit.yourdomain.tld && \
a2ensite $DOMAIN.conf && \
systemctl restart apache2
sudo su
apt install -y certbot python3-certbot-apache
DOMAIN=qbit.yourdomain.tld && \
[email protected] && \
certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email $EMAIL -d $DOMAIN
systemctl restart apache2
Thank you for your comment, you are right, in our country they say "carve in stone". It's not safe but it's functional, if someone wants to run it long term surely safety needs to be addressed as well. Definitely if you want to address security and functionality at the same time I recommend Docker, one command and it's up and running. I will add a notification to this guide that security is not addressed here.