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.
✅ For this guide we assume you have already completed the Quick Start guide.
Step 1 - Move Dingo Binary and Configuration
Section titled “Step 1 - Move Dingo Binary and Configuration”We will move the Dingo binary to /usr/local/bin/ and the configuration to /etc/dingo/ so they are accessible system-wide.
Copy the binary:
sudo cp ~/dingo/dingo /usr/local/bin/✅ You can verify the binary was copied by running
which dingo
Create the config directory and copy the configuration:
sudo mkdir -p /etc/dingosudo cp ~/dingo/dingo.yaml /etc/dingo/Step 2 - Update Paths in dingo.yaml
Section titled “Step 2 - Update Paths in dingo.yaml”Since the service will run as your user but the config is now in /etc/dingo/, we need to make sure the database and socket paths use absolute paths. Run the following to regenerate the config with your $HOME expanded:
sudo bash -c "cat <<EOF > /etc/dingo/dingo.yaml# Databasedatabase: blob: plugin: \"badger\" badger: block-cache-size: 0 compression: false data-dir: \"$HOME/dingo/.dingo/badger\" gc: true index-cache-size: 0 metadata: plugin: \"sqlite\" sqlite: data-dir: \"$HOME/dingo/.dingo/metadata.db\"databasePath: \"$HOME/dingo/.dingo\"
# Mempool# `mempoolCapacity` is an optional override, not a required setting.# Default: 1 MiB for Praos mode and normal serve mode, and 25 MiB for Leios mode.# Leave the key commented or omit it to use the mode default.# mempoolCapacity: 1048576
# Mithrilmithril: aggregatorUrl: \"\" cleanupAfterLoad: true enabled: true verifyCertificates: true
# NetworkbindAddr: \"0.0.0.0\"metricsPort: 12798debugPort: 0network: \"preview\"privateBindAddr: \"127.0.0.1\"privatePort: 3002relayPort: 3001socketPath: \"$HOME/dingo/dingo.socket\"
# StoragebarkBaseUrl: \"\"barkPort: 0barkPrunerFrequency: 1hblockfrostPort: 0meshPort: 0storageMode: \"core\"utxorpcPort: 0EOF"📝 SQLite remains the simple documented default for
metadata, and v0.46.4 improves metadata path performance for this default setup.
📝 If a systemd managed node uses
mysqlorpostgresformetadata, v0.46.4 now lets genesis bootstrap complete on preview, preprod, and custom devnets whose genesis files include initial pools, delegations, or DReps. This matters on non mainnet networks because their genesis state exercises these paths.
📝 v0.46.4 also improves repeated or resumed genesis bootstrap behavior across
sqlite,mysql, andpostgreswhen genesis governance state is present.
📝 Operators who want Blockfrost compatible HTTP endpoints must switch to API capable storage and set
blockfrostPortto a non zero value.
storageMode: "api"blockfrostPort: 3000Step 3 - Bootstrap from Mithril (First Run Only)
Section titled “Step 3 - Bootstrap from Mithril (First Run Only)”Before starting the service for the first time, bootstrap the database from a Mithril snapshot:
dingo mithril sync --config /etc/dingo/dingo.yamlThis downloads and loads a snapshot, saving hours of sync time. See Step 4 of the Quick Start guide for details.
📝
dingo mithril syncnow exposes Prometheus progress metrics on the configuredmetricsPortwhile the bootstrap runs. With the example config above, operators can monitor temporary bootstrap metrics on port12798beforedingo servestarts undersystemd.
📝 You only need to do this once. After the initial bootstrap, the systemd service will keep the node synced.
Step 4 - Create dingo.service Unit File
Section titled “Step 4 - Create dingo.service Unit File”Create the systemd service file. Replace YOUR_USER with your username (echo $USER):
cat <<ENDFILE | sudo tee /etc/systemd/system/dingo.service > /dev/null[Unit]Description=Dingo NodeAfter=network-online.target
[Service]Type=simpleRestart=on-failureRestartSec=10User=YOUR_USERExecStart=/usr/local/bin/dingo serve --config /etc/dingo/dingo.yamlSyslogIdentifier=dingoTimeoutStopSec=5
[Install]WantedBy=multi-user.targetENDFILE⚠️
debugPortcontrols a separate optionalpproflistener, not themetricsPortendpoint. Leave it at0by default and enable it only for temporary profiling or debugging.
Step 5 - Enable and Start the Service
Section titled “Step 5 - Enable and Start the Service”Enable the service to start on boot and start it now:
sudo systemctl enable dingo.servicesudo systemctl start dingo.serviceStep 6 - Check Status
Section titled “Step 6 - Check Status”Verify the service is running:
sudo systemctl status dingo.serviceTo follow the logs in real time:
sudo journalctl -u dingo -fTo see recent logs if there is an error:
sudo journalctl -u dingo -n 50 --no-pager