{"id":13443032,"url":"https://github.com/crazy-max/docker-rtorrent-rutorrent","last_synced_at":"2025-05-15T09:07:35.700Z","repository":{"id":38805011,"uuid":"110322125","full_name":"crazy-max/docker-rtorrent-rutorrent","owner":"crazy-max","description":"rTorrent and ruTorrent Docker image","archived":false,"fork":false,"pushed_at":"2025-04-27T19:11:47.000Z","size":609,"stargazers_count":563,"open_issues_count":32,"forks_count":113,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-27T20:23:20.941Z","etag":null,"topics":["alpine-linux","docker","nginx","rtorrent","rutorrent","traefik"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazy-max.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"crazy-max","custom":"https://www.paypal.me/crazyws"}},"created_at":"2017-11-11T05:56:45.000Z","updated_at":"2025-04-27T19:11:52.000Z","dependencies_parsed_at":"2023-12-31T15:24:25.625Z","dependency_job_id":"944097f0-d422-4a5d-95e9-53da73215da0","html_url":"https://github.com/crazy-max/docker-rtorrent-rutorrent","commit_stats":{"total_commits":353,"total_committers":22,"mean_commits":"16.045454545454547","dds":0.3031161473087819,"last_synced_commit":"b3ed6bed650841c01c559e4224d0ce6a135e2df9"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-rtorrent-rutorrent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-rtorrent-rutorrent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-rtorrent-rutorrent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-rtorrent-rutorrent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazy-max","download_url":"https://codeload.github.com/crazy-max/docker-rtorrent-rutorrent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310515,"owners_count":22049469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine-linux","docker","nginx","rtorrent","rutorrent","traefik"],"created_at":"2024-07-31T03:01:55.095Z","updated_at":"2025-05-15T09:07:30.684Z","avatar_url":"https://github.com/crazy-max.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/crazy-max","https://www.paypal.me/crazyws"],"categories":["Dockerfile"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/crazy-max/docker-rtorrent-rutorrent\" target=\"_blank\"\u003e\u003cimg height=\"128\" src=\"https://raw.githubusercontent.com/crazy-max/docker-rtorrent-rutorrent/master/.github/docker-rtorrent-rutorrent.jpg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/rtorrent-rutorrent/tags?page=1\u0026ordering=last_updated\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/crazy-max/docker-rtorrent-rutorrent?label=version\u0026style=flat-square\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/crazy-max/docker-rtorrent-rutorrent/actions?workflow=build\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/crazy-max/docker-rtorrent-rutorrent/build.yml?branch=master\u0026label=build\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/rtorrent-rutorrent/\"\u003e\u003cimg src=\"https://img.shields.io/docker/stars/crazymax/rtorrent-rutorrent.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/rtorrent-rutorrent/\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/crazymax/rtorrent-rutorrent.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Pulls\"\u003e\u003c/a\u003e\n  \u003cbr /\u003e\u003ca href=\"https://github.com/sponsors/crazy-max\"\u003e\u003cimg src=\"https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github\u0026style=flat-square\" alt=\"Become a sponsor\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/crazyws\"\u003e\u003cimg src=\"https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square\" alt=\"Donate Paypal\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n[stickz rTorrent](https://github.com/stickz/rtorrent) with [ruTorrent](https://github.com/Novik/ruTorrent)\nDocker image.\n\n\u003e [!TIP] \n\u003e Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun)\n\u003e project!\n\n___\n\n* [Features](#features)\n* [Build locally](#build-locally)\n* [Image](#image)\n* [Environment variables](#environment-variables)\n  * [General](#general)\n  * [rTorrent](#rtorrent)\n  * [ruTorrent](#rutorrent)\n* [Volumes](#volumes)\n* [Ports](#ports)\n* [Usage](#usage)\n  * [Docker Compose](#docker-compose)\n  * [Command line](#command-line)\n* [Notes](#notes)\n  * [XMLRPC through nginx](#xmlrpc-through-nginx)\n  * [WebDAV](#webdav)\n  * [Populate .htpasswd files](#populate-htpasswd-files)\n  * [Bootstrap config `.rtlocal.rc`](#bootstrap-config-rtlocalrc)\n  * [Override or add a ruTorrent plugin/theme](#override-or-add-a-rutorrent-plugintheme)\n  * [Edit a ruTorrent plugin configuration](#edit-a-rutorrent-plugin-configuration)\n  * [Increase Docker timeout to allow rTorrent to shutdown gracefully](#increase-docker-timeout-to-allow-rtorrent-to-shutdown-gracefully)\n  * [WAN IP address](#wan-ip-address)\n  * [Configure rTorrent session saving](#configure-rtorrent-session-saving)\n  * [Configure rTorrent tracker scrape](#rtorrent-tracker-scrape-patch)\n  * [Configure rTorrent send receive buffers](#rtorrent-send-receive-buffers)\n  * [Configure rTorrent disk space preallocation](#rtorrent-disk-space-preallocation)\n* [Upgrade](#upgrade)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Features\n\n* Run as non-root user\n* Multi-platform image\n* Latest rTorrent and libTorrent from [rTorrent stickz](https://github.com/stickz/rtorrent) project.\n  * Includes significant performance and stability improvements.\n  * Includes compatibility with Link Time Optimizations.\n* Latest [ruTorrent](https://github.com/Novik/ruTorrent) release\n* Domain name resolving enhancements with [c-ares](https://github.com/rakshasa/rtorrent/wiki/Performance-Tuning#rtrorrent-with-c-ares) and [UDNS](https://www.corpit.ru/mjt/udns.html) for asynchronous DNS requests\n* Enhanced [rTorrent config](rootfs/tpls/.rtorrent.rc) and bootstraping with a [local config](rootfs/tpls/etc/rtorrent/.rtlocal.rc)\n* XMLRPC through nginx over SCGI socket (basic auth optional)\n* WebDAV on completed downloads (basic auth optional)\n* Ability to add a custom ruTorrent plugin / theme\n* Allow persisting specific configuration for ruTorrent plugins\n* ruTorrent [GeoIP2 plugin](https://github.com/Micdu70/geoip2-rutorrent)\n* [mktorrent](https://github.com/pobrn/mktorrent) installed for ruTorrent create plugin\n* [Traefik](https://github.com/containous/traefik-library-image) Docker image as reverse proxy and creation/renewal of Let's Encrypt certificates (see [this template](examples/traefik))\n* [geoip-updater](https://github.com/crazy-max/geoip-updater) Docker image to download MaxMind's GeoIP2 databases on a time-based schedule for geolocation\n\n## Build locally\n\n```shell\ngit clone https://github.com/crazy-max/docker-rtorrent-rutorrent.git\ncd docker-rtorrent-rutorrent\n\n# Build image and output to docker (default)\ndocker buildx bake\n\n# Build image\ndocker buildx bake image\n\n# Build multi-platform image\ndocker buildx bake image-all\n```\n\n## Image\n\n| Registry                                                                                                      | Image                                   |\n|---------------------------------------------------------------------------------------------------------------|-----------------------------------------|\n| [Docker Hub](https://hub.docker.com/r/crazymax/rtorrent-rutorrent/)                                           | `crazymax/rtorrent-rutorrent`           |\n| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/rtorrent-rutorrent) | `ghcr.io/crazy-max/rtorrent-rutorrent`  |\n\nFollowing platforms for this image are available:\n\n```\n$ docker buildx imagetools inspect crazymax/rtorrent-rutorrent --format \"{{json .Manifest}}\" | \\\n  jq -r '.manifests[] | select(.platform.os != null and .platform.os != \"unknown\") | .platform | \"\\(.os)/\\(.architecture)\\(if .variant then \"/\" + .variant else \"\" end)\"'\n\nlinux/amd64\nlinux/arm/v6\nlinux/arm/v7\nlinux/arm64\n```\n\n\n## Environment variables\n\n### General\n\n* `TZ`: The timezone assigned to the container (default `UTC`)\n* `PUID`: rTorrent user id (default `1000`)\n* `PGID`: rTorrent group id (default `1000`)\n* `WAN_IP`: [Public IP address](#wan-ip-address) reported to the tracker (auto if empty)\n* `WAN_IP_CMD`: Command to resolve the [Public IP address](#wan-ip-address)\n* `MEMORY_LIMIT`: PHP memory limit (default `256M`)\n* `UPLOAD_MAX_SIZE`: Upload max size (default `16M`)\n* `CLEAR_ENV`: Clear environment in FPM workers (default `yes`)\n* `OPCACHE_MEM_SIZE`: PHP OpCache memory consumption (default `128`)\n* `MAX_FILE_UPLOADS`: The maximum number of files allowed to be uploaded simultaneously (default `50`)\n* `AUTH_DELAY`: The time in seconds to wait for Basic Auth (default `0s`)\n* `REAL_IP_FROM`: Trusted addresses that are known to send correct replacement addresses (default `0.0.0.0/32`)\n* `REAL_IP_HEADER`: Request header field whose value will be used to replace the client address (default `X-Forwarded-For`)\n* `LOG_IP_VAR`: Use another variable to retrieve the remote IP address for access [log_format](http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) on Nginx. (default `remote_addr`)\n* `LOG_ACCESS`: Output access log (default `true`)\n* `XMLRPC_AUTHBASIC_STRING`: Message displayed during validation of XMLRPC Basic Auth (default `rTorrent XMLRPC restricted access`)\n* `XMLRPC_PORT`: XMLRPC port through nginx over SCGI socket (default `8000`)\n* `XMLRPC_SIZE_LIMIT`: Maximum body size of XMLRPC calls (default `1M`)\n* `RUTORRENT_AUTHBASIC_STRING`: Message displayed during validation of ruTorrent Basic Auth (default `ruTorrent restricted access`)\n* `RUTORRENT_PORT`: ruTorrent HTTP port (default `8080`)\n* `WEBDAV_AUTHBASIC_STRING`: Message displayed during validation of WebDAV Basic Auth (default `WebDAV restricted access`)\n* `WEBDAV_PORT`: WebDAV port on completed downloads (default `9000`)\n\n### rTorrent\n\n* `RT_LOG_LEVEL`: rTorrent log level (default `info`)\n* `RT_LOG_EXECUTE`: Log executed commands to `/data/rtorrent/log/execute.log` (default `false`)\n* `RT_LOG_XMLRPC`: Log XMLRPC queries to `/data/rtorrent/log/xmlrpc.log` (default `false`)\n* `RT_SESSION_SAVE_SECONDS`: Seconds between writing torrent information to disk (default `3600`)\n* `RT_TRACKER_DELAY_SCRAPE`: Delay tracker announces at startup (default `true`)\n* `RT_DHT_PORT`: DHT UDP port (`dht.port.set`, default `6881`)\n* `RT_INC_PORT`: Incoming connections (`network.port_range.set`, default `50000`)\n* `RT_SEND_BUFFER_SIZE`: Sets default tcp wmem value (`network.send_buffer.size.set`, default `4M`)\n* `RT_RECEIVE_BUFFER_SIZE`: Sets default tcp rmem value (`network.receive_buffer.size.set`, default `4M`)\n* `RT_PREALLOCATE_TYPE`: Sets the type of [disk space preallocation](#rtorrent-disk-space-preallocation) (default `0`)\n\n### ruTorrent\n\n* `RU_REMOVE_CORE_PLUGINS`: Comma separated list of core plugins to remove ; set to `false` to disable removal \n* `RU_HTTP_USER_AGENT`: ruTorrent HTTP user agent (default `Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0`)\n* `RU_HTTP_TIME_OUT`: ruTorrent HTTP timeout in seconds (default `30`)\n* `RU_HTTP_USE_GZIP`: Use HTTP Gzip compression (default `true`)\n* `RU_RPC_TIME_OUT`: ruTorrent RPC timeout in seconds (default `5`)\n* `RU_LOG_RPC_CALLS`: Log ruTorrent RPC calls (default `false`)\n* `RU_LOG_RPC_FAULTS`: Log ruTorrent RPC faults (default `true`)\n* `RU_PHP_USE_GZIP`: Use PHP Gzip compression (default `false`)\n* `RU_PHP_GZIP_LEVEL`: PHP Gzip compression level (default `2`)\n* `RU_SCHEDULE_RAND`: Rand for schedulers start, +0..X seconds (default `10`)\n* `RU_LOG_FILE`: ruTorrent log file path for errors messages (default `/data/rutorrent/rutorrent.log`)\n* `RU_DO_DIAGNOSTIC`: ruTorrent diagnostics like permission checking (default `true`)\n* `RU_CACHED_PLUGIN_LOADING`: Set to `true` to enable rapid cached loading of ruTorrent plugins (default `false`)\n* `RU_SAVE_UPLOADED_TORRENTS`: Save torrents files added wia ruTorrent in `/data/rutorrent/share/torrents` (default `true`)\n* `RU_OVERWRITE_UPLOADED_TORRENTS`: Existing .torrent files will be overwritten (default `false`)\n* `RU_FORBID_USER_SETTINGS`: If true, allows for single user style configuration, even with webauth (default `false`)\n* `RU_LOCALE`: Set default locale for ruTorrent (default `UTF8`)\n\n## Volumes\n\n* `/data`: rTorrent / ruTorrent config, session files, log, ...\n* `/downloads`: Downloaded files\n* `/passwd`: Contains htpasswd files for basic auth\n\n\u003e :warning: Note that the volumes should be owned by the user/group with the specified `PUID` and `PGID`. If you don't\n\u003e give the volumes correct permissions, the container may not start.\n\n## Ports\n\n* `6881` (or `RT_DHT_PORT`): DHT UDP port (`dht.port.set`)\n* `8000` (or `XMLRPC_PORT`): XMLRPC port through nginx over SCGI socket\n* `8080` (or `RUTORRENT_PORT`): ruTorrent HTTP port\n* `9000` (or `WEBDAV_PORT`): WebDAV port on completed downloads\n* `50000` (or `RT_INC_PORT`): Incoming connections (`network.port_range.set`)\n\n\u003e :warning: Port p+1 defined for `XMLRPC_PORT`, `RUTORRENT_PORT` and `WEBDAV_PORT` will also be reserved for\n\u003e healthcheck. (e.g. if you define `RUTORRENT_PORT=8080`, port `8081` will be reserved)\n\n## Usage\n\n### Docker Compose\n\nDocker compose is the recommended way to run this image. Copy the content of\nfolder [examples/compose](examples/compose) in `/var/rtorrent-rutorrent/` on\nyour host for example. Edit the compose file with your preferences and run the\nfollowing command:\n\n```shell\nmkdir data downloads passwd\nchown ${PUID}:${PGID} data downloads passwd\ndocker compose up -d\ndocker compose logs -f\n```\n\n### Command line\n\nYou can also use the following minimal command:\n\n```shell\nmkdir data downloads passwd\nchown ${PUID}:${PGID} data downloads passwd\ndocker run -d --name rtorrent_rutorrent \\\n  --ulimit nproc=65535 \\\n  --ulimit nofile=32000:40000 \\\n  -p 6881:6881/udp \\\n  -p 8000:8000 \\\n  -p 8080:8080 \\\n  -p 9000:9000 \\\n  -p 50000:50000 \\\n  -v $(pwd)/data:/data \\\n  -v $(pwd)/downloads:/downloads \\\n  -v $(pwd)/passwd:/passwd \\\n  crazymax/rtorrent-rutorrent:latest\n```\n\n## Notes\n\n### XMLRPC through nginx\n\nrTorrent 0.9.7+ has a built-in daemon mode disabling the user interface, so you\ncan only control it via XMLRPC. Nginx will route XMLRPC requests to rtorrent\nthrough port `8000`. These requests can be secured with basic authentication\nthrough the `/passwd/rpc.htpasswd` file in which you will need to add a username\nwith his password. See below to populate this file with a user / password.\n\n### WebDAV\n\nWebDAV allows you to retrieve your completed torrent files in `/downloads/complete`\non port `9000`. Like XMLRPC, these requests can be secured with basic authentication\nthrough the `/passwd/webdav.htpasswd` file in which you will need to add a\nusername with his password. See below to populate this file with a user / password.\n\n### Populate .htpasswd files\n\nFor ruTorrent basic auth, XMLRPC through nginx and WebDAV on completed downloads,\nyou can populate `.htpasswd` files with the following command:\n\n```\ndocker run --rm -it httpd:2.4-alpine htpasswd -Bbn \u003cusername\u003e \u003cpassword\u003e \u003e\u003e $(pwd)/passwd/webdav.htpasswd\n```\n\nHtpasswd files used:\n\n* `rpc.htpasswd`: XMLRPC through nginx\n* `rutorrent.htpasswd`: ruTorrent basic auth\n* `webdav.htpasswd`: WebDAV on completed downloads\n\n### Bootstrap config `.rtlocal.rc`\n\nWhen rTorrent is started the bootstrap config [/etc/rtorrent/.rtlocal.rc](rootfs/tpls/etc/rtorrent/.rtlocal.rc)\nis imported. This configuration cannot be changed unless you rebuild the image\nor overwrite these elements in your `.rtorrent.rc`. Here are the particular\nproperties of this file:\n\n* `system.daemon.set = true`: Launcher rTorrent as a daemon\n* A config layout for the rTorrent's instance you can use in your `.rtorrent.rc`:\n  * `cfg.basedir`: Home directory of rtorrent (`/data/rtorrent/`)\n  * `cfg.download`: Download directory (`/downloads/`)\n  * `cfg.download_complete`: Completed downloads (`/downloads/complete/`)\n  * `cfg.download_temp`:  Downloads in progress (`/downloads/temp/`)\n  * `cfg.logs`: Logs directory (`/data/rtorrent/log/`)\n  * `cfg.session`: Session directory (`/data/rtorrent/.session/`)\n  * `cfg.watch`: Watch directory for torrents (`/data/rtorrent/watch/`)\n  * `cfg.rundir`: Runtime data of rtorrent (`/var/run/rtorrent/`)\n* `d.data_path`: Config var to get the full path of data of a torrent (workaround for the possibly empty `d.base_path` attribute)\n* `directory.default.set`: Default directory to save the downloaded torrents (`cfg.download_temp`)\n* `session.path.set`: Default session directory (`cfg.session`)\n* PID file to `/var/run/rtorrent/rtorrent.pid`\n* `network.scgi.open_local`: SCGI local socket and make it group-writable and secure\n* `network.port_range.set`: Listening port for incoming peer traffic (`50000-50000`)\n* `dht.port.set`: UDP port to use for DHT (`6881`)\n* `log.open_file`: Default logging to `/data/rtorrent/log/rtorrent.log`\n  * Log level can be modified with the environment variable `RT_LOG_LEVEL`\n  * `rpc_events` are logged be default\n  * To log executed commands, add the environment variable `RT_LOG_EXECUTE`\n  * To log XMLRPC queries, add the environment variable `RT_LOG_XMLRPC`\n\n### Override or add a ruTorrent plugin/theme\n\nYou can add a plugin for ruTorrent in `/data/rutorrent/plugins/`. If you add a\nplugin that already exists in ruTorrent, it will be removed from ruTorrent core\nplugins and yours will be used. And you can also add a theme in `/data/rutorrent/themes/`.\nThe same principle as for plugins will be used if you want to override one.\n\n\u003e :warning: Container has to be restarted to propagate changes\n\n### Edit a ruTorrent plugin configuration\n\nAs you probably know, plugin configuration is not outsourced in ruTorrent.\nLoading the configuration of a plugin is done via a `conf.php` file placed at\nthe root of the plugin folder. To solve this issue with Docker, a special folder\nhas been created in `/data/rutorrent/plugins-conf` to allow you to configure\nplugins. For example to configure the `diskspace` plugin, you will need to create\nthe `/data/rutorrent/plugins-conf/diskspace.php` file with your configuration:\n\n```php\n\u003c?php\n\n$diskUpdateInterval = 10;\t// in seconds\n$notifySpaceLimit = 512;\t// in Mb\n$partitionDirectory = null;\t// if null, then we will check rtorrent download directory (or $topDirectory if rtorrent is unavailable)\n\t\t\t\t// otherwise, set this to the absolute path for checked partition. \n```\n\n\u003e :warning: Container has to be restarted to propagate changes\n\n### Increase Docker timeout to allow rTorrent to shutdown gracefully\n\nAfter issuing a shutdown command, Docker waits 10 seconds for the container to\nexit before it is killed.  If you are a seeding many torrents, rTorrent may be\nunable to gracefully close within that time period.  As a result, rTorrent is\nclosed forcefully and the lockfile isn't removed. This stale lockfile will\nprevent rTorrent from restarting until the lockfile is removed manually.\n\nThe timeout period can be extended by either adding the parameter `-t XX` to\nthe docker command or `stop_grace_period: XXs` in `compose.yml`, where\n`XX` is the number of seconds to wait for a graceful shutdown.\n\n### WAN IP address\n\n`WAN_IP` is the public IP address sent to the tracker. In the majority of cases\nyou don't need to set it as it will be automatically determined by the tracker.  \n\nBut it can be sometimes required to enforce the public IP address when you\nare behind a VPN where an erroneous IP is sometimes reported.\n\nYou can also use the `WAN_IP_CMD` environment variable to specify a command to\nresolve your public IP address. Here are some commands you can use:\n\n* `dig +short myip.opendns.com @resolver1.opendns.com`\n* `curl -s ifconfig.me`\n* `curl -s ident.me` \n\n### Configure rTorrent session saving\n\n`RT_SESSION_SAVE_SECONDS` is the seconds between writing torrent information to\ndisk. The default is 3600 seconds which equals 1 hour. rTorrent has a bad\ndefault of 20 minutes. Twenty minutes is bad for the lifespan of SSDs and\ngreatly reduces torrent throughput.\n\nIt is no longer possible to lose torrents added through ruTorrent on this\ndocker container. Only torrent statistics are lost during a crash. (Ratio,\nTotal Uploaded \u0026 Downloaded etc.)\n\nHigher values will reduce disk usage, at the cost of minor stat loss during a\ncrash. Consider increasing to 10800 seconds (3 hours) if running thousands of\ntorrents.\n\n### rTorrent tracker scrape patch\n\n`RT_TRACKER_DELAY_SCRAPE` specifies whether to delay tracker announces at\nrTorrent startup. The default value is `true`. There are two main benefits to\nkeeping this feature enabled:\n\n1) Software Stability: rTorrent will not crash or time-out with tens of thousands of trackers.\n2) Immediate Access: ruTorrent can be accessed immediately after rTorrent is started.\n\n### rTorrent send receive buffers\n\nOverriding the default TCP rmem and wmem values for rTorrent improves torrent\nthroughput.\n\n* `RT_SEND_BUFFER_SIZE`: Sets default tcp wmem value for the socket.\n* `RT_RECEIVE_BUFFER_SIZE`: Sets default tcp rmem value for the socket.\n\nRecommended values:\n* `2GB of less system memory`: Reduce to 1M send and 1M receive regardless of speed.\n* `4GB to 16GB of system memory`: Keep at default values of 4M send and 4M receive.\n* `16GB to 32GB of system memory`: Increase to 8M send for 500Mbps speeds.\n* `32GB to 64GB of system memory`: Increase to 16M send for 1G speeds.\n* `64GB to 128GB of system memory`: Increase to 32M send for 2.5G speeds.\n* `128GB to 256GB of system memory`: Increase to 64M send for 10G speeds.\n\nMemory is better spent elsewhere except under limited circumstances for high\nmemory and speed conditions. The default values should not be increased, unless\nboth the memory and speed requirements are met. These values of system memory\nare also recommended based on the port speed for rTorrent to reduce disk usage.\n\n### rTorrent disk space preallocation\n\nPreallocate disk space for contents of a torrent\n\n* `RT_PREALLOCATE_TYPE`: Sets the type of disk space preallocation to use.\n\nAcceptable values:\n* `0 = disabled (default value)`\n* `1 = enabled, allocate when a file is opened for write`\n* `2 = enabled, allocate space for the whole torrent at once`\n\nThis feature is disabled by default becuase it only benefits HDDs.\nBy allocating files in sequence we can increase the read speed for seeding.\n\nThe first type \"1\" only allocates disk space for files which start downloading.\nUse where disk space is more important than speed. Or you intend to download selective torrent files.\n\nThe second type \"2\" allocates disk space for the entire torrent, whether it's downloaded or not.\nThis method is faster than \"1\" becuase it reduces random reads for the entire torrent.\nUse where speed is more important than disk space. Or you intend to download 100% of every torrent.\n\n## Upgrade\n\nTo upgrade, pull the newer image and launch the container:\n\n```shell\ndocker compose pull\ndocker compose up -d\n```\n\n## Contributing\n\nWant to contribute? Awesome! The most basic way to show your support is to star\nthe project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)\nor by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this\njourney continues indefinitely!\n\nThanks again for your support, it is much appreciated! :pray:\n\n## License\n\nMIT. See `LICENSE` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-rtorrent-rutorrent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazy-max%2Fdocker-rtorrent-rutorrent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-rtorrent-rutorrent/lists"}