> For the complete documentation index, see [llms.txt](https://apexpool.gitbook.io/stake-pool-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apexpool.gitbook.io/stake-pool-scripts/running-a-cardano-node/starting-a-block-producing-node.md).

# Starting a block producing node

Starting a node in block producing node is similar to starting it in relay mode, with the difference that 3 extra parameters are required:

* the VRF signing key
* the KES signing key
* the operational certificate

These 3 files were creating during the stake pool registration process described in the `Stake pool registration` section above.

In addition to the folders created for the relay node, 2 extra folders will be required for the keys and certificates (actually they can be placed in the same folder, but I prefer keeping them in separate folders, `keys` and `certs`). Run as the `cardano` user:

```bash
mkdir ~/cardano-node ~/cardano-node/bin  ~/cardano-node/config ~/cardano-node/db ~/cardano-node/certs ~/cardano-node/keys
```

After downloading the configuration files to the `~/cardano-node/config` folder, like in the previous section about starting a relay node, copy the operational certificate (`node.cert`) in the `~/cardano-node/certs` folder and the `kes.skey` and `vrf.skey` to the `~/.cardano-node/keys` folder.

Create the `/etc/systemd/system/cardano-node.service` file just like for a relay (as the `cardano` user), but create the `/home/cardano/cardano-node/bin/startNode.sh` with the following content:

```bash
cd ~/cardano-node/bin
cat >startNode.sh<<EOF
#!/bin/bash

DIRECTORY=/home/cardano/cardano-node
PORT=3001
HOSTADDR=0.0.0.0
TOPOLOGY=\${DIRECTORY}/config/topology.json
DB_PATH=\${DIRECTORY}/db
SOCKET_PATH=\${DIRECTORY}/db/node.socket
CONFIG=\${DIRECTORY}/config/config.json
KES=\${DIRECTORY}/keys/kes.skey
VRF=\${DIRECTORY}/keys/vrf.skey
CERT=\${DIRECTORY}/certs/node.cert
cardano-node +RTS -N -RTS run \\
--topology \${TOPOLOGY} \\
--database-path \${DB_PATH} \\
--socket-path \${SOCKET_PATH} \\
--host-addr \${HOSTADDR} \\
--port \${PORT} \\
--config \${CONFIG} \\
--shelley-kes-key \${KES} \\
--shelley-vrf-key \${VRF} \\
--shelley-operational-certificate \${CERT}
EOF
chmod 755 startNode.sh
```

The block producing node should only connect to the relay nodes of the same stake pool (to be able to sync the blockchain from them), and all the relays should also connect to the block producing node, to propagate the transactions to it and to propagate the blocks it mints to other relays in the network.

Starting the block producing node and watching the logs is similar as for the relay node. As root:

```bash
systemctl start cardano-node.service

journalctl -f -u cardano-node.service -n 50
```
