[GH-ISSUE #159] suggestion for Debian 11 Systemd Service #77

Closed
opened 2026-04-08 16:50:12 +03:00 by zhus · 2 comments
Owner

Originally created by @laminux29 on GitHub (Dec 23, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/159

Tested for debian 11

Please loggin as root

1.Create folder for www datas

mkdir -p /www_dufs

2.Create folder for certs

mkdir -p /www_dufs_certsOnly

3.Write a starup script

echo "dufs /www_dufs/ --bind 0.0.0.0 --port 443 --allow-search --enable-cors --tls-key /www_dufs_certsOnly/xx.key --tls-cert /www_dufs_certsOnly/xx.cert >> /var/log/dufs.log" > /startDufs.sh
chmod ugo+rwx /startDufs.sh

4.Write systemd service

tee /etc/systemd/system/dufs.service <<-"EOF"
[Unit]
Description=dufs
After=network.target auditd.service

[Service]
ExecStart=sh /startDufs.sh

[Install]
WantedBy=multi-user.target
EOF

chmod ugo+wrx /etc/systemd/system/dufs.service
systemctl daemon-reload
systemctl enable dufs.service

5.reboot, then dufs service will auto startup on boot.

shutdown -r now

6.Check log:

tail -f /var/log/dufs.log

7.Alive check:

netstat -nlap | grep "LISTEN" | grep ":443"

8.Control Dufs Service:

systemctl status dufs
systemctl start dufs
systemctl restart dufs

Originally created by @laminux29 on GitHub (Dec 23, 2022). Original GitHub issue: https://github.com/sigoden/dufs/issues/159 # Tested for debian 11 # # Please loggin as root # # 1.Create folder for www datas mkdir -p /www_dufs # # 2.Create folder for certs mkdir -p /www_dufs_certsOnly # # 3.Write a starup script echo "dufs /www_dufs/ --bind 0.0.0.0 --port 443 --allow-search --enable-cors --tls-key /www_dufs_certsOnly/xx.key --tls-cert /www_dufs_certsOnly/xx.cert >> /var/log/dufs.log" > /startDufs.sh chmod ugo+rwx /startDufs.sh # # 4.Write systemd service tee /etc/systemd/system/dufs.service <<-"EOF" [Unit] Description=dufs After=network.target auditd.service [Service] ExecStart=sh /startDufs.sh [Install] WantedBy=multi-user.target EOF # chmod ugo+wrx /etc/systemd/system/dufs.service systemctl daemon-reload systemctl enable dufs.service # # 5.reboot, then dufs service will auto startup on boot. shutdown -r now # # 6.Check log: tail -f /var/log/dufs.log # # 7.Alive check: netstat -nlap | grep "LISTEN" | grep ":443" # # 8.Control Dufs Service: systemctl status dufs systemctl start dufs systemctl restart dufs
zhus closed this issue 2026-04-08 16:50:12 +03:00
Author
Owner

@sigoden commented on GitHub (Feb 19, 2023):

Thanks for sharing.

<!-- gh-comment-id:1435834876 --> @sigoden commented on GitHub (Feb 19, 2023): Thanks for sharing.
Author
Owner

@SantaLaMuerte commented on GitHub (Mar 10, 2024):

maybe it can be installed as service ? to run with args like systemctl start dufs -A - by default install with cargo?
? it will be very helpfull

<!-- gh-comment-id:1987001772 --> @SantaLaMuerte commented on GitHub (Mar 10, 2024): maybe it can be installed as service ? to run with args like systemctl start dufs -A - by default install with cargo? ? it will be very helpfull
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#77