DELTE--Basic Node Setup & Management on Linux

Technical discussion about nodes, wallets, transfers, miners, etc.
mqpickens
Posts: 48
Joined: Sat Jun 04, 2022 11:38 pm

DELTE--Basic Node Setup & Management on Linux

Post by mqpickens »

Hardware Requirements
  • 4GB or 8GB Minimum of RAM w\ 32 or 64 bit OS Respectively
  • 10GB + sufficient space for an ever growing blockchain
    • 250GB recommended; 500GB+ to play it safe

Below are the Linux commands for the initial setup of your own microcurrency node. This has been
tested on Debian 11+. Make sure to compile and verify your own binaries. This guide assumes you
already have your trusted binaries prepared and ready to go.


Update/Upgrade
  • sudo apt-get -y update
  • sudo apt-get -y upgrade
Install Packages
  • sudo apt-get -y install wget psmisc
Download, Verify Checksum, and Uncompressed the Binaries for the correct CPU & OS Install Binaries
  • sudo install -m 0755 -o root -g root -t /usr/bin bitcoin-install/bin/*
Prepare Service Configuration
  • cat << EOF | sudo tee /etc/systemd/system/bitcoind.service
    [Unit]
    Description=Bitcoin daemon
    After=network-online.target
    Wants=network-online.target

    [Service]
    ExecStart=/usr/bin/bitcoind -micro -daemonwait -pid=/run/bitcoin/bitcoind.pid -conf=/etc/bitcoin.conf -datadir=/var/lib/bitcoin
    ExecStop=/usr/bin/bitcoin-cli -micro -conf=/etc/bitcoin.conf -datadir=/var/lib/bitcoin stop

    Type=forking
    PIDFile=/run/bitcoin/bitcoind.pid
    Restart=always
    RestartSec=30
    TimeoutStartSec=infinity
    TimeoutStopSec=600

    ### Run as bitcoin:bitcoin ###
    User=bitcoin
    Group=bitcoin

    ### /run/bitcoin ###
    RuntimeDirectory=bitcoin
    RuntimeDirectoryMode=0710

    ### /var/lib/bitcoin ###
    StateDirectory=bitcoin
    StateDirectoryMode=0710

    ### Hardening measures ###
    PrivateTmp=true
    ProtectSystem=full
    ProtectHome=true
    NoNewPrivileges=true
    PrivateDevices=true
    MemoryDenyWriteExecute=true

    [Install]
    WantedBy=multi-user.target
    EOF
  • sudo systemctl daemon-reload # Reload the new service configuration
Create a bitcoin System User
  • sudo useradd --system --shell=/sbin/nologin bitcoin
Wrap the Bitcoin CLI Binary with its Runtime Configuration
  • alias btc="sudo -u bitcoin /usr/bin/bitcoin-cli -micro -datadir=/var/lib/bitcoin -conf=/etc/bitcoin.conf"
  • echo "alias btc=\"sudo -u bitcoin /usr/bin/bitcoin-cli -micro -datadir=/var/lib/bitcoin -conf=/etc/bitcoin.conf\"" | sudo tee -a /etc/bash.bashrc # Reestablish alias @ boot
Generate Bitcoin Configuration File with the Appropriate Permissions
  • cat << EOF | sudo tee /etc/bitcoin.conf
    #server=0 # Accept JSON-RPC commands.
    #rpcuser=satoshi # Username for JSON-RPC connections.
    #rpcpassword=bitcoin # Password for JSON-RPC connections.
    #rpcauth=satoshi:e826...267$R07...070d # Username and hashed password for JSON-RPC connections
    #rest=0 # Accept public REST requests.
    #txindex=0 # Maintain a full transaction index.
    [micro]
    #### Add nodes here via ssh tunneling (e.g. addnode=localhost:19335). ####
    EOF
  • sudo chown root:bitcoin /etc/bitcoin.conf
  • sudo chmod 640 /etc/bitcoin.conf
Configure bitcoind's Log Files; Prevents them from Filling up the Partition
  • cat << EOF | sudo tee /etc/logrotate.d/bitcoin
    /var/lib/bitcoin/micro/debug.log {
    $(printf '\t')create 660 root bitcoin
    $(printf '\t')daily
    $(printf '\t')rotate 14
    $(printf '\t')compress
    $(printf '\t')delaycompress
    $(printf '\t')sharedscripts
    $(printf '\t')postrotate
    $(printf '\t')$(printf '\t')killall -HUP bitcoind
    $(printf '\t')endscript
    }
    EOF
Setup a Symbolic Link to Standardize the Location of bitcoind's Log Files
  • sudo mkdir -p /var/log/bitcoin/micro
  • sudo ln -s /var/lib/bitcoin/micro/debug.log /var/log/bitcoin/micro/debug.log
  • sudo chown root:bitcoin -R /var/log/bitcoin
  • sudo chmod 660 -R /var/log/bitcoin
Enable System Control for bitcoin and Start it Now
  • sudo systemctl enable bitcoind --now
############## System Controls for bitcoind #################
  • sudo systemctl status bitcoind # See system control status for bitcoind
  • sudo systemctl enable bitcoind # Enable @ boot and enable auto-restart
  • sudo systemctl disable bitcoind # Disable @ boot and disable auto-restart
  • sudo systemctl disable bitcoind --now # Disable system control for bitcoin and stop it now
  • sudo systemctl start bitcoind# Start the service
  • sudo systemctl stop bitcoind# Stop the service
  • sudo cat /var/log/bitcoin/micro/debug.log # Read latest debug log file
  • sudo ls -all /var/lib/bitcoin/micro | grep "debug" # View all (archived) debug log files
Last edited by mqpickens on Sun Jul 16, 2023 1:48 pm, edited 56 times in total.
mqpickens
Posts: 48
Joined: Sat Jun 04, 2022 11:38 pm

Static IP and Dynamic DNS

Post by mqpickens »

~~~~~~~~~~~~~~~~~~~~~~~~ Static IP and Dynamic Node ~~~~~~~~~~~~~~~

Network Requirements
  • Static External IP: Negotiate with the ISP for a guaranteed static IP!
    • May need to update to a business account
    • May need to pay a little more each month
    • Configurable Router w\ Decent Firewall:
      • Setup a Static Internal IP just for the node
      • Setup port forwarding (i.e. External-IP:19333 to Internal-IP:19333)
    Step 4: Prevent NetworkManager from randomly disconnect wifi
    Last edited by mqpickens on Tue May 09, 2023 10:31 pm, edited 6 times in total.
    mqpickens
    Posts: 48
    Joined: Sat Jun 04, 2022 11:38 pm

    DELETE ME

    Post by mqpickens »

    asdf
    Last edited by mqpickens on Tue May 16, 2023 10:08 pm, edited 45 times in total.
    mqpickens
    Posts: 48
    Joined: Sat Jun 04, 2022 11:38 pm

    P2P "Connection" Cards (2” x 3.5”)

    Post by mqpickens »

    Create P2P (2” x 3.5”) "Connection" Cards. Example:
    Bitcoin of Arizona
    AZ Money P2P Node Connection
    Mitch Atkinson & Michael Pickens
    Date: 4/27/2023
    QR Codes:
    Name: BTCofAZ_MPickens_MAtkinson_04272023
    Address: p2p.btcofaz.com:22
    P2P Public Key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILTQSLjgO9MVUBl65ZqX8XoXqrRCnqB8ZoPApOBPv514
    Host Public Key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJCVpZALmNJ3FTmrzBs3bQ69T/l+VSh3AQAqHiA5bVgG

    Descriptive Name
    Address:port
    P2P Public Key
    cat /root/.ssh/p2pkey.pub
    Server Public Key
    ssh-keyscan -t ed25519 localhost
    Last edited by mqpickens on Tue May 09, 2023 10:26 pm, edited 1 time in total.
    mqpickens
    Posts: 48
    Joined: Sat Jun 04, 2022 11:38 pm

    Establish P2P SSH Connection

    Post by mqpickens »

    sudo apt-get -y install python
    btc disconnectnode "" 0 # Node ID ------- Hey, just a quick note how to boot a connection

    ~~~~~~~~~~~~~~~~~~~~~~ script TEST inputs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    NAME=BTCofAZns_MAtkinson_04272023
    TARGET=localhost
    TARGET_PORT=22
    P2PPUB="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHyvKfiFuFZxVi+tziPV+KflsDEOQmRCBF++MIbcVNf1"
    HOSTPUB="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2WKnGIRkPsVS7SXJafEa8GEuMSWAS6DKgErDD6d4Ct"


    ~~~~~~~~~~~~~~~~~~~~~~ Start of script - Make Connection ~~~~~~~~~~~~~~~~~~~~~~~~~~
    HOSTPUBSCAN=$(ssh-keyscan -H -t ed25519 -p "$TARGET_PORT" "$TARGET")
    if [[ ! "$HOSTPUBSCAN" == *"$HOSTPUB"* ]]; then
    echo -e "\nCould not connect to ${NAME} or could not validate the given public host key"
    echo "${HOSTPUBSCAN}"
    exit 1
    fi

    echo -e "\nMake the new peer's node ${NAME} known to this node"
    echo "${HOSTPUBSCAN} # ${TARGET}:${TARGET_PORT} ${NAME}" | sudo tee -a /root/.ssh/known_hosts

    echo -e "\nAuthorize the new peer ${NAME} to connect to this node"
    echo "${P2PPUB} # ${TARGET}:${TARGET_PORT} ${NAME}" | sudo tee -a /home/p2p/.ssh/authorized_keys

    echo -e "\nQuery the Kernel for an unused port to use for tunneling"
    LOCAL_PORT=$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')
    echo "Got one! Will use port ${LOCAL_PORT} for ssh tunneling to connect with ${NAME}"

    echo -e "\nCreate a new environment file (/etc/default/p2pssh@$NAME) for systemctl p2pssh@ tunnel service"
    sudo cat << EOF > /etc/default/p2pssh@$NAME
    #~~~ ${NAME} ~~~#
    TARGET=$TARGET
    TARGET_PORT=$TARGET_PORT
    LOCAL_PORT=$LOCAL_PORT
    EOF

    echo -e "\nEnable this new tunnel between this node and the new peer and start it up immediately"
    sudo systemctl enable p2pssh@${NAME} --now

    echo -e "\nConnect (via the addnode rpc command) the current bitcoind instance to the new tunnel"
    bitcoin-cli -micro -datadir=/var/lib/bitcoin -conf=/etc/bitcoin.conf addnode ${TARGET}:${LOCAL_PORT} "add"

    echo -e "\nAdd the new tunnel connetion to bitcoin.conf; bitcoind will auto-connect each time it restarts"
    echo "# ${NAME}" | sudo tee -a /etc/bitcoin.conf
    echo "addnode=${TARGET}:${LOCAL_PORT}" | sudo tee -a /etc/bitcoin.conf

    echo -e "\nExit successfully"
    exit 0
    User avatar
    dopabift
    Posts: 2
    Joined: Tue Dec 03, 2024 11:34 pm

    Вакханалии бабок

    Post by dopabift »

    Заглянула сайт и еще случайно увидела этто.

    Шибко

    Яко делать чтоб выслали
    Я хотела пристроится на труд но меня одурачили начальнику надол только моё бабье, вписала видео.
    <a href="td-zks.ru">gay porn club</a>
    gay porn club
    <a href="mp-orbita.ru">porn mums</a>
    porn mums
    <a href="xn-----6kcaca7bktcxjt3aelf5f.xn--p1ai">casino rulette</a>
    casino rulette BDSm porn
    Старенькые мессалины веселятся в течение парилке с юным соседом. Бляди несть дремлют.
    <a href="td-zks.ru">gay porn club</a><a href="td-zks.ru">gay porn club</a><a href="xn-----6kcaca7bktcxjt3aelf5f.xn--p1ai">govnosite</a>
    User avatar
    KirilltSuefe
    Posts: 1
    Joined: Mon Dec 16, 2024 3:47 pm

    Где искать скидки на автокресла: где купить выгодно.

    Post by KirilltSuefe »

    Здравствуйте, ценные покупатели! Сегодня мы поговорим про удобные автокресла, которые удобно заказать у нас в каталоге.
    https://vnauto.ru/


    А также читайте статейки
    купить детское автокресло в москве недорого: https://vnauto.ru/avtokresla-s-funkciej ... roditelej/
    Attachments
    12.gif
    12.gif (9.04 KiB) Viewed 2460 times
    User avatar
    ThelmaOmips
    Posts: 1
    Joined: Fri Dec 13, 2024 12:58 am

    Welcome to our website dedicated to collectible coins!

    Post by ThelmaOmips »

    Here you will find unique collection rare coins from the whole planet. We offer both modern and historical specimens that will become real finds for lovers of numismatics.
    For more information, follow the link 5 копеек 1930
    Our team of experts carefully selects each coin, ensuring authenticity.
    Attachments
    267.gif
    267.gif (3.49 KiB) Viewed 2456 times
    [url=https://numizmatexpert.ru/]юбилейные 10 рублей
    User avatar
    Teresarar
    Posts: 1
    Joined: Thu Dec 19, 2024 12:55 am

    Everything you need for successful cryptocurrency mining!

    Post by Teresarar »

    We offer a large range of high-quality equipment for cryptocurrency mining, including power supplies and accessories from world manufacturers.
    For more information, follow the link майнинг инвестиции
    Our team of employees is ready to help you choose the best solution for your needs, whether you are a beginner miner or an experienced professional.
    Attachments
    190.gif
    190.gif (3.49 KiB) Viewed 2424 times
    [url=https://mining-hosting.ru/]antminer com официальный сайт
    Nebilbugh
    Posts: 2
    Joined: Sat Dec 28, 2024 10:51 am

    О работе и возможностях использования PINCO рабочего зеркала для улучшения своей продуктивности и эффективности в работе

    Post by Nebilbugh »

    На сайте представлено рабочее зеркало для доступа к онлайн-казино пинко, обеспечивающее стабильное подключение к популярным игровым автоматам и азартным развлечениям.
    to wed cache pinco
    Post Reply