<h1id="how-to-run-the-unraid-mover-for-qbittorent-seeding-torrents">How to run the unRaid mover for qBittorent seeding torrents<aclass="headerlink"href="#how-to-run-the-unraid-mover-for-qbittorent-seeding-torrents"title="Permanent link"></a></h1>
<!-- BEGIN INCLUDE ../../../../includes/downloaders/basic-setup.md -->
<p>This basic example is based on the use of docker images</p>
<divclass="admonition tip">
<p>Keep in mind the path are setup so it works with hardlinks and instant moves.</p>
<p>More info <ahref="/Hardlinks/Hardlinks-and-Instant-Moves/"rel="noopener noreferrer"target="_blank">HERE</a></p>
</div>
<!-- BEGIN INCLUDE ../hardlinks/bad-path-suggestion.md -->
<divclass="admonition attention">
<p>The default path setup suggested by some docker developers that encourages people to use mounts like <code>/movies</code>, <code>/tv</code> and <code>/downloads</code> is very suboptimal and it makes them look like two or three file systems, even if they aren’t (<em>Because of how Docker’s volumes work</em>). It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move, resulting in a slower and more I/O intensive copy + delete is used.</p>
<p>When you make use of the unRaid cache drive for your <code>/data/torrents</code> share and the torrents in qBittorent are still seeding then the mover can't move files, because they are still in use.</p>
<p>Using the following instructions you will be able to move the files with the use of the qBittorrent API.</p>
<details class="summary">
<summary>Workflow Rules - [CLICK TO EXPAND]</summary>
<divclass="admonition summary">
<pclass="admonition-title">Workflow Rules - [CLICK TO EXPAND]</p>
<ol>
<li>Pause torrents older than last x days.</li>
<li>Run the mover.</li>
<li>Resume the torrents once the mover is completed.</li>
<p>If you're going to make use of this make sure you're using <code>Post-Import Category</code> in your Starr apps <supid="fnref:1"><aclass="footnote-ref"href="#fn:1">1</a></sup> Download clients settings, especially when you're using the Seed Time/Ratio settings in your Indexers settings in the Starr apps.</p>
<p>Else it could happen when the torrents get paused that they get removed by the Starr apps before the seeding goal is reached <imgalt="‼"class="twemoji"src="https://twemoji.maxcdn.com/v/latest/svg/203c.svg"title=":bangbang:"/></p>
<pclass="admonition-title">If you make use of the Seed Time/Ratio settings in your Indexers settings in the Starr apps<supid="fnref:1"><aclass="footnote-ref"href="#fn:1">1</a></sup>.<br> Make sure you're using <code>Post-Import Category</code> in your Starr apps Download clients settings.<br>Else it could happen when the torrents get paused that they get removed by the Starr apps before the seeding goal is reached.</p>
</div>
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<p>The screenshots are just examples to show you how it should look and where you need to place the data that you need to add, they aren't always a 100% reflection of the actual data and not always 100% up to date with the actual data you need to add.</p>
<ul>
<li>Always follow the data described in the guide.</li>
<li>If you got any questions or aren't sure just click the chat badge to join the Discord Channel where you can ask your questions directly.</li>
<p>With this option we're going to install the qBit API when the Array is started the first time.</p>
<p>Go to your unRaid Dashboard to your settings tab and select in the <code>User Utilities</code> at the bottom the new plugin you installed <code>User Scripts</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p>Select at the bottom <code>ADD NEW SCRIPT</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Add New Script"href="../images/Unraid-user-scripts-add-new-script-icon.png"><imgalt="Add New Script"src="../images/Unraid-user-scripts-add-new-script-icon.png"/></a></div></p>
</details>
<p>A popup will appear where you can give it a name, for this example we're going to use <code>Install qBittorrent API</code> and then click on <code>OK</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p>Click in the list on the cogwheel of the new user scrip you made.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Select user script"href="../images/Unraid-settings-user-scripts-list-select-qbit-api.png"><imgalt="Select user script"src="../images/Unraid-settings-user-scripts-list-select-qbit-api.png"/></a></div></p>
</details>
<p>Copy/Paste in the new windows that opens the following bash command followed by <code>SAVE CHANGES</code>.</p>
<p>Select in the schedule list when the script should run, and choose <code>At First Array Start Only</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Set Run Time"href="../images/Unraid-settings-user-scripts-qbit-api-schedule.png"><imgalt="Set Run Time"src="../images/Unraid-settings-user-scripts-qbit-api-schedule.png"/></a></div></p>
</details>
<p>Click on <code>RUN IN BACKGROUND</code> or restart your unRaid server so the qBit API is installed.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="RUN IN BACKGROUND"href="../images/Unraid-settings-user-scripts-qbit-api-run-background.png"><imgalt="RUN IN BACKGROUND"src="../images/Unraid-settings-user-scripts-qbit-api-run-background.png"/></a></div></p>
<p>With this option we're going to install the qBit API when the unRaid server is started.</p>
<p>On your USB stick/key go to <code>/boot/config</code> and open the <code>go</code> file with your favorite editor (<ahref="https://code.visualstudio.com/"rel="noopener noreferrer"target="_blank">VSCode</a>/<ahref="https://notepad-plus-plus.org/downloads/"rel="noopener noreferrer"target="_blank">Notepad++</a>) and copy/paste the following command.</p>
<li><code>qbt_user</code> => Your used qBittorrent <code>User Name</code> if you have authentication enabled.</li>
<li><code>qbt_pass</code> => Your used qBittorrent <code>Password</code> if you have authentication enabled.</li>
</ul>
<divclass="admonition failure">
<divclass="admonition attention">
<p>If you don't use the unRaid <code>Mover Tuning</code> app, You might need to change <strong>line 54</strong> from <code>os.system('/usr/local/sbin/mover.old start')</code> to <code>os.system('/usr/local/sbin/mover start')</code></p>
</div>
<h4id="copy-script-to-your-preferred-location">Copy script to your preferred location<aclass="headerlink"href="#copy-script-to-your-preferred-location"title="Permanent link"></a></h4>
<p>Now it's time to setup the scheduler when the mover should run.</p>
<p>Go to your unRaid Dashboard to your settings tab and select in the <code>User Utilities</code> at the bottom the new plugin you installed <code>User Scripts</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p>Select at the bottom <code>ADD NEW SCRIPT</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Add New Script"href="../images/Unraid-user-scripts-add-new-script-icon.png"><imgalt="Add New Script"src="../images/Unraid-user-scripts-add-new-script-icon.png"/></a></div></p>
</details>
<p>A popup will appear where you can give it a name, for this example we're going to use <code>qBittorrent Mover</code> and then click on <code>OK</code>.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p>Click in the list on the cogwheel of the new user scrip you made.</p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Select user script"href="../images/Unraid-settings-user-scripts-list-select-qbit-mover.png"><imgalt="Select user script"src="../images/Unraid-settings-user-scripts-list-select-qbit-mover.png"/></a></div></p>
</details>
<p>Copy/Paste in the new windows that opens the following bash command followed by <code>SAVE CHANGES</code>.</p>
<p>Select in the schedule list when the script should run, and choose <code>Custom</code></p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Set Run Time"href="../images/Unraid-settings-user-scripts-qbit-mover-schedule.png"><imgalt="Set Run Time"src="../images/Unraid-settings-user-scripts-qbit-mover-schedule.png"/></a></div></p>
</details>
<p>After changing to <code>Custom</code> you get on the right a extra option where you can setup your cron schedule when it should be run.</p>
<p>For this example we're going to let the script run a 4am at night. <code>0 4 * * *</code></p>
<p>Setup your own schedule <ahref="https://crontab.guru/">HERE</a></p>
<detailsclass="check">
<summary>Screenshot Example - [CLICK TO EXPAND]</summary>
<p><divclass="lightgallery"><adata-sub-html="Set Run Time"href="../images/Unraid-settings-user-scripts-qbit-mover-cron.png"><imgalt="Set Run Time"src="../images/Unraid-settings-user-scripts-qbit-mover-cron.png"/></a></div></p>
</details>
<!-- BEGIN INCLUDE ../../../../includes/support.md -->
<hr/>
<divclass="admonition help">
<pclass="admonition-title">Questions or Suggestions?</p>
<p>If you have questions or suggestions click the chat badge to join the Discord Support Channel where you can ask your questions directly and get live support.</p>