Last active
February 27, 2025 10:16
-
-
Save h0tw1r3/ccf7668552fae5d14148 to your computer and use it in GitHub Desktop.
Aria2c systemd service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Systemd User Service cannot contain neither
User=
orGroup=
line,otherwise it could result error like
"aria2.service: Failed to determine supplementary groups: Operation not permitted"
I just google this bug for hours, before realizing that user service cannot use any group (even user itselves' group).