Aria2 creates offline network disk
Official website
Construction conditions:
- Own ladder
- The server should preferably be foreign, which will save a lot of problems
Step 1:
docker runs p3terx / aria2 Pro
docker run -d \ --name aria2-pro \ --restart unless-stopped \ --log-opt max-size=1m \ -e UMASK_SET=022 \ -e RPC_SECRET= <TOKEN>\ -e RPC_PORT=6800 \ -p 6800:6800 \ -e LISTEN_PORT=6888 \ -p 6888:6888 \ -p 6888:6888/udp \ -v ~/aria2-config:/config \ -v ~/rclone-downloads:/downloads \ -e SPECIAL_MODE=rclone \
Description: rclone function is to automatically upload to Google hard disk
reference resources https://hub.docker.com/r/p3terx/aria2-pro
Fill in a secret key and use it later
Linkage RCLONE automatic upload
After the files are downloaded locally, RCLONE is automatically called to upload them to the specified network disk. The files are not retained locally, so as to realize the pseudo offline download of network disks such as OneDrive and Google Drive.
Start the command to join - e special_ Mode = after setting the special mode environment variable with the RCLONE parameter, turn on the automatic upload function of RCLONE. RCLONE will be installed when the container is started for the first time, and will be automatically updated every time it is restarted.
Step 2
First use or want to configure RCLONE
docker exec -it aria2-pro rclone config
reference resources https://www.moerats.com/archives/481/ Follow the steps step by step
If you have used RCLONE before, you can directly copy the configuration file (RCLONE. CONF) to the Aria2 Pro configuration directory. The RCLONE configuration file can be found in the default location of the host: ~ /. config/rclone/rclone.conf
For the first time or to configure Rclone, use the docker exec - it aria2 Pro Rclone config command to enter the Rclone interactive menu option in the container. For the configuration method, refer to the Rclone installation and configuration tutorial.
Modify configuration
Finally, modify the script in the Aria2 Pro configuration file directory according to the actual situation The values of the drive name and drive dir options in the conf file
Enter ~ / aria2 config
Modify script conf
# # Copyright (c) 2018-2020 P3TERX <https://p3terx.com> # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # # https://github.com/P3TERX/aria2.conf # File name: script.conf # Description: Aria2 additional function script configuration file # Version: 2020.08.08 # ## File upload settings(upload.sh) ## # Network disk name (name filled in during RCLONE configuration) drive-name=rclone Just filled in RCLONE name # Network disk directory (upload target directory, folder path in network disk). Note or leave blank as the root directory of the network disk, and there should be no slash at the end. drive-dir=/Rclone Folder name in Google hard drive # Upload log save path. Note or leave blank to not save. #upload-log=/config/upload.log ## File move settings(move.sh) ## # Move target directory dest-dir=/root/rclone-downloads local aria2-pro Downloaded folder # Move log save path. Note or leave blank to not save. #move-log=/config/move.log
If there is no error in the above steps, it means that the setup is successfully downloaded and automatically uploaded to Google hard disk
Step 3
Telegraph BOT controls Aria2 Download
reference resources https://p3terx.com/archives/aria2-telegram-bot-automatically-uploads-to-google-drive-onedrive.html
Get user ID
Send a message to the newly created Bot
visit https://api.telegram.org/bot/getUpdates (replace field), a long string of information will be obtained, in which "ID": the number after the field is the user ID to be obtained.
Send it to the robot you created, and then click it to display uid
Finally, the telegraph BOT controls Aria2 to download and automatically upload to Google Drive