Go to file
Com320 22a3b7974a
Merge pull request #2 from Com320/dev
Everything checks out.
2025-04-03 00:59:53 -04:00
legacy major changes to the whole flow 2025-03-07 18:05:45 -05:00
bitcoin-conf-generator.sh fixed minor bits in config generation 2025-03-08 22:30:50 -05:00
build-btcknots.sh typo fix in btcknots configurator 2025-04-02 13:47:34 -04:00
build-datum.sh minor changes for consistency and fixed a bug in the datum builder 2025-03-08 01:22:04 -05:00
datum-config-generator.sh added configs for primary/secondary coinbase tags to settings json and updated the conf gen and readme to accomidate 2025-03-19 15:58:30 -04:00
dependencies.sh changed depends installer to not use sudo 2025-03-08 17:20:37 -05:00
generate-bitcoin-service.sh major changes to the whole flow 2025-03-07 18:05:45 -05:00
generate-datum-service.sh major changes to the whole flow 2025-03-07 18:05:45 -05:00
generate-rpcauth.sh fixed text extraction problem for the rpcauth gen 2025-03-08 22:16:08 -05:00
main.sh added rpcauth-gen and modified other bits to accomidate it's output 2025-03-08 19:04:30 -05:00
README.md added a method verify the signature of the git tag of the btcknots release 2025-04-01 18:15:56 -04:00
settings.json added a method verify the signature of the git tag of the btcknots release 2025-04-01 18:15:56 -04:00
user-setup.sh major changes to the whole flow 2025-03-07 18:05:45 -05:00
verify-git-tag.sh added more verbosity to the verification 2025-04-02 13:16:55 -04:00

DATUM Box Setup Scripts

These scripts automate the setup and configuration of DATUM boxes - dedicated hardware nodes that run Bitcoin Knots and DATUM Gateway.

Overview

This project provides a collection of shell scripts that automate the process of:

  • Setting up a dedicated user for running the Bitcoin and DATUM services
  • Installing necessary dependencies
  • Building Bitcoin Knots from source
  • Building DATUM Gateway from source
  • Generating appropriate configurations for both services
  • Setting up system services for automatic startup

Scripts

  • main.sh - The primary script that orchestrates the entire setup process
  • user-setup.sh - Creates and configures the user account
  • dependencies.sh - Installs all required system dependencies
  • build-btcknots.sh - Builds Bitcoin Knots from source
  • build-datum.sh - Builds DATUM Gateway from source
  • generate-rpcauth.sh - Generates RPC authentication credentials
  • bitcoin-conf-generator.sh - Generates the Bitcoin configuration file
  • datum-config-generator.sh - Generates the DATUM Gateway configuration
  • generate-bitcoin-service.sh - Creates a systemd service for Bitcoin
  • generate-datum-service.sh - Creates a systemd service for DATUM Gateway

Usage

  1. Clone this repository
  2. Review and modify the settings.json file to match your requirements
  3. Run the main.sh script as root NOT SUDO:
./main.sh

Requirements

  • A Debian-based Linux distribution (Ubuntu, Debian, etc.)
  • Root privileges (not sudo)
  • Internet connection for downloading dependencies and source code
  • Sufficient disk space for the Bitcoin blockchain

Configuration

The settings.json file contains key configuration parameters:

  • User account settings (username and creation options)
  • Log directory path
  • Build options:
    • cpu_cores: Number of CPU cores to use during compilation (speeds up build on multi-core systems)
    • bitcoin_knots_tag: GitHub tag to checkout for Bitcoin Knots (default: v28.1.knots20250305)
    • verify_signatures: Whether to verify Git tag signatures for Bitcoin Knots (default: true)
    • key_fingerprint: PGP key fingerprint used to verify signatures (default: 1A3E761F19D2CC7785C5502EA291A2C45D0C504A)
  • DATUM options:
    • coinbase_tag_primary: Primary coinbase tag (default: DATUM)
    • coinbase_tag_secondary: Secondary coinbase tag (default: empty)
  • Required system packages for building and running the services

Please review and customize this file before running the scripts.

Security Features

The build process includes security measures to ensure the integrity of the Bitcoin Knots source code:

  • Signature Verification: The script verifies PGP signatures on Git tags to ensure the Bitcoin Knots source hasn't been tampered with
  • Isolated GPG Environment: Signature verification takes place in an isolated GPG environment to avoid conflicts with existing keys

These features are enabled by default but can be disabled in the settings.json file if needed.

Important Note

Please pay attention to the values generated and refrain from blindly using the settings found here. Always review the generated configurations to ensure they meet your specific requirements and security needs.

Credits

These scripts are based on the work of Bitcoin Mechanic. This version adds an automation layer ontop of the entire workflow process to create a streamlined, repeatable setup experience. Many thanks to Bitcoin Mechanic for his contributions to the Bitcoin community.


For questions or support, please open an issue.