Linux - Cardano Node Installation

Complete guide for installing a Cardano Node on Debian 12 with the NIX package manager, including service configuration and monitoring.

Debian 12CardanoNIXBlockchainCryptocurrencyNode

Important Notes

Please note these important points before setup

Hardware Requirements

At least 8GB RAM and 100GB storage for optimal node performance

NIX Daemon Required

The NIX daemon must be correctly installed and started

Disk Space

At least 50GB free disk space required for blockchain data

Synchronization Time

Initial synchronization can take 24-48 hours depending on internet connection

Network Stability

Stable internet connection necessary for continuous synchronization

Setup Steps

Install system dependencies
sudo apt update && sudo apt install -y git tmux curl
Install NIX package manager
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
Restart system
reboot
Verify NIX installation
nix --version

A restart is required after NIX installation

nix.conf
build-users-group = nixbld
experimental-features = nix-command flakes
trusted-users = root cardano
Restart NIX daemon
systemctl restart nix-daemon.service
Create Cardano user
sudo useradd -m -s /bin/bash cardano
Switch to Cardano user
sudo -i -u cardano
Clone Cardano Node repository
git clone https://github.com/IntersectMBO/cardano-node
Change to Cardano Node directory
cd cardano-node
Display available versions
git tag | sort -V
Checkout current stable version
git switch -d tags/10.4.1
Install Cardano Node and CLI in NIX profile
nix profile install .#cardano-node .#cardano-cli
Note: This can take 30-60 minutes as all dependencies are compiled
List installed profiles
nix profile list
Check Cardano Node version
~/.nix-profile/bin/cardano-node --version
Check Cardano CLI version
~/.nix-profile/bin/cardano-cli --version
Switch back to root user
exit
Create symlink for Cardano Node
sudo ln -sf /home/cardano/.nix-profile/bin/cardano-node /usr/local/bin/cardano-node
Create symlink for Cardano CLI
sudo ln -sf /home/cardano/.nix-profile/bin/cardano-cli /usr/local/bin/cardano-cli
Verify symlinks
ls -la /usr/local/bin/cardano-*
Test Cardano Node system-wide
cardano-node --version
Test Cardano CLI system-wide
cardano-cli --version

Adjust the path according to your NIX profile

Switch to Cardano user
sudo -i -u cardano
Create configuration directories
mkdir -p ~/cardano-config ~/cardano-db
Change to configuration directory
cd ~/cardano-config
Download official configuration files
curl -O -J "https://book.play.dev.cardano.org/environments/mainnet/{config,db-sync-config,submit-api-config,topology,byron-genesis,shelley-genesis,alonzo-genesis,conway-genesis,checkpoints}.json"
List downloaded configuration files
ls -lh *.json
Check genesis configuration
head -20 config.json
Switch back to root user
exit
cardano-node.service
[Unit]
Description=Cardano Node
After=network.target

[Service]
User=cardano
Group=cardano
WorkingDirectory=/home/cardano/cardano-config
ExecStart=/usr/local/bin/cardano-node run \
  --topology /home/cardano/cardano-config/topology.json \
  --database-path /home/cardano/cardano-db \
  --socket-path /home/cardano/cardano-db/node.socket \
  --host-addr 0.0.0.0 \
  --port 3001 \
  --config /home/cardano/cardano-config/config.json
Restart=on-failure
RestartSec=10
LimitNOFILE=32768

[Install]
WantedBy=multi-user.target
Reload systemd manager
systemctl daemon-reload
Enable Cardano Node service
systemctl enable cardano-node
Start Cardano Node service
systemctl start cardano-node
Follow service logs
journalctl -u cardano-node -f
Check synchronization progress
cardano-cli query tip --socket-path /home/cardano/cardano-db/node.socket --mainnet

Initial blockchain synchronization can take 24-48 hours

Additional Tips

Useful commands and tips for better management

Installation Complete!

Your Cardano Node is successfully installed and running as systemd service. Blockchain synchronization is running in the background and can take 24-48 hours.