Skip to content

Instantly share code, notes, and snippets.

@h0tw1r3
Last active April 16, 2024 22:30
Show Gist options
  • Star 79 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save h0tw1r3/ccf7668552fae5d14148 to your computer and use it in GitHub Desktop.
Save h0tw1r3/ccf7668552fae5d14148 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
Group=www-data
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
@h0tw1r3
Copy link
Author

h0tw1r3 commented May 28, 2023

@tazihad if you're going to use it as a user service, change --conf-path in ExecStart to the path where aria2.daemon will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment