-
-
Notifications
You must be signed in to change notification settings - Fork 107
Create docker-transmission-openvpn application #866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
91de209
4022543
781851a
1135f85
7050bed
9017776
7f6ce18
4ad7f58
27a8345
43ce133
ab709cd
427c264
c731ff8
59758de
60309db
13ff7f0
2a1a39a
44a131d
b75f9c8
e92605b
28c7298
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/env bash | ||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) | ||
# Copyright (c) 2021-2025 community-scripts ORG | ||
# Author: SunFlowerOwl | ||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
# Source: https://github.com/haugene/docker-transmission-openvpn | ||
|
||
APP="transmission-openvpn" | ||
var_tags="${var_tags:-torrent;vpn}" | ||
var_cpu="${var_cpu:-1}" | ||
var_ram="${var_ram:-512}" | ||
var_disk="${var_disk:-8}" | ||
var_os="${var_os:-debian}" | ||
var_version="${var_version:-12}" | ||
var_unprivileged="${var_unprivileged:-1}" | ||
var_tun="${var_tun:-yes}" | ||
|
||
header_info "$APP" | ||
variables | ||
color | ||
catch_errors | ||
|
||
function update_script() { | ||
header_info | ||
check_container_storage | ||
check_container_resources | ||
if [[ ! -d /opt/transmission-openvpn/ ]]; then | ||
msg_error "No ${APP} Installation Found!" | ||
exit | ||
fi | ||
|
||
msg_info "Updating Dependencies" | ||
$STD apt-get update | ||
$STD apt-get -y upgrade | ||
msg_ok "Updated Dependencies" | ||
|
||
if check_for_gh_release "docker-transmission-openvpn" "haugene/docker-transmission-openvpn"; then | ||
msg_info "Stopping $APP" | ||
systemctl stop openvpn-custom | ||
msg_ok "Stopped $APP" | ||
|
||
msg_info "Saving Custom Configs" | ||
mv /etc/openvpn/custom /opt/transmission-openvpn/ | ||
rm -f /opt/transmission-openvpn/config-failure.sh | ||
msg_ok "Saved Custom Configs" | ||
|
||
msg_info "Updating ${APP} LXC" | ||
fetch_and_deploy_gh_release "docker-transmission-openvpn" "haugene/docker-transmission-openvpn" "tarball" "latest" "/opt/docker-transmission-openvpn" | ||
rm -rf /etc/openvpn/* /etc/transmission/* /etc/scripts/* /opt/privoxy/* | ||
cp -r /opt/docker-transmission-openvpn/openvpn/* /etc/openvpn/ | ||
cp -r /opt/docker-transmission-openvpn/transmission/* /etc/transmission/ | ||
cp -r /opt/docker-transmission-openvpn/scripts/* /etc/scripts/ | ||
cp -r /opt/docker-transmission-openvpn/privoxy/scripts/* /opt/privoxy/ | ||
chmod +x /etc/openvpn/*.sh | ||
chmod +x /etc/scripts/*.sh | ||
chmod +x /opt/privoxy/*.sh | ||
msg_ok "Updated ${APP} LXC" | ||
|
||
msg_info "Restoring Custom Configs" | ||
cp -r /opt/transmission-openvpn/custom/* /etc/openvpn/custom/ | ||
msg_ok "Restored Custom Configs" | ||
|
||
msg_info "Starting $APP" | ||
systemctl start openvpn-custom | ||
msg_ok "Started $APP" | ||
fi | ||
|
||
msg_info "Cleaning up" | ||
$STD apt-get -y autoremove | ||
$STD apt-get -y autoclean | ||
rm -rf /opt/docker-transmission-openvpn | ||
msg_ok "Cleaned" | ||
|
||
exit | ||
} | ||
|
||
start | ||
build_container | ||
description | ||
|
||
msg_ok "Completed Successfully!\n" | ||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" | ||
echo -e "${INFO}${YW} Access it using the following URL:${CL}" | ||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9091${CL}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "Transmission-Openvpn", | ||
"slug": "transmission-openvpn", | ||
"categories": [ | ||
11 | ||
], | ||
"date_created": "2025-09-04", | ||
"type": "ct", | ||
"updateable": true, | ||
"privileged": false, | ||
"interface_port": 9091, | ||
"documentation": "https://haugene.github.io/docker-transmission-openvpn/", | ||
"config_path": "/opt/transmission-openvpn/", | ||
"website": "https://github.com/haugene/docker-transmission-openvpn", | ||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/transmission.webp", | ||
"description": "This project runs Transmission + OpenVPN natively in an LXC container, using the popular docker-transmission-openvpn image as a base. It ensures all torrent traffic is securely routed through a VPN tunnel, supports a wide range of VPN providers, and offers flexible configuration options", | ||
"install_methods": [ | ||
{ | ||
"type": "default", | ||
"script": "ct/transmission-openvpn.sh", | ||
"resources": { | ||
"cpu": 2, | ||
"ram": 2048, | ||
"hdd": 8, | ||
"os": "Debian", | ||
"version": "12" | ||
} | ||
} | ||
], | ||
"default_credentials": { | ||
"username": null, | ||
"password": null | ||
}, | ||
"notes": [ | ||
{ | ||
"text": "This application requires a VPN provider to work. Please refer to your VPN providerβs documentation for setting up OpenVPN.", | ||
"type": "warning" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2021-2025 community-scripts ORG | ||
# Author: SunFlowerOwl | ||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
# Source: https://github.com/haugene/docker-transmission-openvpn | ||
|
||
# Import Functions und Setup | ||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" | ||
color | ||
verb_ip6 | ||
catch_errors | ||
setting_up_container | ||
network_check | ||
update_os | ||
|
||
msg_info "Installing Dependencies" | ||
$STD apt-get install -y \ | ||
dnsutils \ | ||
iputils-ping \ | ||
ufw \ | ||
iproute2 | ||
msg_ok "Installed Dependencies" | ||
|
||
msg_info "Disabling systemd autostart" | ||
mkdir -p /etc/systemd/system-preset | ||
echo "disable *" > /etc/systemd/system-preset/99-no-autostart.preset | ||
SunFlowerOwl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
msg_ok "Disabled systemd autostart" | ||
|
||
msg_info "Installing Transmission" | ||
$STD apt-get install -y transmission-daemon | ||
msg_ok "Installed Transmission" | ||
|
||
msg_info "Installing Privoxy" | ||
$STD apt-get install -y privoxy | ||
msg_ok "Installed Privoxy" | ||
|
||
msg_info "Enabling systemd autostart" | ||
rm -f /etc/systemd/system-preset/99-no-autostart.preset | ||
systemctl preset-all | ||
msg_ok "Enabled systemd autostart" | ||
|
||
msg_info "Disabling and masking Transmission and Privoxy services" | ||
systemctl disable --now transmission-daemon | ||
systemctl mask transmission-daemon | ||
systemctl disable --now privoxy | ||
systemctl mask privoxy | ||
msg_ok "Transmission and Privoxy services disabled and masked" | ||
|
||
msg_info "Installing Openvpn" | ||
$STD apt-get install -y openvpn | ||
msg_ok "Installed Openvpn" | ||
|
||
msg_info "Installing ${APPLICATION}" | ||
useradd -u 911 -U -d /config -s /usr/sbin/nologin abc | ||
CrazyWolf13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fetch_and_deploy_gh_release "docker-transmission-openvpn" "haugene/docker-transmission-openvpn" "tarball" "latest" "/opt/docker-transmission-openvpn" | ||
mkdir -p /etc/openvpn /etc/transmission /etc/scripts /opt/privoxy | ||
cp -r /opt/docker-transmission-openvpn/openvpn/* /etc/openvpn/ | ||
cp -r /opt/docker-transmission-openvpn/transmission/* /etc/transmission/ | ||
cp -r /opt/docker-transmission-openvpn/scripts/* /etc/scripts/ | ||
cp -r /opt/docker-transmission-openvpn/privoxy/scripts/* /opt/privoxy/ | ||
chmod +x /etc/openvpn/*.sh | ||
chmod +x /etc/scripts/*.sh | ||
chmod +x /opt/privoxy/*.sh | ||
ln -s /usr/bin/transmission-daemon /usr/local/bin/transmission-daemon | ||
msg_ok "Installed ${APPLICATION}" | ||
|
||
msg_info "Support legacy IPTables commands" | ||
SunFlowerOwl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
update-alternatives --set iptables /usr/sbin/iptables-legacy | ||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy | ||
msg_ok "Support legacy IPTables commands" | ||
|
||
msg_info "Creating Service" | ||
mkdir -p /opt/transmission-openvpn | ||
cat <<EOF > "/opt/transmission-openvpn/.env" | ||
OPENVPN_USERNAME="username" | ||
OPENVPN_PASSWORD="password" | ||
OPENVPN_PROVIDER="PIA" | ||
OPENVPN_CONFIG=france | ||
OPENVPN_OPTS="--inactive 3600 --ping 10 --ping-exit 60 --mute-replay-warnings" | ||
CUSTOM_OPENVPN_CONFIG_DIR="/opt/transmission-openvpn" | ||
GLOBAL_APPLY_PERMISSIONS="true" | ||
TRANSMISSION_HOME="/config/transmission-home" | ||
TRANSMISSION_RPC_PORT="9091" | ||
TRANSMISSION_RPC_USERNAME="" | ||
TRANSMISSION_RPC_PASSWORD="" | ||
TRANSMISSION_DOWNLOAD_DIR="/data/complete" | ||
TRANSMISSION_INCOMPLETE_DIR="/data/incomplete" | ||
TRANSMISSION_WATCH_DIR="/data/watch" | ||
TRANSMISSION_WEB_UI="" | ||
TRANSMISSION_UMASK="2" | ||
TRANSMISSION_RATIO_LIMIT_ENABLED="true" | ||
TRANSMISSION_RATIO_LIMIT="0" | ||
TRANSMISSION_RPC_WHITELIST_ENABLED="false" | ||
TRANSMISSION_RPC_WHITELIST="127.0.0.1,192.168.*.*" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldnt that include all private Networks (10.0.0.0/8 and 172.16.0.0/12)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have to admit that Iβm not a network expert, and I donβt know the specific details of these IP addresses. However, I think it depends on your network configuration. What Iβm providing here is just a minimal configuration to access the main application on a standard local network. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my point of view, it may be unconventional, and it should be left to users as a custom configuration if they want more. But I may be wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont know either, but i have a 10.0.0.0/8 address range in my lan. would this work out of the box for me or not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, I will. I just need do work on something else before but soon I will try to suggest something |
||
CREATE_TUN_DEVICE="false" | ||
ENABLE_UFW="false" | ||
UFW_ALLOW_GW_NET="false" | ||
UFW_EXTRA_PORTS="" | ||
UFW_DISABLE_IPTABLES_REJECT="false" | ||
PUID="911" | ||
PGID="" | ||
PEER_DNS="true" | ||
PEER_DNS_PIN_ROUTES="true" | ||
DROP_DEFAULT_ROUTE="" | ||
WEBPROXY_ENABLED="true" | ||
WEBPROXY_PORT="8118" | ||
WEBPROXY_BIND_ADDRESS="" | ||
WEBPROXY_USERNAME="" | ||
WEBPROXY_PASSWORD="" | ||
LOG_TO_STDOUT="false" | ||
HEALTH_CHECK_HOST="google.com" | ||
SELFHEAL="false" | ||
EOF | ||
|
||
cat <<EOF > /etc/systemd/system/openvpn-custom.service | ||
[Unit] | ||
Description=Custom OpenVPN start service | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/etc/openvpn/start.sh | ||
Restart=on-failure | ||
RestartSec=5 | ||
EnvironmentFile=/opt/transmission-openvpn/.env | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
systemctl enable --now -q openvpn-custom.service | ||
msg_ok "Created Service" | ||
|
||
motd_ssh | ||
customize | ||
|
||
msg_info "Cleaning up" | ||
$STD apt-get -y autoremove | ||
$STD apt-get -y autoclean | ||
rm -rf /opt/docker-transmission-openvpn | ||
msg_ok "Cleaned" |
Uh oh!
There was an error while loading. Please reload this page.