Linux - Cardano Node Installation
Complete guide for installing a Cardano Node on Debian 12 with the NIX package manager, including service configuration and monitoring.
Setup Steps
Install System Dependencies
Installation of required system packages for the NIX package manager installation.
Install system dependencies
sudo apt update && sudo apt install -y git tmux curlInstall NIX Package Manager
Installation of the NIX package manager for managing Cardano Node dependencies.
Install NIX package manager
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemonRestart system
rebootA restart is required after NIX installation
Configure NIX for Cardano
Configuration of the NIX package manager with official IOHK binary caches for optimized downloads.
Edit NIX configuration
Restart NIX daemon
systemctl restart nix-daemon.serviceCreate Cardano User
Creating a dedicated user for Cardano Node operation.
Create Cardano user
sudo useradd -m -s /bin/bash cardanoInstall Cardano Node
Installation of Cardano Node and CLI tools via the NIX system.
Switch to Cardano user
sudo -i -u cardanoClone Cardano Node repository
git clone https://github.com/IntersectMBO/cardano-nodeChange to Cardano Node directory
cd cardano-nodeDisplay available versions
git tag | sort -VCheckout current stable version
git switch -d tags/10.4.1Install Cardano Node and CLI in NIX profile
nix profile install .#cardano-node .#cardano-cliThis can take 30-60 minutes as all dependencies are compiled
Create System Symlinks
Creating symlinks for system-wide access to Cardano tools.
Create symlink for Cardano Node
sudo ln -sf /home/cardano/.nix-profile/bin/cardano-node /usr/local/bin/cardano-nodeCreate symlink for Cardano CLI
sudo ln -sf /home/cardano/.nix-profile/bin/cardano-cli /usr/local/bin/cardano-cliAdjust the path according to your NIX profile
Download Node Configuration
Download of official Cardano network configuration files.
Switch to Cardano user
sudo -i -u cardanoCreate configuration directories
mkdir -p ~/cardano-config ~/cardano-dbChange to configuration directory
cd ~/cardano-configDownload 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"Setup Systemd Service
Configuration of Cardano Node as systemd service for automatic startup.
Create systemd service file
Reload systemd manager
systemctl daemon-reloadEnable Cardano Node service
systemctl enable cardano-nodeStart Cardano Node service
systemctl start cardano-nodeSetup Node Monitoring
Monitoring node logs and synchronization process.
Follow service logs
journalctl -u cardano-node -fCheck synchronization progress
cardano-cli query tip --socket-path /home/cardano/cardano-db/node.socket --mainnetInitial blockchain synchronization can take 24-48 hours
Additional Tips
Useful commands and tips for better management
Synchronization Monitoring
Check synchronization status
systemctl status cardano-nodeDisplay current blockchain size
du -sh /home/cardano/cardano-dbService Management
Restart Cardano Node service
systemctl restart cardano-nodeStop Cardano Node service
systemctl stop cardano-nodeTroubleshooting
Display full logs
journalctl -u cardano-node --no-pager -lCheck Cardano Node process
ps aux | grep cardano