Create a systemd service for YaCy

September 22nd, 2024 – 12:08 pm
Categorized as Computing Notes
Tagged as , ,

Create file /usr/lib/systemd/system/yacy.service and add this content:

[Unit]
Description=YaCy search server
After=network.target
Restart=always

[Service]
Type=forking
User=yacy
ExecStart=/opt/yacy/startYACY.sh
ExecStop=/opt/yacy/stopYACY.sh
Restart=on-failure
RestartSec=1s

[Install]
WantedBy=multi-user.target

Then use systemctl enable yacy.service.