How to setup qBittorrent SMB share on TrueNAS CORE with Jails


Quite simple!

Navigate to Accounts → Groups and add the following groups.

GID850
Nameqbittorrent
Samba Authenticationunchecked

Navigate to Accounts → Users and add the following users.

Full NameqBittorrent
Usernameqbittorrent
User ID850
New Primary Groupunchecked
Primary Groupqbittorrent
Primary Groupqbittorrent
Disable PasswordYes
Shellnologin
Samba Authenticationunchecked

Navigate to Storage → Pools and add the datasets and permissions. We’ll use default 755 permissions for all datasets.

Path/mnt/vault0/apps/qbittorrent
Userqbittorrent
Apply Userchecked
Groupqbittorrent
Apply Groupchecked
Path/mnt/vault0/media/torrents
Userqbittorrent
Apply Userchecked
Groupqbittorrent
Apply Groupchecked

Connect to TrueNAS via SSH or similar.

# Create jail
iocage create --name qbittorrent --release 12.2-RELEASE dhcp=1 boot=1
# Mount jail config dataset
iocage exec qbittorrent mkdir /mnt/config
iocage fstab --add qbittorrent /mnt/vault0/apps/qbittorrent /mnt/config nullfs rw 0 0
# Mount media dataset
iocage exec qbittorrent mkdir /mnt/torrents
iocage fstab --add qbittorrent /mnt/vault0/media/torrents /mnt/torrents nullfs rw 0 0
# Update packages
iocage exec qbittorrent "pkg update && pkg upgrade"
# Install qBittorrent without GUI
iocage exec qbittorrent pkg install qbittorrent-nox
# Enable qBittorrent service
iocage exec qbittorrent sysrc qbittorrent_enable=YES
# Configure config directory
iocage exec qbittorrent sysrc qbittorrent_conf_dir=/mnt/config
# Start the service
iocage exec qbittorrent service qbittorrent start

Navigate to http://DHCP:8080 in your browser and login with the default credentials.

UsernamePassword
adminadminadmin

Navigate to qBittorrent menu and then Tools → Options… and change the Default Save Path to /mnt/torrents:

There we go!

From there, you’ll just have to create a SMB share using the created folder.

I just got the interesting part from here.

, , , , ,

Leave a Reply

%d bloggers like this: