UNOFFICIAL GUIDE

Seedbox
to MEGA

Download a big torrent on Seedhost and copy it to MEGA automatically. Every command is here, ready to copy and paste.

Renato G.  |  Discord: @renato041321
Download the PDF guide

READ THIS FIRST

  • This guide is unofficial. It is a separate, community-made guide. It was not written, reviewed, endorsed or supported by Sir Dominic Scott, and he has no responsibility for it. Please do not ask him for help with this guide.
  • I am not responsible for your costs. Seedhost and MEGA are paid services. Any charge, renewal, lost file or account problem is your own responsibility. Check prices and plans yourself before paying.
  • Seedhost can be cancelled afterwards. You only need the seedbox while the torrent downloads and uploads to MEGA.
  • MEGA cannot be cancelled if you want to keep the files. If the paid plan ends, the account goes over its storage limit and MEGA can eventually remove your data.
  • This is simply how I did it. It worked for me; it may need changes for you.

1Get a Seedhost seedbox

  • Go to seedhost.eu, pick a seedbox plan with more disk space than the torrent (mine was about 1.5 TB), and pay.
  • Seedhost emails you a server name (example: mud.seedhost.eu), a username and a password. Keep them.
  • qBittorrent opens in your browser at https://SERVER.seedhost.eu/USERNAME/qbittorrent/. If it is not there, install it from the Seedhost client area.

2Get a MEGA plan

  • Create an account at mega.io and upgrade it to a plan bigger than the torrent. I used MEGA Pro I, which showed 3 TB on my account.
  • If you use two-factor login (2FA) on MEGA, the connection in Step 7 may ask for a code or fail.

3Add the torrent

Open qBittorrent in your browser and add the torrent file or magnet link. On my seedbox the files were saved in the downloads folder.

4Turn on the .!qB extension (important)

In qBittorrent: Tools > Options > Downloads, tick "Append .!qB extension to incomplete files", then click Save.

Every unfinished file now ends in .!qB. qBittorrent removes it only when the file is 100% done. This is how the script knows what is safe to upload. It also works if the download has already started.

5Connect to the seedbox

Open your terminal (Terminal on Mac, PowerShell on Windows). Replace USERNAME and SERVER with your own before pressing Enter:

ssh USERNAME@SERVER.seedhost.eu

Type yes if it asks to trust the server, then your Seedhost password. Nothing shows on screen while you type the password. That is normal. All the next commands are typed here.

6Install rclone (the app that talks to MEGA)

First check if it is already installed:

rclone version

If it prints a version, go to Step 7. If it says "command not found", paste this:

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip -o rclone-current-linux-amd64.zip
mkdir -p ~/bin
cp rclone-*-linux-amd64/rclone ~/bin/
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

7Connect rclone to your MEGA account

rclone config

Answer the questions like this:

  • Type n (new remote).
  • Name: mega
  • Storage: type mega
  • User: your MEGA email.
  • Password: type y, then your MEGA password twice.
  • Advanced config: n. Confirm with y. Quit with q.

Test it. It must show your MEGA total and free space:

rclone about mega:

8Find your folder name and do a safety check

ls ~/downloads

This shows the torrent folder name. Mine was The Vault+. If yours is different, replace it in every command below.

find ~/downloads/'The Vault+' -name '*.!qB' | wc -l

While the torrent is still downloading, this number must be bigger than 0. If it is 0, go back to Step 4. Do not continue.

9Create the script

Copy and paste the whole block at once:

cat > ~/mega-sync.sh <<'EOF'
#!/usr/bin/env bash
# mega-sync.sh - copies finished torrent files from a seedbox to MEGA
# Author: Renato G. (Discord: @renato041321)
# Unofficial community script. Use at your own risk.

export PATH="$HOME/bin:$PATH"
SRC="$HOME/downloads/The Vault+"
DEST="mega:The Vault+"

exec 9>"$HOME/.mega-sync.lock"
flock -n 9 || exit 0   # already running

rclone copy "$SRC" "$DEST" \
  --exclude "*.!qB" --exclude "*.parts" --exclude ".unwanted/**" \
  --transfers 4 --retries 5 --low-level-retries 20 \
  --stats 1m --stats-one-line \
  --log-file "$HOME/mega-sync.log" --log-level INFO
EOF
chmod +x ~/mega-sync.sh

The script only copies. It never deletes anything from the seedbox, so the torrent keeps seeding.

10Run it every 30 minutes

(crontab -l 2>/dev/null; echo '*/30 * * * * $HOME/mega-sync.sh') | crontab -

Optional: start the first upload right now instead of waiting:

nohup ~/mega-sync.sh >/dev/null 2>&1 &

Done. You can close the terminal and turn off your computer. Everything runs on the seedbox.

11Check that it is working

tail -n 20 ~/mega-sync.log
  • "Copied (new)" means a file was uploaded.
  • "There was nothing to transfer" is not an error. It means every finished file is already on MEGA.
  • A file at 97% is still unfinished, so it waits. Torrents download many files at once, so most files finish near the end.
  • Optional: in qBittorrent, right-click the torrent and tick "Download in sequential order". Files then finish one by one and reach MEGA sooner. The download may be a little slower.

12When the torrent reaches 100%

Wait for the next run (up to 30 minutes), then compare the seedbox with MEGA:

rclone check ~/downloads/'The Vault+' mega:'The Vault+' --size-only --one-way

If it reports 0 differences, everything is on MEGA. Then turn off the schedule:

crontab -l | grep -v mega-sync.sh | crontab -

After that you can cancel Seedhost if you no longer want to seed. Keep your MEGA plan for as long as you want to keep the files.