All Projects → StayPirate → alpine-rtorrent

StayPirate / alpine-rtorrent

Licence: other
Dockerized rTorrent based on Alpine Linux, with a better Docker integration.

Programming Languages

Dockerfile
14818 projects

Projects that are alternatives of or similar to alpine-rtorrent

seedbox-from-scratch
The Dockered Seedbox From Scratch Mod 2 Script
Stars: ✭ 14 (-50%)
Mutual labels:  torrent, rtorrent
tdpt
Torrent downloading progress on Telegram
Stars: ✭ 32 (+14.29%)
Mutual labels:  torrent, rtorrent
Flood Mobile
GSoC 21' @CCExtractor. A modern mobile UI for various torrent clients with a Node.js backend and Flutter frontend.
Stars: ✭ 48 (+71.43%)
Mutual labels:  torrent, rtorrent
Electorrent
A remote control client for µTorrent, qBittorrent, rTorrent, Transmission, Synology & Deluge
Stars: ✭ 582 (+1978.57%)
Mutual labels:  torrent, rtorrent
torrent-dl
Streaming Torrent Client for Python
Stars: ✭ 28 (+0%)
Mutual labels:  torrent
Tor-IP-Addresses
Hourly checked and updated list of IP Addresses of Tor and Tor Exit Nodes
Stars: ✭ 182 (+550%)
Mutual labels:  torrent
stremio-addons-list
A community curated list of Stremio Addons
Stars: ✭ 330 (+1078.57%)
Mutual labels:  torrent
Tanglestash
IOTA meets BitTorrent: An algorithm to persist any file onto the tangle of IOTA
Stars: ✭ 46 (+64.29%)
Mutual labels:  torrent
SeedTruck
Torrent management app for iOS, macOS, tvOS and watchOS made in SwiftUI 2. Same codebase for all platforms!
Stars: ✭ 25 (-10.71%)
Mutual labels:  torrent
torrentit
Telegram bot for downloading torrents without storage
Stars: ✭ 33 (+17.86%)
Mutual labels:  torrent
torrent-hound
Search torrents from multiple websites via the CLI
Stars: ✭ 28 (+0%)
Mutual labels:  torrent
cirilla
Multipurpose telegram bot
Stars: ✭ 33 (+17.86%)
Mutual labels:  torrent
sensorr
🍿📼 Sensorr - Your Friendly Digital Video Recorder
Stars: ✭ 90 (+221.43%)
Mutual labels:  torrent
Katastrophe
Command Line Tool to download torrents
Stars: ✭ 85 (+203.57%)
Mutual labels:  torrent
autobrr
Automation for downloads.
Stars: ✭ 288 (+928.57%)
Mutual labels:  torrent
m2t
Magnet links to torrent files
Stars: ✭ 18 (-35.71%)
Mutual labels:  torrent
dhtbay
A DHT crawler and torrent indexer
Stars: ✭ 94 (+235.71%)
Mutual labels:  torrent
PeerflixServerZH
🚀 Peerflix Server(BT) 汉化、美化
Stars: ✭ 32 (+14.29%)
Mutual labels:  torrent
thepiratebay
thepiratebay.org completely done in Angular, search and download torrents easily, without the worry of ads and privacy ip blocking.
Stars: ✭ 23 (-17.86%)
Mutual labels:  torrent
CheckWebPeer
Check WebRTC peers of torrents.
Stars: ✭ 19 (-32.14%)
Mutual labels:  torrent

rTorrent Docker Image

This is one of the thousands dockerized rTorrent images. I opted to create my own one for the two following main reasons:

  • Make practice with Docker.
  • Have a modular and well docker integrated rTorrent daemon based on Alpine Linux.

I've noticed there are lots of images for rTorrent, but just a few based on Alpine Linux, all the others use huge distros like centos or ubuntu. My philosophy is fewer lines of code mean less attack surface.

Unfortunately, images based on Alpine Linux are no more than just a simple installation of rTorrent from official repositories and some of these runs from root instead of an unprivileged user. I've added a usefully and modern configuration, easily findable on the official wiki. I then refactored the code to convert it into a modular format, following other tips present in the same wiki.

Why this image

Functionalities. Out of the box rTorrent doesn't enable most of its features, using this image you will be provided with a modular and modern rTorrent configuration.
Security first! Docker has critical side effects if used improperly, within this image rTorrent is run by an unprivileged user.
Image size. This is a very tiny image since it is based on Alpine Linux, the only rTorrent package is installed from Alpine Linux's official repository. No other software is installed or manually added (it can be easily checked from the Dockerfile).

Run it!

If you are going to run a container in a x86-64 computer you can directly pull this image from the official docker store by executing: docker container run -d --name rtorrent -p 50000:50000 -p 6881:6881 -p 6881:6881/udp tuxmealux/alpine-rtorrent

Otherwise, you can build it by first cloning this git repository (mandatory if you want to run it on a rpi)

git clone https://github.com/TuxMeaLux/alpine-rtorrent.git /tmp/alpine-rtorrent
docker build -t alpine-rtorrent:latest /tmp/alpine-rtorrent
docker container run -d --name rtorrent \
  -p 50000:50000 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  alpine-rtorrent:latest

You should store downloaded files outside the container, explanation on how to do it is shown below on this file. Please continue to read or jump to Bind Mounts.
If the user you are using is part of the docker group, then you can execute the above commands without sudo, otherwise use sudo.

Ports

There are three exposed ports on this Dockerfile: 50000, 6881, 16891. Only the first two are needed by rTorrent to work properly, and should be published at container creation time.

Port 50000 is the port where rTorrent starts to listen. It's important that it would be open/forwarded at firewall and router level in TCP mode.
Port 6881 is the port used by DHT. It needs to be open/forwarded in UDP and TCP mode either at firewall and router level.
Port 16891 is used by the XMLRPC socket. It is used by third-party applications to fully control rTorrent. Whoever has access to this port can execute any command inside your container. This image uses an unprivileged user, hence damage is contained, but it wouldn't be nice anyway. I expose (not publish) this port to let a web interface communicates with rTorrent, this allows me to control rTorrent from web-ui instead of using it from the command line. The web-ui I use is called Flood, and I run it in another container. Both containers are connected to a dedicated network so only Flood can reach this socket. Check Docker network for more information about how to do it.
If you are looking for a fast way to either run rTorrent and Flood using just one command, check my composefile out 😉.

If it's not your intention to control rTorrent from a third-party application, do not use port 16891.

Volumes

There is a volume which maps the directory that rTorrent uses to store session data. This is useful for a couple of reasons.
First, when the container is badly stopped and the daemon does not have time to remove its lock file, you can easily access it from the host system and delete it by yourself. Lock file has been disabled from this commit, the container can now be automatically restarted.
Second, all the information about the downloading torrents will be preserved. Don't forget that it is not a named volume, you need to know the hash of the volume created by your container and you can get it with docker container inspect --format '{{ .Mounts }}' rtorrent. If you prefer, a named volume can be passed by command line which overrides the one in the Dockerfile. It will ensure the operation of switching containers easier. To do it, you need to pass -v rtorrent_session:/home/rtorrent/rtorrent/.session at container creation time.

Bind Mounts

There are two directories that should be mapped outside the container.

  • /home/rtorrent/rtorrent/download This is the directory where downloaded and downloading files are stored. Leaving this folder inside the container is either inconvenient and not a good practice.
    You can create a Download folder on the host system and maps it with the above-mentioned path at container creation time.

  • /home/rtorrent/rtorrent/watch The use of this directory is not mandatory, so you should outside map it only if you actually use it.
    The first time you will run the container, two folders will be created as sub-directories: watch/load and watch/start. These two new folders are constantly watched by the rTorrent daemon, and as soon as you drop a .torrent file on them it would be either loaded or started.

Logs

To let rTorrent becomes more docker compliant, I've configured logs to be written on /dev/stdout. In this way, it is possible to catch them with docker logs.
This behavior can be changed editing the config.d/01-log.rc file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].