Run in the background
Run the Node in the Background
touch /etc/systemd/system/core-1.service # create the file nano /etc/systemd/system/core-1.service # open the file (to edit it)[Unit] Description=Persistence Mainnet Node # description of the process running inside the service After=network-online.target # wait for internet connection before starting the process [Service] User=$USER # your system user name ExecStart=$(which persistenceCore) start # command to execute (this will run the node) Restart=always # always maintain the service running by restarting it in case it crashes RestartSec=3 # seconds to wait before restarting LimitNOFILE=4096 # maximum number of processes allowed to run in parallel [Install] WantedBy=multi-user.target # a special target unit for setting up a multi-user systemsystemctl daemon-reload systemctl enable core-1.service # output: Created symlink /etc/systemd/system/multi-user.target.wants/core-1.service → /etc/systemd/system/core-1.servicesystemctl start core-1.servicejournalctl -u core-1.service -fservice core-1.service status
Last updated
Was this helpful?

