peaq
Search…
Running peaq node as a service
You may run Agung node as a service by following below steps. This guide assumes you are using the path /var/network as file storage

Step # 1 - Creating a service unit:

Create a file called peaq.service with the following content in /etc/systemd/system/peaq.service
[Unit] Description=Peaq Node
[Service]
User=<enter user e.g. augung>
Group=<enter group e.g. augung>
ExecStart=<directory_of_script e.g. /var/network/start_node.sh>
WorkingDirectory=<path to startup script e.g. /var/network>
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target

Step # 2 - Creating the startup script:

Create a start_node.sh in the path that was mentioned in ExecStart and include the following.
#!/bin/sh ./peaq-node \ --base-path ./chain-data \ --chain agung \ --port 1033 \ --ws-port 9944 \ --rpc-port 9933 \ --rpc-cors all \ --pruning archive \ --name ro_full_node_0
Kindly note the peaq-node file should be placed in the same folder where start_node.sh resides.

Step # 3 :

Reload the service files to include the new service.
sudo systemctl daemon-reload

Step # 4:

Start your service.
sudo systemctl start peaq

Step # 5:

To check the status of your service.
sudo systemctl status peaq