Skip to content

Instantly share code, notes, and snippets.

@vincejv
Last active May 9, 2021 20:09
Show Gist options
  • Save vincejv/73378810cb825360f9d869db933d5e39 to your computer and use it in GitHub Desktop.
Save vincejv/73378810cb825360f9d869db933d5e39 to your computer and use it in GitHub Desktop.
Aria2 Config
#username
#rpc-user=
#Password
#rpc-passwd=111111
#The above authentication method is not recommended, it is recommended to use the following token method
#Set the encryption key
rpc-secret=
#Allow rpc
enable-rpc=true
#Daemonize with HTTPS
#rpc-certificate=aria2.pfx
daemon=true
#rpc-secure=true
#Allow all sources, web interface cross-domain permission required
rpc-allow-origin-all=true
#Allow external access, if false, only monitor the local port
rpc-listen-all=true
#RPC port, modify only when the default port is occupied
rpc-listen-port=6800
#Maximum number of simultaneous downloads (number of tasks), recommended routing value: 3
max-concurrent-downloads=5
#Same server connection
max-connection-per-server=5
#Minimum file fragment size, the upper limit of the number of download threads depends on how many fragments can be divided, which is important for small files
min-split-size=10M
#Maximum number of threads per file, recommended routing value: 5
split=10
#Download speed limit
max-overall-download-limit=0
#Single file speed limit
max-download-limit=0
#Upload speed limit
max-overall-upload-limit=0
#Single file speed limit
max-upload-limit=0
#Disconnect slow connection
#lowest-speed-limit=0
#Verification, requires release version after 1.16.1
#referer=*
#File save path, default is the current startup location
dir=/mnt/smb/192.168.1.3/Shared/downloads
#File cache, use the built-in file cache, if you don’t believe in the Linux kernel file cache and the built-in disk cache
#disk-cache=0
#Another Linux file caching method
#enable-mmap=true
#File pre-allocation, can effectively reduce file fragmentation, improve disk performance. The disadvantage is that the pre-allocation time is longer
file-allocation=none
continue=true
#Logging
log=/opt/logs/aria2/aria2.log
console-log-level=warn
log-level=notice
#Session
input-file=/var/lib/aria2/aria2.session
save-session=/var/lib/aria2/aria2.session
save-session-interval=30
#Hooks
on-download-error=/opt/scripts/aria/dl_fail.sh
on-download-complete=/opt/scripts/aria/dl_done.sh
#Retries
retry-wait=10
max-tries=3
#Disable Seeding
seed-time=0
#User Agent
user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
#Download from https servers with invalid certificates
check-certificate=false
#Enable BT for IP6 (IPv6)
enable-dht6=true
[Unit]
Description=Aria2c download manager
Requires=network.target
After=dhcpcd.service
[Service]
Type=forking
User=aria2
ExecStart=/usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf
ExecReload=/usr/bin/kill -HUP $MAINPID
RestartSec=1min
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment