Launching your Cardano BP node!
let's launch your block producing node!
when all the certificates and keys are generated, now we have to adjust the launch script on our block producing node
copy following files to your BP server and place them under /home/$USER/cnode/keys/
    myPool.kes-000.skey
    myPool.vrf.skey
    myPool.node-000.opcert
rename keys to default names so you don't have to edit your script/service config
1
cd ~/cnode/keys
2
mv myPool.kes-000.skey myPool.kes.skey
3
mv myPool.node-000.opcert myPool.node.opcert
4
5
# setting read only access to ourselves and restrictin any access for other users
6
chmod 400 *
Copied!
there are 2 ways you can launch your node:
    1.
    launching as a script using tmux (recommended only for testnet or for any other non-production server )
    2.
    launching as a system service (RECOMENDED on production servers)
Launching as Systemd Service
Launching from script
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 /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 \
8
--config /home/cardano/cnode/config/mainnet-config.json \
9
--topology /home/cardano/cnode/config/mainnet-topology.json \
10
--database-path /home/cardano/cnode/db/ \
11
--socket-path /home/cardano/cnode/sockets/node.socket \
12
--host-addr 0.0.0.0 \
13
--port 3001 \
14
--shelley-kes-key /home/cardano/cnode/keys/myPool.kes.skey \
15
--shelley-vrf-key /home/cardano/cnode/keys/myPool.vrf.skey \
16
--shelley-operational-certificate /home/cardano/cnode/keys/myPool.node.opcert
17
18
19
KillSignal = SIGINT
20
RestartKillSignal = SIGINT
21
StandardOutput=syslog
22
StandardError=syslog
23
SyslogIdentifier=cardano
24
LimitNOFILE=32768
25
26
27
Restart=on-failure
28
RestartSec=15s
29
WorkingDirectory=~
30
User=cardano
31
Group=cardano
32
[Install]
33
WantedBy=multi-user.target
34
EOF
Copied!
If you haven't previously installed systemd service, then let's do it now and start the cardano node service as a system service
1
sudo systemctl enable cardano-node.service
2
sudo systemctl start cardano-node.service
Copied!
if you have previously already installed systemd service, then you just need to reload the configuration
1
sudo systemctl daemon-reload
Copied!
you can check the cardano nodes live logfile using journalctl
1
journalctl -u cardano-node.service -f -o cat
Copied!
congratulations! you have installed a block-producing node!
1
cd ~/cnode/scripts
2
nano node.sh
Copied!
and add the keys to your launch script
1
#!/bin/bash
2
3
cardano-node run \
4
--database-path ~/cnode/db/ \
5
--socket-path ~/cnode/sockets/node.socket \
6
--host-addr 0.0.0.0 \
7
--port 3000 \
8
--config ~/cnode/config/mainnet-config.json \
9
--topology ~/cnode/config/mainnet-topology.json \
10
--shelley-kes-key ~/cnode/keys/myPool.kes.skey \
11
--shelley-vrf-key ~/cnode/keys/myPool.vrf.skey \
12
--shelley-operational-certificate ~/cnode/keys/myPool.node.opcert
Copied!
save by pressing ctrl+x and then Y
now, just start your node with start_all.sh - you should have a fully functional BP node!
Last modified 5mo ago
Copy link