- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 129
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
          
     Merged
      
      
            michelroegl-brunner
  merged 30 commits into
  community-scripts:main
from
SunFlowerOwl:dev/SunFlowerOwl
  
      
      
   
  Oct 15, 2025 
      
    
  
     Merged
                    Changes from 15 commits
      Commits
    
    
            Show all changes
          
          
            30 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      91de209
              
                Create docker-transmission-openvpn application
              
              
                SunFlowerOwl 4022543
              
                Partially addressed review 1
              
              
                SunFlowerOwl 781851a
              
                Fix: Avoid .env generation error
              
              
                SunFlowerOwl 1135f85
              
                Add execute right on image scripts
              
              
                SunFlowerOwl 7050bed
              
                Fix: Force transmission home var
              
              
                SunFlowerOwl 9017776
              
                Fix: unsupported custom app path
              
              
                SunFlowerOwl 7f6ce18
              
                Review: Make .env generation simpler
              
              
                SunFlowerOwl 4ad7f58
              
                Fix: Change cron command causing error due to crlf
              
              
                SunFlowerOwl 27a8345
              
                Review: Rework fetching WebUI
              
              
                SunFlowerOwl 43ce133
              
                Improve cleaning up
              
              
                SunFlowerOwl ab709cd
              
                Add warning message to setup vpn provider
              
              
                SunFlowerOwl 427c264
              
                Rework update function
              
              
                SunFlowerOwl c731ff8
              
                Fix: Change var_tun default value to yes
              
              
                SunFlowerOwl 59758de
              
                Review: Remove Healthcheck cron job
              
              
                SunFlowerOwl 60309db
              
                Review: Directly deploy WebUI to /opt/transmission-ui/
              
              
                SunFlowerOwl 13ff7f0
              
                Make custom config persistent when updating
              
              
                SunFlowerOwl 2a1a39a
              
                Fix: fetch WebUI from correct URL (old one was invalid)
              
              
                SunFlowerOwl 44a131d
              
                Fix: resolve conflicting Privoxy instance
              
              
                SunFlowerOwl b75f9c8
              
                Fix: align binary path when fetching branch vs release
              
              
                SunFlowerOwl e92605b
              
                Security: Remove old and deprecated WebUI for security reasons
              
              
                SunFlowerOwl 28c7298
              
                Review: drop unnecessary packages and optimize implementations
              
              
                SunFlowerOwl 567a209
              
                Review: Implement local network dynamic detection
              
              
                SunFlowerOwl 375909e
              
                CR, OS: Migrate to Debian 13
              
              
                SunFlowerOwl 351f7ed
              
                Merge branch 'community-scripts:main' into dev/SunFlowerOwl
              
              
                SunFlowerOwl e5b5378
              
                Merge branch 'community-scripts:main' into dev/SunFlowerOwl
              
              
                SunFlowerOwl 7cc5d4a
              
                Use quiet mode for several commands as recommended
              
              
                SunFlowerOwl 3be233b
              
                Review: Replace hard coding app name instead of using var $APP
              
              
                SunFlowerOwl a4a5cd4
              
                Review: Reduce amount of msg_blocks
              
              
                SunFlowerOwl 50c52bd
              
                refactor
              
              
                CrazyWolf13 1557a98
              
                refactor
              
              
                CrazyWolf13 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| #!/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 Transmission Web UIs" | ||
| rm -rf /opt/transmission-ui/* | ||
| if check_for_gh_release "flood-for-transmission" "johman10/flood-for-transmission"; then | ||
| fetch_and_deploy_gh_release "flood-for-transmission" "johman10/flood-for-transmission" "tarball" "latest" "/opt/transmission-ui/flood-for-transmission" | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| fi | ||
| if check_for_gh_release "combustion" "Secretmapper/combustion"; then | ||
| fetch_and_deploy_gh_release "combustion" "Secretmapper/combustion" "tarball" "latest" "/opt/transmission-ui/combustion" | ||
| fi | ||
| if check_for_gh_release "transmissionic" "6c65726f79/Transmissionic"; then | ||
| fetch_and_deploy_gh_release "transmissionic" "6c65726f79/Transmissionic" "tarball" "latest" "/opt/transmission-ui/transmissionic" | ||
| fi | ||
| curl -fsSL -o "Shift-master.tar.gz" "https://github.com/killemov/Shift/archive/master.tar.gz" | ||
| tar xzf Shift-master.tar.gz | ||
| mv Shift-master /opt/transmission-ui/shift | ||
| curl -fsSL -o "kettu-master.tar.gz" "https://github.com/endor/kettu/archive/master.tar.gz" | ||
| tar xzf kettu-master.tar.gz | ||
| mv kettu-master /opt/transmission-ui/kettu | ||
| msg_ok "Updated Transmission Web UIs" | ||
|  | ||
| 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 "Updating ${APP} LXC" | ||
| fetch_and_deploy_gh_release "docker-transmission-openvpn" "haugene/docker-transmission-openvpn" "tarball" "latest" "/opt/docker-transmission-openvpn" | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| 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 || true | ||
| chmod +x /etc/scripts/*.sh || true | ||
| chmod +x /opt/privoxy/*.sh || true | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| msg_ok "Updated ${APP} LXC" | ||
|  | ||
| 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 | ||
| rm -f Shift-master.tar.gz | ||
| rm -f kettu-master.tar.gz | ||
| 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}" | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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" | ||
| } | ||
| ] | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| #!/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 \ | ||
| dumb-init \ | ||
| tzdata \ | ||
| dnsutils \ | ||
| iputils-ping \ | ||
| ufw \ | ||
| iproute2 \ | ||
| openssh-client \ | ||
| git \ | ||
| jq \ | ||
| curl \ | ||
| wget \ | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| unrar-free \ | ||
| unzip \ | ||
| bc \ | ||
| systemd | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| msg_ok "Installed Dependencies" | ||
|  | ||
| msg_info "Installing Transmission" | ||
| 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 | ||
| export DEBIAN_FRONTEND=noninteractive | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| $STD apt install -y transmission-daemon | ||
| rm -f /etc/systemd/system-preset/99-no-autostart.preset | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| systemctl preset-all | ||
| systemctl disable --now transmission-daemon | ||
| systemctl mask transmission-daemon | ||
| msg_ok "Installed Transmission" | ||
|  | ||
| msg_info "Installing Openvpn" | ||
| $STD apt-get install -y openvpn | ||
| msg_ok "Installed Openvpn" | ||
|  | ||
| msg_info "Installing Privoxy" | ||
| $STD apt-get install -y privoxy | ||
| msg_ok "Installed Privoxy" | ||
|  | ||
| msg_info "Installing ${APPLICATION}" | ||
| useradd -u 911 -U -d /config -s /usr/sbin/nologin abc | ||
|         
                  CrazyWolf13 marked this conversation as resolved.
              Outdated
          
            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 || true | ||
| chmod +x /etc/scripts/*.sh || true | ||
| chmod +x /opt/privoxy/*.sh || true | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| msg_ok "Installed ${APPLICATION}" | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| msg_info "Support legacy IPTables commands" | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            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 "Installing WebUI" | ||
| mkdir -p /opt/transmission-ui | ||
| curl -fsSL -o "Shift-master.tar.gz" "https://github.com/killemov/Shift/archive/master.tar.gz" | ||
| tar xzf Shift-master.tar.gz | ||
| mv Shift-master /opt/transmission-ui/shift | ||
| curl -fsSL -o "kettu-master.tar.gz" "https://github.com/endor/kettu/archive/master.tar.gz" | ||
| tar xzf kettu-master.tar.gz | ||
| mv kettu-master /opt/transmission-ui/kettu | ||
| fetch_and_deploy_gh_release "flood-for-transmission" "johman10/flood-for-transmission" "tarball" "latest" "/opt/transmission-ui/flood-for-transmission" | ||
| fetch_and_deploy_gh_release "combustion" "Secretmapper/combustion" "tarball" "latest" "/opt/transmission-ui/combustion" | ||
| fetch_and_deploy_gh_release "transmissionic" "6c65726f79/Transmissionic" "tarball" "latest" "/opt/transmission-ui/transmissionic" | ||
| msg_ok "Installed WebUI" | ||
|  | ||
| msg_info "Creating Service" | ||
| mkdir -p /opt/transmission-openvpn | ||
| cat > "/opt/transmission-openvpn/.env" <<EOF | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| 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.*.*" | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| 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 > /etc/systemd/system/openvpn-custom.service <<EOF | ||
|         
                  SunFlowerOwl marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| [Unit] | ||
| Description=Custom OpenVPN start service | ||
| After=network.target | ||
|  | ||
| [Service] | ||
| Type=simple | ||
| ExecStart=/usr/bin/dumb-init /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 | ||
| rm -f Shift-master.tar.gz | ||
| rm -f kettu-master.tar.gz | ||
| msg_ok "Cleaned" | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.