Auto Upload to OneDrive from Torrent

I use a VPS running Ubuntu 20.04 ARM64. I setup OneDrive Business using rclone. I mounted the onedrive to the folder.
The problem I am facing is when I try to download files from torrent (from qbittorrent nox which is hosted on the same server, and the download folder path is of the mounted folder, assuming it will directly get downloaded and uploaded there automatically), the status immediately turns errored.

I mounted the folder with VFS

rclone mount --daemon onedrive: ~/onedrive --vfs-cache-mode=writes 

PS: I can't change the permissions of the mounted folder. But when it was not mounted to rclone, I could. I haven't setup any systemd service for rclone yet. Just direct commands.

I am actually trying to achieve to be able to download torrent files and upload automatically to OneDrive. Directly through the torrent client.

ThankYou!

Rclone Version

rclone v1.53.3-DEV

- os/arch: linux/arm64

- go version: go1.18.1

Rclone config

[onedrive]
type = onedrive
client_id = xxxxxxxxxxxxxxxxx
client_secret = xxxxxxxxxxxxxxx
token = xxxxxxxxxxxxxxxxxx
drive_id = xxxxxxxxxxxx
drive_type = business
--------------------

welcome to the forum,

that version is ancient, so uninstall it and install the latest at
https://rclone.org/install/#script-installation

check out my howto guide, i think it does what you need.
uses torrent client, without the complexity of rclone mount

https://forum.rclone.org/t/how-to-move-a-downloaded-torrent-to-the-cloud/23493

Okay. I'll try that. But what if the file I am trying to download is itself more than the total storage allowance of my server? The method you suggested will download file locally and then upload it to the server. But there won't be any space to store a game zip file (just for example as they are very large in sizes) before it gets uploaded and will result in the storage error in the torrent client.

this is how it works.

  1. qbittorrent client downloads the entire torrent to local storage.
  2. rclone moves the local file to cloud

well, if you lack local free space, then qbittorrent cannot download the torrent.
sorry, rclone has no --magic solution for that ;wink

from the howto, notice that rclone move is executed only after torrent completion.
image

note: rclone mount works the same way, it is not a workaround.

Okay ThankYou. And If I add another drive to rclone alongside this, how can I specify the drive in the remote:/ command?

replace remote:/ with the name of your remote from your config file.

so, the command would be something like
rclone move "%F" "onedrive:%N"

fwiw, be careful about what you upload to onedrive, micro$osft scan your files for copyrights and whatnot.

rclone crypt. Well that's new for me. I have no idea about it. How its encryption and decryption works. And will I be able to stream directly from onedrive then? Like on Jellyfin as a private media server?

yes, for sure that will work.
tho onedrive has a lot of throttling, no idea what will work reliably, 480p, 720p, ...

  1. on the jellyfin server, do something like
    rclone mount onedrive: /path/to/mountpoint --allow-other
  2. when creating the jellyfin library, point jellyfin to that rclone mountpoint

I tried this but somehow it is not moving to my drive. I tried many times. Can't figure out why.

well, did you update rclone?

and sorry, hard to know, specific to your environment.
might try using a log file, something like --log-level=DEBUG --log-file=/fullpath/to/rclone.log

and nowadays, i use a really cheap seedbox, does not allow terminal, does not allow rclone.

for testing, remove rclone. just test qbittorrent on local filesystem only.
something like
mv "%F" "/fullpath/to/dest"

get that working and then try rclone and cloud

Yep. It worked locally. But no sign of work on my server. I tried moving it to another normal folder using rclone move on my server but it didn't move. I tried rclone moveto, but still no sign of work.

good, it worked locally.

try something like

  1. get fullpath to rclone using which rclone
  2. use that with qbit, something like
    /usr/bin/rclone move "%F" "/fullpath/to/dest/%N"

might need to use --config to hardcode the fullpath of the config file.

fwiw, some of the questions are not really about rclone.
what i shared, it works and has worked for others in the forum.
take some time, do more research and testing.

I actually tried running some local commands without rclone too from qbittorrent, but surprisingly they didn't work either. I called the bash shell in it but still didn't work.

/usr/bin/sh -c touch /home/ubuntu/"%N".txt

I guess there is problem with qbittorrent nox itself.

What do you recommend should I do?

try to learn basic linux command line syntax.

this exact command works for me

/usr/bin/sh -c "rclone move '%F' '/home/username/zork/%N'"

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.