To install qBittorrent-nox on AWS EC2, we first need disk space. I used sc1 for disk space. The main purpose of using sc1 is to minimize the monthly cost. For example, 125 GB sc1 disk cost is 2$ per month.
First, let’s mount the disk.
sudo mount /dev/nvme1n1 /mnt/mydisk
Let’s check if the disk is mounted.
df -h /mnt/mydisk
To mount the partition permanently, you need to make an entry in the /etc/fstab
file. Follow these steps:
- Get the UUID of your partition by running:
sudo blkid /dev/nvme1n1
It will show output like this:
/dev/nvme1n1: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="ext4"
- Copy the UUID value.
- Open the
/etc/fstab
file with a text editor as root. Here, I'm usingnano
:
sudo nano /etc/fstab
- Add a new line at the end of the file using the following format:
UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /mnt/mydisk ext4 defaults 0 0
- Save and exit the file (in
nano
, pressCtrl + X
, thenY
, and thenEnter
). - Test if the
/etc/fstab
file is correctly configured by running:
sudo mount -a
If you don’t see any error messages, your partition will be mounted automatically when the system starts or reboots.
Step 2 — set permissions for new files and directories created in /mnt/mydisk
For Debian/Ubuntu based systems:
sudo apt-get update
sudo apt-get install acl
For RHEL/CentOS based systems:
sudo yum install acl
Now, set ACL to provide read, write, and execute permissions to all users by running:
sudo setfacl -Rm d:u::rwx,d:g::rwx,d:o::rwx /mnt/mydisk
sudo setfacl -Rm u::rwx,g::rwx,o::rwx /mnt/mydisk
This will ensure that all future files and directories created in /mnt/mydisk
will have read, write, and execute permissions enabled for all users.
Step 3 — Install qBittorrent-nox on Debian 11 server
sudo apt update
sudo apt install qbittorrent-nox
qBittorrent-nox (without X) is meant to be controlled via its Web UI which is accessible as a default at http://localhost:8080
. The Web UI access is secured and the default account username is admin
with adminadmin
as default password…
Systemd service
Create a systemd service file for qBittorrent-nox that restart it automatically on system reboot:
sudo nano /etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent-nox
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8080
Restart=on-failure
[Install]
WantedBy=multi-user.target
If there’s another service running on port 8080
, just change to another available port and set the -d --web-port=xxxx
accordingly.
Then run following commands to enable and start this service:
sudo systemctl daemon-reload
sudo systemctl enable qbittorrent-nox
sudo systemctl start qbittorrent-nox
Check its running status by;
sudo systemctl status qbittorrent-nox
That’s all. Successfully completed qBittorrent-nox installation on AWS EC2 with sc1 disk. If you have any questions or errors, feel free to comment and I will try to help as much as I can.