Native RPC access to Deluge daemons

A few months ago I release go-rencode but not an application to showcase an useful task accomplished with it.

I have been using go-rencode to automatically download new Debian/Ubuntu distro releases through Deluge with a tiny Go library I created for the purpose, which is now available under GNU/GPL license v2.

Image courtesy of

Head over at to get the source code; as mentioned in its README, this is how to start downloading the latest LTS Ubuntu with the example add-torrent program, connecting to a localhost Deluge daemon instance:

DELUGE_PASSWORD="mypassword" bin/add-torrent magnet:?xt=urn:btih:C1939CA413B9AFCC34EA0CF3C128574E93FF6CB0&

It is important to note that this client library for Deluge RPC does not need a running web interface (deluge-web), as it communicates directly with the daemon in its native protocol. This also means you need to validate the magnet URIs before passing them to the daemon, otherwise it will add invalid torrents with a name constituted by a long sequence of zeroes. And probably there are vulnerabilities/bugs to be found in making RPC calls this way.

Many other methods available on the server can be implemented with a bit of patience and reverse engineering; enjoy and make proficient use of go-libdeluge!

Like what you read? Give gdm85 a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.