diff --git a/ct/amule.sh b/ct/amule.sh new file mode 100644 index 0000000000..74beb8b9ed --- /dev/null +++ b/ct/amule.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Manel (manel) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/amule-org/amule + +APP="aMule" +var_tags="${var_tags:-p2p;ed2k}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" +var_unprivileged="${var_unprivileged:-1}" +export var_amule_password="${var_amule_password:-}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/amule ]]; then + msg_error "No aMule Installation Found!" + exit + fi + + if check_for_gh_release "amule" "amule-org/amule"; then + msg_info "Stopping aMule" + systemctl stop amuled + msg_ok "Stopped aMule" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "amule" "amule-org/amule" "prebuild" "latest" "/opt/amule" "aMule-*-Linux-$(arch_resolve "x64" "arm64")-static.tar.gz" + + msg_info "Starting aMule" + systemctl start amuled + msg_ok "Started aMule" + msg_ok "Updated successfully!" + fi + 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 "${GATEWAY}${BGN}http://${IP}:4713${CL}" +echo -e "${INFO}${YW}Web UI password: AMULE_WEB_PASSWORD in /opt/amule_data/.env${CL}" diff --git a/install/amule-install.sh b/install/amule-install.sh new file mode 100644 index 0000000000..e93430e5ad --- /dev/null +++ b/install/amule-install.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Manel (manel) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/amule-org/amule + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "amule" "amule-org/amule" "prebuild" "latest" "/opt/amule" "aMule-*-Linux-$(arch_resolve "x64" "arm64")-static.tar.gz" + +msg_info "Configuring aMule" +AMULE_PASSWORD=${var_amule_password:-$(random_password)} +EC_PASSWORD=$(random_password) +mkdir -p /root/.aMule /opt/amule_data/{Incoming,Temp} +cat </root/.aMule/amule.conf +[eMule] +Port=4662 +UDPPort=4672 +IncomingDir=/opt/amule_data/Incoming +TempDir=/opt/amule_data/Temp + +[ExternalConnect] +AcceptExternalConnections=1 +ECAddress=127.0.0.1 +ECPort=4712 +ECPassword=$(echo -n "${EC_PASSWORD}" | md5sum | cut -d' ' -f1) + +[AmuleApi] +Enabled=1 +BindAddress=0.0.0.0 +HttpPort=4713 +EOF +cat </root/.aMule/allowed-remote-dirs.dat +/opt/amule_data +EOF +$STD /opt/amule/amuleapi --set-admin-pass-stdin <<<"${AMULE_PASSWORD}" +$STD /opt/amule/amulecmd -h 127.0.0.1 -p 4712 -P "${EC_PASSWORD}" -w +ln -sf /opt/amule/amulecmd /usr/local/bin/amulecmd +# The static musl build reads its CA bundle from the Alpine path +ln -sf /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem +cat </opt/amule_data/.env +AMULE_WEB_PASSWORD=${AMULE_PASSWORD} +AMULE_EC_PASSWORD=${EC_PASSWORD} +EOF +chmod 600 /opt/amule_data/.env +msg_ok "Configured aMule" + +msg_info "Creating aMule Service" +cat </etc/systemd/system/amuled.service +[Unit] +Description=aMule Daemon +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +Environment=HOME=/root +ExecStart=/opt/amule/amuled +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now amuled +msg_ok "Created aMule Service" + +motd_ssh +customize +cleanup_lxc diff --git a/json/amule.json b/json/amule.json new file mode 100644 index 0000000000..2070a29077 --- /dev/null +++ b/json/amule.json @@ -0,0 +1,60 @@ +{ + "name": "aMule", + "slug": "amule", + "categories": [ + 11 + ], + "date_created": "2026-11-20", + "type": "ct", + "platforms": ["pve", "incus"], + "architectures": ["amd64", "arm64"], + "updateable": true, + "privileged": false, + "interface_port": 4713, + "documentation": "https://amule-org.github.io/", + "website": "https://amule-org.github.io/", + "repository": "https://github.com/amule-org/amule", + "logo": "https://cdn.jsdelivr.net/gh/amule-org/amule@master/org.amule.aMule.png", + "description": "aMule is a peer-to-peer file sharing client for the eD2k and Kad networks. It runs headless as a daemon and is controlled from a web UI, the amulecmd command line, or a remote aMule GUI.", + "install_methods": [ + { + "type": "default", + "script": "ct/amule.sh", + "config_path": "/root/.aMule/amule.conf", + "resources": { + "cpu": 2, + "ram": 512, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "app_vars": [ + { + "name": "var_amule_password", + "label": "Web UI Password", + "type": "password", + "secret": true, + "help": "Generated when left empty" + } + ], + "notes": [ + { + "text": "The web UI password is AMULE_WEB_PASSWORD in /opt/amule_data/.env inside the container.", + "type": "info" + }, + { + "text": "For a HighID, forward 4662/tcp, 4665/udp and 4672/udp from your router to the container. Without it you get a LowID and slower downloads.", + "type": "warning" + }, + { + "text": "Downloads go to /opt/amule_data/Incoming and unfinished files to /opt/amule_data/Temp. To keep them on another storage, add Proxmox mount points at those two paths.", + "type": "info" + } + ] +}