Jump to: navigation, search



KTorrent is the default BitTorrent client in Kubuntu. Also see the KTorrent wiki.

K menu -> Internet -> KTorrent

Install and configure KTorrent

  • If KTorrent is not yet installed on your system:
sudo apt-get install ktorrent
  • If not using a proxy, be sure to have your firewall ports open (by default 6881 and 4444).
  • It is possible to use proxies with KTorrent. For example, if you have a tracker proxy at and a socks proxy at, then set KTorrent to use these proxies:
KTorrent -> Settings -> Configure KTorrent... -> Proxy
-> HTTP:Proxy: -> Port: 8118
-> SOCKS: Use a SOCKS proxy server: (ticked) -> Server: -> Port: 9050 -> Version 5 (assuming you are using socks5)
Although KTorrent is not known to leak information around the proxy, if you wish to be sure that information is passed through the proxy only, then block traffic on ports 6881 and 4444 (in your firewall settings) when using a proxy.
  • It is possible to use encryption with KTorrent:
KTorrent -> Settings -> Configure KTorrent... -> BitTorrent -> Encryption -> Use protocol encryption

In an era of increasing censorship, spying, and surveillance using Deep Packet Inspection, encryption has become an essential componenet of data transfer.

KTorrent -> Plugins -> IP Filter (ticked) -> Settings -> Configure KTorrent... -> IP Filter -> Use PeerGuardian filter (ticked) -> Download/Convert

This service attempts to monitor and filter IP addresses known for censorship, spying, or provision of false or malicious data to this type of Internet service.

There are two different locations from which to obtain IP block lists to use with PeerGuardian. One of them should be entered in the PeerGuardian plugin settings (if not already set):
KTorrent -> Settings -> Configure KTorrent... -> IP Filter -> Use PeerGuardian filter (ticked) -> IP filter file -> enter either:
or (requires donation payment to Bluetack at their website):
  • Some older routers only allow 20 simultaneous connections or they will continually freeze (as their connection-table cache becomes full). If this occurs, decrease the maximum number of connections to 20:
KTorrent -> Settings -> Configure KTorrent... -> Network -> Advanced: Maximum number of connection setups: 20
  • Do not share copyrighted material or content that is otherwise illegal to share.

Set Firefox to use KTorrent for magnet links

Firefox is very ticklish about this setting, so follow the instructions very carefully.

  • Open a window which has a magnet link on it. Click on the magnet link, and the error "Firefox doesn't know how to open this address, because the protocol (magnet) isn't associated with any program" usually appears.
  • Open a new tab (NOT a new window) and edit the configuration settings by typing about:config in the address bar of the newly-opened tab. Then add the network.protocol-handler.expose.magnet setting and set it to false:
Firefox -> about:config -> Search: network.protocol-handler.expose -> <Right-click> on the main window
-> New -> Boolean -> Enter the preference name: network.protocol-handler.expose.magnet -> Ok
-> False -> Ok
  • DO NOT CLOSE the about:config tab until this step is complete! While the about:config tab remains open, go to the tab with your magnet link available. Click on the magnet link. A dialog box should appear to choose the application.
Firefox -> Launch Application: Choose an Application: Choose... -> File system: /usr/bin/ktorrent
-> Remember my choice for magnet links (ticked) -> Ok
  • Now whenever you click on a magnet link in Firefox, it should be added automatically to KTorrent and will be found in the KTorrent -> Magnet section. If a different downloading program is later desired for use with magnets, the setting in Firefox can subsequently be changed:
Firefox -> Preferences -> Applications -> magnet -> (dropdown box)
  • Note: Although magnet links have been supported since KTorrent 4.0, some users report that magnet links will not work properly with KTorrent versions prior to 4.3 (and libktorrent5 1.3 and ktorrent-data 4.3).
  • Do not share copyrighted material or content that is otherwise illegal to share.

Create a torrent

  • Make sure the "Main" toolbar is visible:
KTorrent -> Settings -> Toolbars Shown -> Main (ticked)
  • Create a new Torrent:
KTorrent -> New
  • Choose the File or Directory from which to create the torrent:
-> File or directory to create directory from
  • Choose the size of the chunks:
-> Size of each chunk: 512 KiB
  • Choose the trackers to use:
-> Trackers ->
-> udp://tracker.openbittorrent.com:80/announce -> Add
-> udp://tracker.publicbt.com:80/announce -> Add
-> udp://tracker.istole.it:80/announce -> Add
-> Ok
  • Save the newly created torrent:
-> MyFirstTorrent.torrent
  • The newly created torrent can be then uploaded to tracker sites. Free, open source projects and public-domain files are frequently distributed this way. Please do not illegally upload torrents for copyrighted material. Help for uploading torrents can be found at TorrentFreak or KAT.
  • Torrents can also be uploaded and cached at

Import partially-downloaded torrents

There are two methods of transferring the data of a partially-downloaded torrent from an old location to a new location. Copy both the folder with the partially-downloaded data and the original torrent from the old location to the new location.

  • Option 1: Use the KTorrent Import option:
KTorrent -> File -> Import Torrent -> Torrent: mytorrent.torrent -> Data: mytorrentdatafolder -> Import
  • Option 2: Open the torrent file (that corresponds to the folder of the partially downloaded data) as if it were a new torrent. With the torrent "stopped", check the existing downloaded data (by file name) and start rehashing the data (to verify the data integrity):
KTorrent -> Torrents -> Check Data

Then re-start the torrent and the downloads should resume using the transferred data.

KTorrent 4.3

Download and install the current KTorrent / libktorrent versions from source code according to instructions here or install the Debian (.deb) packages found here.

  • The Debian package for KTorrent 4.3 (64-bit version or 32-bit version) can be installed by adding the experimental Debian repository to your package manager (such as Muon or Synaptic):
deb http://ftp.us.debian.org/debian experimental main
and then installing the ktorrent package using the package manager or from the command-line terminal:
sudo apt-get install ktorrent ktorrent-data libktorrent5

When using a package manager, it is necessary to "Force version" to 4.3.

  • If the package manager balks at installation, then download the ktorrent, ktorrent-data, and libktorrent5 .deb packages for your OS version (amd64 or i386) from the Debian site (ktorrent, ktorrent-data, and libktorrent5) and install the packages manually (by clicking on the downloaded packages).
  • In general, after complete installation of the package and its dependencies it is wise to remove the experimental repository from your package manager in order to prevent conflicts with future (K)Ubuntu updates.
Personal tools