Windows.  Viruses.  Notebooks.  Internet.  office.  Utilities.  Drivers

On the BitTorrent server, the Deluge client and manage it through the web interface (WebUI). Unfortunately WebUI does not support all Deluge features. Especially in terms of plugins, most of which cannot be configured through the WebUI. Fortunately, Deluge's graphical (GTK UI) interface allows you to connect to and manage a remote server client with the same ease as a local client.
We have: Remote server (in local network) running Debian 7 and installed on it deluge demon paired with WebUI, as well as a home computer under Linux control Mint 14 (Ubuntu 12.10). We will omit the process of installing the server part, since it is described in detail in the article dedicated to Deluge. We proceed to the settings and installation of the client part on a home PC.
It is worth noting that the presence of WebUI on the server is not necessary, but it will not be superfluous if you plan to connect to Deluge not only from home. In this regard, you can start the settings in three ways, after installing GTK UI on your local computer:
aptitude install deluge deluge-gtk
After we start the daemon on the server and set the login and password for remote access. The command must be executed on behalf of the user under which the Deluge Daemon is running.
echo "username:password:level" >> ~/.config/deluge/auth
Where "username" is the user, "password" is the password, and "levil" is the access level. User and password can be arbitrary. It is not necessary that they match the username under which the daemon is running. The daemon must be running.
Access levels:

  • 1 - read only.
  • 5 - user.
  • 10 - Administrator.
1. The first method implies the presence of WebUI on the server. In the settings you need to enable remote access to the daemon to give us the ability to connect to Deluge remotely.

2. In the second way, we use the Deluge Console. To do this, it must be installed on the server.
aptitude install deluge-console
Launching the console
deluge-console
In it we command:
config -s allow_remote True config allow_remote
Exiting the console:
exit
All actions with the console must also be performed on behalf of the user under which Deluge is running.
Restart the daemon:
/etc/init.d/deluge-daemon restart
3. In the third method, we use an SSH tunnel from the home computer to the server. In this case, it is not necessary to enable remote access on the server side. Open a local terminal and write the following:
ssh -fNL 127.0.0.2:58846:localhost:58846 server
Where "server" is the ip address of our server. We are using 127.0.0.2 instead of localhost so the client knows we are connecting to a remote daemon. If you get the error "bind: Can" t assign requested address ", then execute the following command (add an alias to the local loop):
sudo ifconfig lo0 add 127.0.0.2
Then we repeat previous command.
Next, run GTK UI on local computer and in the interface settings, uncheck the box next to Classic Mode, and then restart the UI. Now when starting GTK UI we see the Connection Manager popup. We remove the local daemon from the list and prescribe the address of the remote one. Depending on the method chosen earlier, in the Hostname field we write either the ip of our server where Deluge is located, or, in the case of an ssh tunnel, 127.0.0.2. We do not touch the port if we did not change the daemon port during the server configuration. Username and password - specify the data that we set in the ~/.config/deluge/auth file.


That's all. If everything is done correctly, then we can safely connect to the daemon through the local GTK UI, in which everything that we could not use through the WebUI will be available to us.
The screenshot shows two connections. The first is remote, requiring the previously enabled option to allow remote access to the daemon. The second is a connection using an ssh tunnel. Green checkmarks mean connections are available.


Important! Versions of the server and client parts of the programs must be of the same line. For example, on my server the version of the program is 1.3.3, on home computer- 1.3.5. This is fine. If version 1.2.X is raised on the server, and 1.3.X on the PC (or vice versa), then even if the design works (which is unlikely), problems are inevitable.

In the last few years, file sharing on the Web has confidently shifted towards peer-to-peer networks, and in particular, torrent exchangers. For most users, it is no longer a secret that you can download almost anything from trackers like torrents.ru or tfile.ru - from the latest in the film and audio industry to the latest releases software. Leaving aside the legal aspect of the exchange of certain types of products, I note that most of the existing Linux distributions start distributing their new versions from torrent networks. And if so, then the sacred duty of every self-respecting Linux user is to master this, no doubt, very convenient way file sharing (you can read more about torrent networks, for example, on Wikipedia - http://ru.wikipedia.org/wiki/BitTorrent).

Let's start our acquaintance with the Deluge torrent client supplied directly with the Runtu distribution. This very interesting project has been developing very actively lately and constantly pleases users with new "chips".

We start Deluge. (Programs-Internet-Client of the BitTorrent Deluge protocol)
The setup wizard starts on the first run and prompts us to customize the client to our liking. It should be noted that many additional functions are enabled by activating the corresponding plugins. But this is a little later. In the meantime, click the "next" button and configure the ports for incoming connections. It's best to leave it as it is, but some ISPs force certain port ranges to be blocked. In this case, you need to specify a different range between 49152 and 65535. You can also enable the "use random ports" option, but it's better not to do this, because. in this case, we will not be able to "keep a finger on the pulse" of the file sharing process, which is certainly a very important aspect of system security.

So let's move on to the next point.
To automate the process, it is convenient to configure the client so that all downloaded torrents are saved to a specific directory. I have dedicated a separate HDD with the mount point /home/%username%/torrents.
The disk was formatted by me in the RaiserFS file system for a very obvious reason - less load on the hard disk. However, this is a matter of personal preference. If you're going to download a lot of small files, then it's more convenient to use Ext2-3... But that's a topic for another discussion and a reason for more than one holivar between fans of certain file systems. Let's skip this part and just set up the directory. We strongly recommend creating a /home/%username%/torrents/1gotovo subdirectory so that our client will later transfer all completed downloads to this subdirectory, reducing the time you spend on parsing the contents of the hard drive.
Naturally, you can assign your own names to the directories. Just in the future I will consider exactly the above configuration.
So, set up the directory and click the "next" button.

In no case should you rush on this page of settings, because the speed of distribution of your torrents depends on it, which, in turn, directly affects your ratio on trackers. We select the speed of our outgoing connection. This value must be specified in the connection settings for your Internet connection tariff. In my case it is 1 megabit per second. For such an outgoing connection speed, I empirically established the optimal value of the following parameters:
- maximum connections - 600
- maximum upload speed -1 (no limits)
- maximum number of return channels - 30
- Maximum active torrents - 20
- Maximum half-open connections - 40
The last point can be bewildering, since it is twice the number of downloads. But this is only at first glance. In my case, a computer with a torrent client works around the clock in automatic mode, and as a result, periodically there is a situation when one or several half-open connections "hang". This is not a particular problem in the case of Linux, since the lifetime of such connections is short, but the download speed drops in this case. And if so, it is better to foresee the "reserve" in advance. the main thing is not to overdo it, because if you make this value too high, then the system will become an easy prey for DDoS attacks.
Set up, click "Next" and see last page setup wizard.

There is only one point with a request to help in the development of the client. Nothing criminal will be sent, and therefore I personally do not see anything special in leaving the "daw" enabled. But - this is a personal choice of each user. We make a choice, press the "Apply" button and enjoy the view of a running and minimally configured client.
Now is the time to customize it to your personal needs.
Immediately open the list of available modules. (Edit-
Briefly about each module present in my Deluge build. Surely this list will be the same in your case:

Blocklist Importer. As the name implies, the module allows you to block lists of IP addresses. I don't turn it on unless absolutely necessary.
- Desired Ratio. Allows you to set the desired ratio for each torrent. What is it for? - you ask - I will answer: everything is extremely simple. With this module, you don't have to worry too much about your own total ratio on the torrent tracker. It is enough to specify a coefficient of 2-5 for this module (depending on the demand for distribution) and forget about it for a while.
- event logging. Event log support module. A useful thing if you have to work in a not very secure network. In other cases - by and large meaningless.
- Flex RSS. Rocking RSS for Deluge. Why is she here? ;) There are more elegant and efficient solutions :)
- Move torrent. Allows you to move completed downloads to the selected directory. We indicate in the "Parameters" the 1gotovo directory created in advance and continue our acquaintance.
- Network Activity Graph. Enables the display of a graph of network activity. In my opinion, the component is optional. Especially in the case when the client works with minimal user interaction - we are striving for this, right?
- Network Health Monitor. Another visual component. If you want "life" on the screen - you can turn it on. In general, it's optional.
- Scheduler. Scheduler. That says it all. Allows you to configure the bandwidth of the channel available to the client depending on the day of the week and time of day. The most convenient thing in cases where, in addition to the torrent client, there are other applications that need Internet access.
- Speed ​​limiter. Speed ​​limiter for each individual torrent. At first glance, the advantages of its presence are not obvious. However, sometimes it turns out to be necessary to download one torrent in the shortest possible time. Disabling the rest of the downloads does not make sense, because one torrent will still not master the entire width of the channel, but lowering the limit for the rest of the torrents is a completely reasonable decision. And the wolves are full and the sheep are safe.
- Torrent Creator. Module for creating torrents. that is, their own distributions. Needed - turn on. Not needed - do not include.
- Torrent Files. An extremely useful module. Allows you to work with files inside the torrent. Assign priorities to each file as well - allows you to allow and cancel downloads individual files torrent.
- Torrent notification. Reminder for the system tray. Aspiring to automate the process is not needed.
- Torrent peers. Module to display all peers for each torrent. The information is quite extensive, but - again - we are striving to reduce our presence in the work of the client. Verdict - the module is not needed.
- Torrent Search. Torrent search engine. My personal opinion - a thing is absolutely meaningless in our realities. Google is faster and more correct.
- Webseed. Allows you to add webcasts to torrents. Who needs it - turn it on. In general, it's useless.
- Web User Interface. Module for managing downloads via a web interface. On this moment Deluge's web interface is pretty basic and not replete additional features. However, it's a pretty good way. remote control client. And given the speed of the project development, we can assume that soon the web interface will become even more convenient and informative.

At the very least, we figured out the modules. We proceed to the final configuration of the client.
Open the program settings dialog -> "Downloads" tab.
Dowload Location - By default, this option is set to "Ask *** each download". This option does not suit us - after all, every time climbing file system, specifying the save path, no one wants. Switch to "save all downloads in:" and specify our "torrents" directory as the save path
Below is an item that should also be set up. Namely - save all torrent files in a specific directory. The fact is that by default the client saves these files in its working directory. And this is not very convenient. It is easier and more efficient to create a separate directory for these files and reconfigure this setting with a new save path. This will allow us to control current downloads and, if necessary, delete unnecessary ones.

The Autoload item is also quite interesting. it allows you to automatically launch torrent files located in a specific directory. Why might this be needed? Well, in my case, for example, it is very convenient to remotely save torrent files to this directory from another computer and no longer worry about their future fate. The client itself will pick up a new download, save it itself and, after completion, move it to a shared directory (remember the MoveTorrent module), from which I (again, remotely) can pick up the files I need.

The next step is to configure the behavior of the program directly in relation to downloads. Here we can specify the maximum simultaneous number of them, increase the priority of downloading the first and last parts, configure the type of disk space reservation (full or compact - in the first case, a volume sufficient to accommodate the entire torrent is reserved, in the second - only for the currently downloading it parts), as well as - set the "default" start of downloading the torrent in the "pause" mode. The last point will be of interest to those users who prefer to first "throw" a bunch of downloads to the client, and only then - to figure out which one is more important at the moment and which one should be launched first, and which one should be left off for now.

Go to the "Network" tab. Here we can change the parameters of the working ports of the program (however, we have already done this with the help of the wizard), enable / disable DHT (a hash table that allows you to significantly increase the number of peers), UPnP (I personally do not need it, and therefore it remains off), display of NAT ports (it is better to turn it on - there will be no big harm, and the connection speed with peers will grow), peer exchange (if anyone does not know, this is such an interesting feature of peer exchange bypassing the server. ATTENTION! if you use local trackers, traffic from which is not is taken into account, DISABLE this function so as not to get into traffic!) and search for local peers (that is, peers that are on the same subnet as your computer). Pay special attention to the terms of use of specific trackers - some of them strongly recommend not to use DHT and peer exchange to prevent your passkey from being "hijacked". I strongly advise you to listen to their recommendations ...
Next comes the "Encryption" section. Enable both "Incoming" and "Outgoing". There is nothing for our valiant management "K" to delve into your traffic. ;) And, of course, we set up encryption of the entire stream at any level.

Let's move on to setting up distributions. Enable the first option "Move torrents down the queue at the beginning of the distribution." So we can visually separate distributions and active downloads at any time. It is also worth enabling the second option "Add new torrents above completed ones". To avoid confusion when adding new torrents.
The following four points are needed only for those who do not intend to actively increase their own ratio, or for those who strive for absolute automation of the process.
The third and fourth points respectively set up the stop and automatic deletion torrents after they reach the assigned ratio value (the ratio of traffic sent to received). The fifth and sixth ones do the same, but according to the distribution time (the time is indicated in hours). That is, you can set up your distributions in such a way that after they reach a ratio above 2 or the distribution time is more than 72 hours, the torrents will automatically stop and be deleted. Please note that the FILES you download will remain on your hard drive! Only torrent files are deleted.
Go to section " throughput". Actually, everything should suit us here, since we used the setup wizard. If not, we set it up (see above). In no case, without special need, do not limit the use of the channel to the torrent. Let the value remain -1. Avoid many underwater stones in the process.

The "proxy servers" section is needed for those who use proxies. If you use - you do not need my help in setting up. If you don't use it, it's better to just switch to the next section.

"Other". Actually, here we may be interested only in the item "Icon in the system tray" and the option to notify about the release of new versions. The rest I personally find useless for use on a personal computer. However, this is a matter of individual preference. You can use the system tray icon password protection feature or use the advanced boot progress indicator - whatever you like...
Actually, everything. If desired, you can also change the display of columns in the program window, as well as their relative position. You can turn off the toolbar or the extended torrent information panel. but these are the little things that do not affect the operation of the program at all. Use her to your heart's content.

All subsequent steps are described using Fedora as an example, but can be adapted to any other distribution.

Installation

Installation is the easiest thing ever.

$ sudo dnf install deluge-daemon deluge-console

We put the console client, as well as the cli for it.

While all. The client is ready to go. You can already turn it on and use it.

$ sudo systemctl enable deluge-daemon $ sudo systemctl start deluge-daemon

But there are many problems with this configuration:

  • no logs
  • incorrect server port allocation

Do you need it? 🙂

Logs

Once installed, the daemon is ready to run. But the configuration that the distribution vendors offer is not entirely successful. There is no logging of what is happening in it.

To do this, we need to install logrotate.

$ sudo dnf install logrotate

Configure it to support the new rotation rules. To do this, let's create a file /etc/logrotate.d/deluge about the following content

/var/log/deluge/*.log ( rotate 4 weekly missingok notifempty compress delaycompress sharedscripts postrotate initctl restart deluged >/dev/null 2>&1 || true initctl restart deluge-web >/dev/null 2>&1 || true endscript)

As well as a folder for storing logs. And give her the right permissions.

$ sudo mkdir /var/log/deluge/ $ sudo chown deluge:deluge /var/log/deluge

Now it remains to enable logging support for the daemon.

Create a new daemon description for systemd in /etc/systemd/system/deluged.service

Description=Deluge Bittorrent Client Daemon After=network.target Type=simple User=deluge Group=deluge UMask=007 ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning Restart= always TimeoutStopSec=300 WantedBy=multi-user.target

Great. It remains to configure iptables and deluge itself.

Setting up iptables

In some cases, it is enough just to open the necessary ports

$ sudo iptables -A INPUT -p tcp --dport 56881:56889 -j ACCEPT $ sudo iptables -A INPUT -p udp --dport 56881:56889 -j ACCEPT

But in some configurations, there may be problems with the conntrack mechanism, which marks a number of packets as invalid (this is especially true for dht traffic).

Therefore, it is worth disabling conntrack for all deluge connections.

$ sudo iptables -t raw -I PREROUTING -p udp --dport 56881:57200 -j NOTRACK $ sudo iptables -t raw -I OUTPUT -p udp --sport 56881:57200 -j NOTRACK $ sudo iptables -t raw -I PREROUTING -p tcp --dport 56881:57200 -j NOTRACK $ sudo iptables -t raw -I OUTPUT -p tcp --sport 56881:57200 -j NOTRACK $ sudo iptables -I INPUT -p icmp --icmp-type 3 - j ACCEPT $ sudo iptables -I INPUT -p icmp --icmp-type 4 -j ACCEPT $ sudo iptables -I INPUT -p icmp --icmp-type 11 -j ACCEPT $ sudo iptables -I INPUT -p icmp --icmp -type 12 -j ACCEPT

$ sudo /usr/libexec/iptables/iptables.init save

Local Authorization

In order for us to successfully use deluge-console, local authorization must be enabled for our user.

Those. there should be a ~/.config/deluge/auth file containing a login-password string

Localclient:here_long_hash:10

You can copy this file from the /var/lib/deluge/.config/deluge directory

$ sudo cat /var/lib/deluge/.config/deluge/auth >> ~/.config/deluge/auth

Starting and configuring the daemon

$ sudo systemctl enable deluged $ sudo systemctl start deluged

Thus, we launched the daemon, the config of which was described earlier.

I upgraded to 12.04 and Flood broke. I want to remove it and then add it again. How to uninstall Deluge?

  1. Tried: Search in Ubuntu Software Center
    Error: Button reads "Install" (but it's already installed!)
  2. Tried: sudo apt-get remove --purge deluge
    Failed: Output read Removing deluge... but I can still find it when I search for my dash

If sudo apt-get remove --purge deluge succeeded, then the deluge package was successfully removed.

If menu items still appear in dashes, it doesn't necessarily mean the program is still installed, just links to it remain somewhere. It's possible that the dash keeps its own cache of what's in your menu and it takes some time to realize a change has been made.

Feel free to go ahead and reinstall flood to see if it works.

For future reference, you should look for dotfiles in ~/ or ~/config which are specific to Deluge. This is the most likely place to store data for your account. Try clearing or renaming it. This may fix your original problem (rather than re-installing it).

Have you tried complete removal using the synaptic package manager?

Install synaptic synaptic sudo apt-get install synaptic

I had the same problem removing the flood. I figured out that I had the GTK version installed, so just uninstalling deluge didn't work. I used sudo apt-get remove --purge deluge-gtk

According to the OP using sudo apt-get remove --purge deluge is the correct way

If you installed from source or need to find the remaining Deluge files, the Deluge Widget Guide has information: RemovingFromSystem

The most likely reason it's still showing up in Dash is due to a leftover deluge.desktop file.

You can use locate deluge which will quickly list each file/folder named flood, and you will be able to determine if the app has actually been removed.

If you installed Deluge from source code, you will have to manually delete the files. The main folder of the flood application is usually installed in the folder site python or in a folder dist packages, which should be visible in the output of the above command. You also need to remove the Flood binaries from /usr/local/bin/ or /usr/bin/ .

As neon_overload mentions, if you are having problems with Deluge, backup and removal old configuration can help fix update issues. Default Location: ~/.config/deluge

sudo apt-get remove --purge deluge

Obviously, you understand that when you search for "The Flood", you will still get it on the screen.

These are the leftover files of the Flood - to completely remove them from your system,

sudo apt autoremove deluge

Seeking and no flood will appear….. Magic

Actually, why file server Is it idle for us? Yes, and where should the file be taken from? Disorder. Let's install a torrent client on it. In kubuntu, I used kTorrent at one time. But in this case we are interested in clients that can work without a GUI and that have a web interface. Options:

  1. rTorrent + wTorrent bundle. There are quite a few descriptions of the setup on the network, but the process scares me =)
  2. TorrentFlux and along the way its fork Torrentflux-b4rt. Designed as a web interface and nothing else. You might want to think about the setting.
  3. Deluge. It was originally planned as a torrent client for gtk. But starting from some version, it can work as a daemon, to which you can already connect desired interface- either a graphic face, or a web face, or manage through the console.

While I'm thinking of trying to get confused with the third option. I'll google further. It would just be quite convenient as usual - you sit in the browser, click on the download of the torrent file and open it with the help of the Windows muzzle. And that one is already transferring the download to the daemon on the server. Install deluge (in general, it is advised to install the version from the site, but I installed it from the repositories) sudo aptitude install deluge-coresudo aptitude install deluge-webuisudo aptitude install deluge-console If we install the packages downloaded from the site, then most likely there will be a problem of unmet dependencies. We get out of the situation as follows: sudo apt-get -f install We launch deluged Launching the web muzzle deluge --ui web By the way, we execute this command on behalf of our user, not as root. For in this case, the web interface will not work. Why, I haven’t figured it out yet. But after running this, one console will disappear, because this command is executed there. In order for the command to be executed and remain hanging in the background, we write deluge --ui web& If you want the web interface to be always available, put this command somewhere in autorun, but in such a way that it is executed with the rights of a regular user. By the way, I recommend putting the launch of the deluged daemon into autorun. through a browser to the desired server on this port. The default password is deluge. Customizable. Several design options are offered. Ajax option is the most beautiful. But it doesn't have all the possibilities. For example, you cannot specify for a particular torrent where to download the file. You can only specify shared folder for all torrents. In other skins, this feature is present. There are GUI shells for both Linux and Windows. But before using the GUI face, you need to allow the daemon to do this. We do this in any of two ways:

  1. Through the web interface. in the settings - Deluge - Service - Allow remote connection (tick)
  2. Through the console interface. We write deluge --ui console. Then config allow_remote True.

The web interface is often inconvenient to use. But this is purely IMHO. Since I have Windows on the desktop ( Windows Web Server 2008), put the client under Windows. We go to the official website of the project, download the version for Windows. It is recommended to download the same version as that of the daemon installed on the server. Download, install. The installer will also offer to install the GTK+ Runtime. We agree. After the client has been installed, we climb into its settings:

  1. Launching the client
  2. Go to "Preferences -> Interface" and uncheck "Classic Mode".
  3. Restart client. The Connection manager window should appear.
  4. Remove line from localhost. By clicking the "Add" button, enter the IP of the server (in our case, boxes). Leave the port the same.

Here I hung up for a while. In addition to the IP address, I had to enter a username and password. Suppose I could set the password through the web interface. And which user should I write? I wrote my own and the password set via the web interface. Nifiga. I wrote my own and his password in the system. Nifiga .. Rummaged. So, we do this:

  1. We go on the server to the home directory of our user (from which we run deluge)
  2. Next, go to the /.config/deluge directory
  3. Opening the auth file
  4. In the second line we write the username and password in the format user:password (moreover, I note that we write this information from the bulldozer)
  5. Restart deluge - deluged restart
  6. On a computer with Windows, go to the Connection Manager, in the connection settings we hammer in this user and his password.
  7. Click "Connect"
  8. Voila, the client is connected.

Thus, we got the usual way of processing torrent files - we open them with a torrent client (GUI-muzzle) and choose what to do. But it can be done differently. I also tried this method:

  1. Create a folder on the server, say /home/user/torrents
  2. We share it in samba.
  3. In the deluge settings, through the same web face, we set it to automatically take torrents from this daddy.
  4. And then, we just save the torrent files in this folder.

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE: