Separate instance of deluge

deluge

#1

Does quickbox offer setting up a separate deluge daemon? Deluge doesn’t work well after loading up a fair bit of torrents.

I know I can createseedbox user and allocate a TB or two to that user but it feels messy if I do it that way!

Thanks


How To - Deluge Multiple Instances
#2

I am not entirely certain if you can run more than one instance of deluged per user. I know for a fact that you can only run one instance of deluge (gui) per user.

You could attempt to use screen to fire up separate instances but this will not have any control via the panel. Please replace daemon port with your port and username with your user. Note that this will require setup of the webui manually.

/usr/bin/screen -f -a -d -S deluged2 /usr/bin/deluged -d -p <daemon port> --config /home/<username>/.config/deluge2

However, if that command does happen to start up a separate instance of deluged then you can copy the deluged systemd script and rename it (something like deluged2.service, change exec start to the command above (or whatever command ends up working) then run systemctl start deluged2 and systemctl enable deluged2 to enable it on boot.


#3

“There is no screen to be detached matching deluged2.”

If there isn’t a simple way to do this, I might rely more on rTorrent instead!

Thanks. :slight_smile:


#4

I have multiple instances deluge on a managed box by Andy10gbit. So I know it is possible (outside of quickbox) given that Deluge > rtorrent for initial swarm but rtorrent > Deluge for permaseeding (only because deluge chokes on over 1000 torrents)

I figured, wait, why not have multiple deluge instances? the following is copied from feral then converted from html to markdown.

#I do NOT know how much can be carried over to quickbox but would love it if someone figure out how.

###Deluge - Running more than one instance

###How to run multiple instances of Deluge

These instructions are intended to be run over SSH. You may be able to modify them to work under another method, if you desire.

###Make a copy of the existing config:

Copy/Paste exactly as given

cp -r ~/.config/deluge ~/.config/deluge2

Clean up the config:

Copy/Paste exactly as given

# Delete the .pid file
find ~/.config/deluge2 -name deluged.pid -exec rm '{}' \;

# Delete the torrents already added
find ~/.config/deluge2/state -name \*torrent -exec rm '{}' \;

# Update the locations in the config
sed -i 's|/private/deluge/|/private/deluge2/|g' ~/.config/deluge2/core.conf*

Update the port in use:

Copy/Paste exactly as given

OLD_PORT=$(grep daemon_port ~/.config/deluge2/core.conf | awk '{print $2}' | cut -d\,  -f1)
NEW_PORT=$((RANDOM%10000+40000))
sed -i "s|${OLD_PORT}|${NEW_PORT}|g" ~/.config/deluge2/core.conf*

Retrieve important information:

Copy/Paste exactly as given

PASSWORD=$(cat ~/.config/deluge2/auth | grep $(whoami) | cut -d\:  -f2)
echo "Your deluge web interface connection information is as follows:"; echo "HOST=10.0.0.1"; echo "PORT=${NEW_PORT}"; echo "USERNAME=$(whoami)"; echo "PASSWORD=${PASSWORD}"; echo "###";

echo "Your deluge thin client connection information is as follows:"; echo "HOST=$(hostname -f)"; echo "PORT=${NEW_PORT}"; echo "USERNAME=$(whoami)"; echo "PASSWORD=${PASSWORD}";

Start new instance:

Ignore any of the following errors:

ERROR 14:26:39 torrentmanager:372 Unable to add torrent!

Copy/Paste exactly as given

deluged -c ~/.config/deluge2/

If, and only if, you get the error:

ERROR 15:04:01 rpcserver:375 Couldn't listen on any:52055: Errno 98 Address already in use. re-run the “Update the port in use” and “Retrieve important information” sections. You may safely run these commands as many times as needed.

Create the needed folders:

Copy/Paste exactly as given

mkdir -p ~/private/deluge2/{completed,data,torrents,watch}

To connect to your new instance:

To add to the web interface:

Load up your Deluge web interface

Connection Manager -> Add. Fill in the details with the details above for the web interface.

To add to the thin client:

Load up your Deluge thin client

Connection Manager -> Add. Fill in the details with the details above for the web interface.

Important caveats

  1. If you run the command ‘killall -9 deluged’, all instance of deluge will be killed and need to be restarted.

  2. If you want this instance of deluge to restart automatically if and when the server reboots, you can add a ‘crontab’ entry to do that:

    crontab -e

This will open up your crontab. At the bottom of the file, add the following:

@reboot /usr/local/bin/deluged -c ${HOME}/.config/deluge2

#5

A post was split to a new topic: How To - Deluge Multiple Instances