Skip to content

Instantly share code, notes, and snippets.

@RuofengX
Forked from h0tw1r3/aria2.daemon
Last active February 19, 2025 14:17
Show Gist options
  • Save RuofengX/e838b4b11af0b022f1895b3a63f41997 to your computer and use it in GitHub Desktop.
Save RuofengX/e838b4b11af0b022f1895b3a63f41997 to your computer and use it in GitHub Desktop.
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=falloc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
rpc-allow-origin-all=true
rpc-secret=YouShouldChangeThis
input-file=/var/tmp/aria2c.session
save-session=/var/tmp/aria2c.session
# Override or Change User and Group per your local environment
[Unit]
Description=Aria2c download manager
After=network.target
[Service]
Type=simple
User=www-data # comment this line when running in systemd user mode
Group=www-data # also comment this line when running in systemd user mode
ExecStartPre=/usr/bin/env touch /var/tmp/aria2c.session
ExecStart=/usr/bin/aria2c --console-log-level=warn --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
TimeoutStopSec=20
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