Skip to content

Docker image to run the utorrent server

License

Notifications You must be signed in to change notification settings

ekho/docker-utorrent

Repository files navigation

docker-utorrent

Docker Pulls Docker Stars Docker Image Version (latest semver) Docker Image Size (latest semver) Docker Cloud Automated build Docker Cloud Build Status Buy Me A Coffee

Docker image to run the utorrent server.

NOTE: Image has been refactored. You should update your configs. Or you can use ekho/utorrent:legacy image instead of ekho/utorrent:latest

Run

Run via Docker CLI client

To run the utorrent container you can execute:

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Open a browser and point your to http://docker-host:8080/gui

Settings persistence

Dir on host machine

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -v /path/to/setting/dir:/utorrent/settings        \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Named volume

docker volume create utorrent-settings

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -v utorrent-settings:/utorrent/settings           \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Configure

All available settings you can find in example config. Almost all of these settings can be changed except:

  • bind_ip - set as 0.0.0.0
  • dir_active, dir_completed - /data
  • dir_torrent_files - /utorrent/torrents
  • dir_temp_files - /utorrent/temp
  • dir_autoload - /utorrent/autoload
  • dir_request - /utorrent/request
  • dir_root - /data
  • preferred_interface - empty
  • ut_webui_dir - controlled by webui var
  • randomize_bind_port - false

You can specify list of download dirs using dir_download var.

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -v /path/to/data/dir2:/abs-path-dir               \
    -e dir_autoload_delete=true                       \
    -e dir_download=subdir1,/abs-path-dir             \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Custom UID/GID

By default container tries to use uid/gid of owner of /data volume. But you can specify custom UID/GID by environment variables.

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -e UID=1000 -e GID=1000                           \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Alternative UI

Already bundled. You can activate it with env var webui=<ng|ut>.

docker run                                            \
    --name utorrent                                   \
    -v /path/to/data/dir:/data                        \
    -e webui=ng                                       \
    -p 8080:8080                                      \
    -p 6881:6881                                      \
    -p 6881:6881/udp                                  \
    ekho/utorrent:<tag>

Run via Docker Compose

You can also run the utorrent container by using Docker Compose.

Create your Docker Compose file (docker-compose.yml) using the following YAML snippet:

version: '3.7'
services:
  utorrent:
    image: ekho/utorrent:<tag>
    volumes:
      - utorrent-settings:/utorrent/settings
      - /path/to/data/dir:/data
      - /path/to/data/dir2:/abs-path-dir
    environment:
      UID: 1000
      GID: 1000
      webui: ng
      dir_autoload_delete: true
      dir_download: subdir1,/abs-path-dir
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  utorrent-settings:

Changes

  • 2020-04-15 totally refactored; incompatible with previous setup
  • 2020-04-08 minor build refactoring
  • 2020-04-07 added alternative ui - utorrent-ui
  • 2019-08-05 added alternative ui - psychowood/ng-torrent-ui
  • 2018-01-03 added host uid/gid usage
  • 2017-12-24 changed directories layout