Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN \
p7zip && \
echo "**** grab GeoIP database ****" && \
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
"https://geo.el0.org/GeoIP.dat.gz" \
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
| gunzip > /usr/share/GeoIP/GeoIP.dat && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN \
p7zip && \
echo "**** grab GeoIP database ****" && \
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
"https://geo.el0.org/GeoIP.dat.gz" \
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
| gunzip > /usr/share/GeoIP/GeoIP.dat && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,18 @@ Change the inbound port to 6881 (or whichever port you've mapped for the contain

This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).

### Caveats

* Automatic GeoIP updates will not work

## Non-Root Operation

This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).

### Caveats

* Automatic GeoIP updates will not work

## Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Expand Down Expand Up @@ -315,6 +323,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **29.12.25:** - Fix some issues with GeoIP updates.
* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update.
* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.
* **19.09.24:** - Prevent race condition related delay during container stop.
Expand Down
5 changes: 5 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ opt_param_usage_include_ports: true
opt_param_ports:
- {external_port: "58846", internal_port: "58846", port_desc: "Default deluged port for thin client connectivity"}
readonly_supported: true
readonly_message: |
* Automatic GeoIP updates will not work
nonroot_supported: true
nonroot_message: |
* Automatic GeoIP updates will not work
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand Down Expand Up @@ -96,6 +100,7 @@ init_diagram: |
"deluge:latest" <- Base Images
# changelog
changelogs:
- {date: "29.12.25:", desc: "Fix some issues with GeoIP updates."}
- {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."}
- {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}
- {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."}
Expand Down
16 changes: 11 additions & 5 deletions root/app/update-geoip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ sleep $(( RANDOM % 10800 ))
geoip_dat_path="/usr/share/GeoIP/GeoIP.dat"

if [[ -e "${geoip_dat_path}" ]]; then
curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \
"https://geo.el0.org/GeoIP.dat.gz" |
gunzip > /tmp/GeoIP.dat && \
mv /tmp/GeoIP.dat "${geoip_dat_path}" && \
chmod 644 "${geoip_dat_path}"
# Only update if the SHAs are different
source_sha=$(sha1sum "${geoip_dat_path}" | awk '{print $1}')
dest_sha=$(curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors "https://geoip.linuxserver.io/dat_sha1.txt")

if [[ "${source_sha}" != "${dest_sha}" ]]; then
curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \
"https://geoip.linuxserver.io/GeoIP.dat.gz" |
gunzip > /tmp/GeoIP.dat && \
mv /tmp/GeoIP.dat "${geoip_dat_path}" && \
chmod 644 "${geoip_dat_path}"
fi
fi
2 changes: 0 additions & 2 deletions root/crontabs/root

This file was deleted.

7 changes: 7 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-deluge-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ if [[ ! -d /config/torrents ]]; then
mkdir -p /config/torrents
fi

if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
# Pick a random day and hour to update the GeoIP DB
X=$(shuf -i 0-23 -n 1)
Y=$(shuf -i 0-6 -n 1)
(crontab -l 2>/dev/null; echo "0 ${X} * * ${Y} /app/geoip-update.sh 2>&1") | crontab -
fi

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
# permissions
lsiown -R abc:abc \
Expand Down