Linux - Cardano DB Sync Installation
Complete guide for installing Cardano DB Sync on Debian 12 with PostgreSQL database and NIX package manager, including service configuration
Debian 12Cardano DB SyncPostgreSQLNIXBlockchainDatabase
Important Notes
Please note these important points before setup
Cardano Node
A running Cardano Node is required for DB Sync
Disk Space
At least 700GB free disk space (Cardano Node: 203GB, DB Sync: 10GB, PostgreSQL: 438GB)
RAM Requirement
At least 48GB RAM (Cardano Node: 24GB, DB Sync: 21GB, System: 3GB)
Synchronization Time
Initial synchronization can take several days
Root Access
Root access or sudo permission required
Setup Steps
Install PostgreSQL and additional extensions
Enable PostgreSQL service for automatic startup
Start PostgreSQL service
Connect to PostgreSQL console as postgres user
Create Cardano database user with password
Note: Use a strong, secure password
Create Cardano Explorer database
Grant all privileges for the database
Exit PostgreSQL console
Switch to cardano user account
Clone Cardano DB Sync repository
List files in cardano directory
Change to cardano-db-sync directory
List available version tags
Switch to specific version tag
Install Cardano DB Sync with NIX
Note: This installation may take some time
Verify installation by checking version
List installed NIX profiles
~/cardano-config/.pgpass.pgpass
Set file permissions for security
Exit cardano user account
Create system-wide symbolic link
Test symbolic link by checking version
/etc/systemd/system/cardano-db-sync.servicecardano-db-sync.service
Reload systemd for new service
Enable service for automatic startup
Start Cardano DB Sync service
Check service status
Follow service logs in real-time
Additional Tips
Useful commands and tips for better management
Additional Resources
Official documentation and helpful links
Cardano DB Sync Installation Complete!
Your Cardano DB Sync is now running and synchronizing blockchain data to the PostgreSQL database. Monitor logs and synchronization progress regularly.