Skip to content

Create Startup Service

A Cardano blockchain data node written in Go which actively participates in network communications on the Cardano blockchain using the Ouroboros Network Node-to-Node family of mini-protocols.

⚠️ This is a work in progress and is currently under heavy development



For this guide we will walk you through setting up a systemd service. Using a systemd service to run a Dingo Node maximizes the uptime by automatically restarting the Dingo node when the computer reboots. To get started follow the steps below.


✅ This guide assumes typical Linux setup. Please adjust commands and paths as needed.



Best Practices: Since we will be using a systemd to startup Dingo we will move our Dingo binary to the /usr/local/bin/ and our dingo.yaml to the /etc/dingo/ directory by running the following:


⚠️ Please adjust paths below. Paths are based on our Quick Start guide and USER=test.

💡 Tip: to find your path to the Dingo binary, navigate to your Dingo binary directory, then you can run the realpath dingo command.

sudo mv /home/test/dingo/dingo /usr/local/bin/

✅ You can check that Dingo binary was moved by running which dingo


Now we will create the /etc/dingo/ directory:

sudo mkdir /etc/dingo/

Then we will move our dingo.yaml file to the /etc/dingo/:

sudo mv /home/test/dingo/dingo.yaml /etc/dingo/


Now we will edit our dingo.yaml file to update the following paths since we moved our yaml to /etc/dingo/.


We will need to edit the following paths below: cardanoConfig:, databasePath:, socketPath:, and topology:.

✅ Please adjust as needed with correct paths to match your username and directories.

# Example config file for dingo
# The values shown below correspond to the in-code defaults
# Public bind address for the Dingo server
bindAddr: "0.0.0.0"
# Path to the Cardano node configuration file
#
# Can be overridden with the config environment variable
cardanoConfig: "/home/test/dingo/config/cardano/preview/config.json"
# A directory which contains the ledger database files
databasePath: "/home/test/dingo/dingo"
# Path to the UNIX domain socket file used by the server
socketPath: "/home/test/dingo.socket"
# Name of the Cardano network
network: "preview"
# TLS certificate file path (for HTTPS)
#
# Can be overridden with the TLS_CERT_FILE_PATH environment variable
tlsCertFilePath: ""
# TLS key file path (for HTTPS)
#
# Can be overridden with the TLS_KEY_FILE_PATH environment variable
tlsKeyFilePath: ""
# Path to the topology configuration file for Cardano node
topology: "/home/test/dingo/config/cardano/preview/topology.json"
# TCP port to bind for Prometheus metrics endpoint
metricsPort: 12798
# Internal/private address to bind for listening for Ouroboros NtC
privateBindAddr: "127.0.0.1"
# TCP port to bind for listening for Ouroboros NtC
privatePort: 3002
# TCP port to bind for listening for Ouroboros NtN
#
# Can be overridden with the port environment variable
relayPort: 3001
# TCP port to bind for listening for UTxO RPC
utxorpcPort: 9090
# Ignore prior chain history and start from current tip (default: false)
# This is experimental and may break — use with caution
intersectTip: false
# Maximum cache size in bytes used by BadgerDB for block/index cache
# Default: 1073741824 (1 GB)
badgerCacheSize: 1073741824
# Maximum total size (in bytes) of all transactions allowed in the mempool.
# Transactions exceeding this limit will be rejected.
# Default: 1048576 (1 MB)
mempoolCapacity: 1048576


Step 3 - Create dingo.service Unit Configuration File

Section titled “Step 3 - Create dingo.service Unit Configuration File”

Next, we will write the dingo.service unit configuration file or ‘service’ file, which will be run by systemd.

⚠️ Please adjust the User= line below. In our Quick Start guide we used the user test please adjust this to your username.

💡 Tip: you can run echo $USER command to find your username.

cat <<'ENDFILE' >> /tmp/dingo.service
[Unit]
Description=Dingo Node
After=network-online.target
[Service]
Type=simple
Restart=on-failure
RestartSec=10
User=test
ExecStart=/usr/local/bin/dingo
SyslogIdentifier=dingo
TimeoutStopSec=3
[Install]
WantedBy=multi-user.target
ENDFILE


Move dingo.service to /etc/systemd/system/ so it can operate via systemd by running:

sudo mv /tmp/dingo.service /etc/systemd/system/


Step 5 - Enable the Service and Start Service

Section titled “Step 5 - Enable the Service and Start Service”

Now we will enable the service to run at start and turn it on by running:

sudo systemctl enable dingo.service

Then:

sudo systemctl start dingo.service


You can ensure that dingo.service is active by checking its status by running:

sudo systemctl status dingo.service

If you have an error, you can use the following command to see the error logs:

journalctl -u dingo.service


Congratulations you have setup a startup service for Dingo!

Section titled “Congratulations you have setup a startup service for Dingo!”