Launching Cardano Relay Node
Previously we launched the node in active ssh session, which means, as soon we close the browser, the node will stop working

Launching cardano-node as system service

Launching cardano node as a system service is the recommended way to run the process on production servers.
Launching as Systemd Service
create a systemd service configuration file with all the keys and other settings, so the cardano node process will be running in the background:
1
cat <<EOF | sudo tee -a /etc/systemd/system/cardano-node.service
2
[Unit]
3
Description=Cardano Pool
4
After=multi-user.target
5
[Service]
6
Type=simple
7
ExecStart=/home/cardano/.local/bin/cardano-node run --config /home/cardano/cnode/config/mainnet-config.json --topology /home/cardano/cnode/config/mainnet-topology.json --database-path /home/cardano/cnode/db/ --socket-path /home/cardano/cnode/sockets/node.socket --host-addr 0.0.0.0 --port 3001
8
9
KillSignal = SIGINT
10
RestartKillSignal = SIGINT
11
StandardOutput=syslog
12
StandardError=syslog
13
SyslogIdentifier=cardano
14
LimitNOFILE=32768
15
16
17
Restart=on-failure
18
RestartSec=15s
19
WorkingDirectory=~
20
User=cardano
21
Group=cardano
22
[Install]
23
WantedBy=multi-user.target
24
EOF
Copied!
let's enable the service and start it:
1
sudo systemctl enable cardano-node.service
2
sudo systemctl start cardano-node.service
Copied!
creating and enabling cardano node as system service
Now let's check if our cardano node process is running!
1
journalctl -u cardano-node.service -f -o cat
Copied!
checking cardano-node logfile
We have set up your first relay node!
As a next step - you can do the same for your core/relay server as you need a minimum of 2 servers
1) Relay node, a server that is between your core server and other relay servers, serves as a protection to your core 2) core node (producer): a server which is producing blocks 3) cold PC/hardware wallet: a secure computer on which you are generating Stake Pool Keys and wallets.
Ideally, for each core server, you would have 2 relay servers where they can connect
NEVER, EVER generate your wallet and stake pool keys on your online servers! It's a BAD, BAD practice. Install on your local machine VirtualBox+Ubuntu and do the wallet and key registration (either by hand or using CNTOOLS or Martins SPOS scripts)
if you need any help - you can contact us directly using Telegram: https://t.me/StakePool247help
Last modified 1mo ago
Copy link