This forum is a read-only archive. Posting, replying and signing in are disabled.

Starting ALGOD as systemd Service

itchibahn

I got the node installed and works fine, but I have to manually start the node. I followed the instruction Installing algod as a systemd service at Install a node - Algorand Developer Portal
./systemd-setup.sh, but I can’t seem to get it to auto-start on boot. Please help.

My node is installed using quick-algo script from Use Quick-Algo to Start Running an Algorand Node in Under 1 Minute | Algorand Developer Portal.

Node folder: /home/itchibahn/node
User: itchibahn
Group: itchibahn

I’ve ran ./systemd-setup.sh itchibahn itchibahn /home/itchibahn/node (I’ve also tried as root:root)
which created /lib/systemd/system/algorand@.service

[Unit]
Description=Algorand daemon under %I
After=network.target
AssertPathExists=%I

[Service]
ExecStartPre=bash -c "[[ ! -f %I/system.json ]] && echo '{\"shared_server\":true,\"systemd_managed\":true}' > %I/system.json || :"
ExecStart=/home/itchibahn/node/algod -d %I
User=itchibahn
Group=itchibahn
Restart=always
RestartSec=5s
ProtectSystem=false

[Install]
WantedBy=multi-user.target
✔ Solved by fabrice in post #2
itchibahn

Thank you for a reply.

I’m not getting any error message on “sudo systemctl start algorand”, and didn’t work.
But “sudo systemctl enable algorand@$(systemd-escape $ALGORAND_DATA)” did the trick.

Thanks !!!