Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 2f56a11
Author: Josh Wong <[email protected]>
Date:   Sun May 19 17:10:08 2024 +0900

    Update deploy.yml

commit e03dadf
Merge: 8b5a45d d87caa4
Author: Josh Wong <[email protected]>
Date:   Sun May 19 17:06:45 2024 +0900

    Merge pull request #33 from josh-wong/bitcoin-cash-node-on-raspberry-pi/update-docs

    AUTO: Docs sync - `bitcoin-cash-node-on-raspberry-pi`

commit 8b5a45d
Merge: d6def55 82e636b
Author: Josh Wong <[email protected]>
Date:   Sun May 19 17:06:38 2024 +0900

    Merge pull request #32 from josh-wong/passgen/update-docs

    AUTO: Docs sync - `passgen`

commit d6def55
Merge: 3468bf8 4f2e977
Author: Josh Wong <[email protected]>
Date:   Sun May 19 17:06:30 2024 +0900

    Merge pull request #30 from josh-wong/zune-software-setup/update-docs

    AUTO: Docs sync - `zune-software-setup`

commit d87caa4
Merge: 0e6f2aa a7ab426
Author: Josh Wong <[email protected]>
Date:   Sun May 19 12:39:33 2024 +0900

    Merge branch 'bitcoin-cash-node-on-raspberry-pi/update-docs' of https://github.com/josh-wong/josh-wong.github.io into bitcoin-cash-node-on-raspberry-pi/update-docs

commit a7ab426
Author: josh-wong <[email protected]>
Date:   Sat May 18 07:21:04 2024 +0000

    AUTO: Sync BCHN on Raspberry Pi docs to personal site

commit 82e636b
Author: josh-wong <[email protected]>
Date:   Sat May 18 07:19:34 2024 +0000

    AUTO: Sync passGen docs to personal site

commit 4f2e977
Author: josh-wong <[email protected]>
Date:   Sat May 18 07:18:45 2024 +0000

    AUTO: Sync Zune software setup docs to personal site

commit 0e6f2aa
Author: josh-wong <[email protected]>
Date:   Sat May 18 07:08:07 2024 +0000

    AUTO: Sync BCHN on Raspberry Pi docs to personal site
  • Loading branch information
josh-wong committed May 19, 2024
1 parent 20f85c8 commit 1418042
Show file tree
Hide file tree
Showing 104 changed files with 1,242 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
paths:
- '**'
- '!.github/**'
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory includes images and screenshots for the "How to set up a Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop 21.04" tutorial.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributions

Does this documentation need to be clarified, updated, or otherwise improved upon? If so, pull requests are welcome!

Please do the following:

1. Open an [issue](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/issues) on GitHub and describe what you would like to add or change.
2. Create a pull request and link to your issue. This will help me track changes to the documentation and help provide context for future reference.
24 changes: 24 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How to install, configure, and upgrade Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop

The set of Bitcoin Cash Node tutorials in this section includes instructions for the following:

- [How to install and set up Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop (64-bit)](installation-and-setup/)
- [How to upgrade Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop (64-bit)](upgrade/)

These tutorials are intended for those who are familiar with the Ubuntu environment and Linux commands.

!!! note

I'm using a Raspberry Pi 4 simply to minimize carbon footprint while still contributing to the health and decentralization of Bitcoin Cash. However, these instructions should work on other types of devices running Ubuntu Desktop.

## Introduction to Bitcoin Cash Node

[Bitcoin Cash Node](https://bitcoincashnode.org/) is a node and wallet implementation for the Bitcoin Cash network. The software downloads and, by default, stores the entire history of Bitcoin Cash transactions, which requires a few hundred gigabytes of disk space. Depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to few days.

## Benefits of running Bitcoin Cash Node

- Promote electronic peer-to-peer payments through active involvement.
- Contribute to the Bitcoin Cash network by letting others to use your node to broadcast transactions.
- Further decentralize the Bitcoin Cash blockchain, thereby improving reliability and security.
- Improve your understanding of how the blockchain technology of a top cryptocurrency works.
- Be part of the growing, passionate Bitcoin Cash community.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Preparing our device

This tutorial assumes that we have already installed and configured Ubuntu Desktop on our Raspberry Pi to our liking and have mounted the SSD to our Raspberry Pi.

1. **For details on installing Ubuntu Desktop (64-bit) on your Raspberry Pi**, please see [How to install Ubuntu Desktop on Raspberry Pi 4](https://ubuntu.com/tutorials/how-to-install-ubuntu-desktop-on-raspberry-pi-4#1-overview).
2. **For details on automounting your SSD in Ubuntu**, please see [How to properly automount a drive in Ubuntu Linux](https://www.techrepublic.com/article/how-to-properly-automount-a-drive-in-ubuntu-linux/).

## Check our Ubuntu architecture

Before we proceed, let's make sure we're running the aarch64 version of Ubuntu on our Raspberry Pi. Run the following command in **Terminal**.

```console
uname -m
```

If `aarch64` is not output, please follow the instructions in [How to install Ubuntu Desktop on Raspberry Pi 4](https://ubuntu.com/tutorials/how-to-install-ubuntu-desktop-on-raspberry-pi-4#1-overview) and make sure to select the 64-bit option of Ubuntu Desktop.

## Update and upgrade your Raspberry Pi and Ubuntu

After setting up Ubuntu Desktop and automounting your SSD, let's update and upgrade your Raspberry Pi and Ubuntu by running the following commands in **Terminal**.

```console
sudo apt update && sudo apt upgrade -y
```

Wait for updates and upgrades to install. If prompted, reboot your device and then proceed with this tutorial.

## Set a static IP address

We need to configure a static IP address and then set up port forwarding so that our Raspberry Pi can continue to communicate with other nodes even if we reboot the device.

For instructions on how to set a static IP address in Ubuntu, see Method 1 (command line) or Method 2 (GUI) in [How to Assign Static IP Address on Ubuntu Linux](https://itsfoss.com/static-ip-ubuntu/).

## Allow connections to port 8333

In our router, we need to allow connections to port 8333. This is the port that allows the node to sync properly.

For details on how to allow port forwarding, please consult your router's manual. You typically need to include your device's static IP address and the port number (8333) in the Port Forwarding or NAT Forwarding setting, depending on your router.

!!! warning

If you don't configure a static IP address, you may encounter connection issues when you restart or reboot your Raspberry Pi. By setting a static IP address, you can make sure the same IP address is still allowing communication from port 8333.

## Turn on swap

We need our Bitcoin Cash Node to continue running if the RAM on our Raspberry Pi gets full. To address this, we need to enable swap on our device.

For instructions on how to check if swap is enabled and configure swap appropriately, see [How to Add Swap Space on Ubuntu 20.04](https://www.cloudbooklet.com/how-to-add-swap-space-on-ubuntu-20-04/).

!!! note

You can experiment with this as necessary, but the Raspberry Pi might become unresponsive if swap is turned off or does not have enough RAM allocated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Setting up Bitcoin Cash Node

## Download and extract the Bitcoin Cash Node package

Open a web browser on the Raspberry Pi, and go to the **[Download](https://bitcoincashnode.org/en/download.html)** page on the Bitcoin Cash Node website.

Make sure the latest version of BCHN is selected. Under **Linux**, download the **AARCH 64 (tar)** package to the home directory on our mounted SSD. Downloading this compressed package should take about 1 minute.

![Bitcoin Cash Node download screen](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_download.png?raw=true)

After the compressed package finishes downloading, let's extract the compressed package.

To do so, let's open **Terminal** and go to the directory where you downloaded the package to. Be sure to replace `<SSD-DIRECTORY-CONTAINING-DOWNLOADED-PACKAGE>` in the command below with the directory where we saved the compressed package to.

```console
cd /<SSD-DIRECTORY-CONTAINING-DOWNLOADED-PACKAGE>
```

Next, let's extract the compressed package. When running the following command in **Terminal**, be sure to replace `<VERSION-NUMBER-DOWNLOADED>` with the version number that matches the package we downloaded.

```console
sudo tar -xvzf bitcoin-cash-node-<VERSION-NUMBER-DOWNLOADED>-aarch64-linux-gnu.tar.gz
```

While we're in this directory, let's create a new directory to store the blockchain data and keep things tidy. In **Terminal**, run the following command.

```console
mkdir blockchain-data
```

## Run Bitcoin Cash Node

Now that we've extracted the Bitcoin Cash Node package, let's run the software and start downloading the blockchain transactions to our node.

!!! note

Downloading all the transactions in the blockchain will take a while. You may want to start the Bitcoin Cash Node software a couple hours before going to bed, as you may experience a slow Internet connection.

To start the Bitcoin Cash Node software, run the following command in **Terminal**. Be sure to replace `<VERSION-NUMBER-DOWNLOADED>` with the version number that matches the package we downloaded.

```console
sudo bitcoin-cash-node-<VERSION-NUMBER-DOWNLOADED>/bin/bitcoin-qt
```

The Bitcoin Cash Node software then prompts us to specify where to download the blockchain transactions to.

Under **Use a custom data directory**, click the **three dots** to choose a directory.

![Bitcoin Cash Node welcome screen](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_welcome_screen.png?raw=true)

Navigate to your SSD, select the directory named **blockchain-data** that you previously created, and click **OK**. Then, click **OK** to begin downloading the blockchain.

The Bitcoin Cash Node software will then begin downloading transactions. This will take hours or days, depending on your Internet connection speed.

![Bitcoin Cash Node sync](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_sync.png?raw=true)

After all the Bitcoin Cash transactions have finished downloading to your SSD, you will see the following Overview screen and your node will automatically start verifying transactions on the Bitcoin Cash blockchain as they happen.

![Bitcoin Cash Node synced](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_synced.png?raw=true)

To monitor inbound and outbound traffic on your node, click **Window** in the menu bar and choose **Network Traffic**. From here, you can see how much data is being transferred to and from your node.

!!! note

The "Received" and "Sent" under "Totals" will reset if you restart the Bitcoin Cash Node software. Additionally, the network traffic will reset if you move the slider below the graph.

![Bitcoin Cash Node network traffic 30 minutes](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_network_traffic_30_minutes.png?raw=true)
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Setting up your Bitcoin Cash wallet

Your Bitcoin Cash wallet has already been created at this point, so let's secure it with a password and back it up.

!!! warning

The instructions in this section are very important. Neglecting to secure your wallet with a password and backing it up could result in you losing the Bitcoin Cash that you receive from others.

## Create a password for your wallet

Let's secure your wallet with a password. You will need this password to restore it from the backup, which you will create after setting a password.

In the menu bar, click **Settings**, then select **Encrypt Wallet**. When the password setup window appears, enter a secure password. Enter the same password again to confirm it.

!!! warning

Be sure to remember this password. Write it down and put it in a safe, for example.

After you have successfully encrypted your wallet with a password, the following confirmation screen will appear. Please carefully read the notice, then click **OK**.

![Bitcoin Cash Node wallet encrypted notice](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_wallet_encrypted_notice.png?raw=true)

## Back up your wallet

Now, let's back up your wallet.

Backing up your wallet let's you restore it if the device hosting your node and wallet encounters a catastrophic failure.

In the menu bar, click **File** and select **Backup Wallet**.

When the directory window appears, choose a directory to save the wallet data (.dat) file to. If you don't have your Raspberry Pi set up to communicate with other computers on your network, save the wallet file (.dat) to your Raspberry Pi first and then immediately save it to another device for safe-keeping.

!!! warning

Do not keep your wallet backup on the same device that hosts your node and wallet. If your device encounters a catastrophic failure, you will not be able to restore the wallet from the backup. Instead, save the wallet backup to a secure, reliable device or devices.

Once you have chosen a location, click **OK**.

## Optional: Receive Bitcoin Cash in your wallet

Finally, let's test your wallet.

Click the **Receive** icon. Fill out the information that you consider necessary for your records. All fields are optional and are for your reference.

A window will appear that shows you a QR code for someone to scan and send you Bitcoin Cash. Additional payment information include the URI, address, and wallet for the transaction.

You can now give someone the QR code or wallet address for them to send you Bitcoin Cash. After they have sent some Bitcoin Cash, the transaction will appear as "Pending" until it is validated on the blockchain.

![Bitcoin Cash Node test receive pending](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_test_receive_pending.png?raw=true)

After a few minutes, you can see that the transaction has been validated and your Bitcoin Cash now appears as "Available" funds.

![Bitcoin Cash Node test receive verified](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/bitcoin_cash_node_test_receive_verified.png?raw=true)

When the Bitcoin Cash has moved to your available balance, it is in your possession and you can send it to others, make payments, or save it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Conclusion

You have now finished setting up Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop.

By running a full node, you:

- Contribute to the Bitcoin Cash network and community by validating transactions.
- Promote the security and decentralization of Bitcoin Cash.
- Have control over your Bitcoin Cash in a wallet that you own.

You're all set to contribute to the health of a true, peer-to-peer digital currency!
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How to install and configure Bitcoin Cash Node on a Raspberry Pi 4 running Ubuntu Desktop

This tutorial describes how to install and set up [Bitcoin Cash Node](https://bitcoincashnode.org/) on a Raspberry Pi 4 running Ubuntu Desktop (64-bit). We will focus on using the Bitcoin Cash Node graphical user interface (GUI) so that you can visualize processes on the blockchain and your Bitcoin Cash wallet transactions.

These instructions are intended for those who have basic knowledge of the Ubuntu environment and Linux commands.

## Prerequisites

- Raspberry Pi 4 (4 GB of RAM or more)
- Ubuntu Desktop (64-bit) OS
- microSD card (32 GB or more)
- Micro USB-C power cable
- Micro HDMI cable
- Monitor with an HDMI interface
- Keyboard (USB or Bluetooth)
- USB mouse (USB or Bluetooth)
- External SSD (500 GB or more)

!!! note

For the data associated with the Bitcoin Cash blockchain, you should reserve at least 200 GB. Be sure your SSD is large enough to accommodate the growing blockchain if you want to keep verifying transactions for the foreseeable future on your Raspberry Pi.

- Raspberry Pi case with a GPIO fan and heat sinks (recommended)
- Reliable Internet connection
7 changes: 7 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# References

- [Bitcoin Cash Node](https://bitcoincashnode.org/en/)
- [Bitcoin Cash Node documentation](https://docs.bitcoincashnode.org/)
- [How to install Ubuntu Desktop on Raspberry Pi 4](https://ubuntu.com/tutorials/how-to-install-ubuntu-desktop-on-raspberry-pi-4#1-overview)
- [How to properly automount a drive in Ubuntu Linux](https://www.techrepublic.com/article/how-to-properly-automount-a-drive-in-ubuntu-linux/)
- [How to Assign Static IP Address on Ubuntu Linux](https://itsfoss.com/static-ip-ubuntu/)
8 changes: 8 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:root > * {
--md-primary-fg-color: #080f53;
--md-typeset-a-color: #2a3fff;
}
[data-md-color-scheme="slate"] {
--md-primary-fg-color: #080f53;
--md-typeset-a-color: #838fff;
}
52 changes: 52 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Mermaid

## MERMAID TEST

### Gannt diagram

```mermaid
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
```

### Class diagram

```mermaid
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
```

### Git graph

```mermaid
gitGraph
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
```
41 changes: 41 additions & 0 deletions docs/bitcoin-cash-node-on-raspberry-pi/upgrade/01_preparation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Preparing our device

Before upgrading Bitcoin Cash Node, we should back up our wallet (in the .dat file format) and update our device. This will help ensure a smooth upgrade process.

## Optional: Back up your Bitcoin Cash wallet

!!! warning

This step is optional since you will be moving your blockchain data, which includes your wallet, from the old Bitcoin Cash Node directory into a new directory. However, temporarily backing up your wallet is still recommended just in case you encounter an issue during the upgrade.

In the **Bitcoin Cash Node application**, click **File** and choose **Back up wallet**.
![Back up Bitcoin Cash wallet](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/upgrade_bitcoin_cash_node_wallet_backup.png?raw=true)

Then, let's choose a directory to save our wallet backup.
![Save Bitcoin Cash wallet backup](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/upgrade_bitcoin_cash_node_wallet_backup_save.png?raw=true)

Our wallet will be saved in the directory we chose. We will be moving this wallet file to the newer version of Bitcoin Cash Node later, so remember where we saved this wallet backup file.

## Update and upgrade Ubuntu Desktop

Before we start the upgrade process, let's exit from Bitcoin Cash Node and install any updates and upgrades to Ubuntu Desktop.

To close Bitcoin Cash Node, do one of the following:

- **To close the application from the graphical user interface (GUI):** Click **File**, then choose **Exit**.
![GUI - Close Bitcoin Cash](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/upgrade_bitcoin_cash_node_close_gui.png?raw=true)

- **To close the application from Terminal (if that is where you ran Bitcoin Cash Node):** Press **Ctrl + C** on the keyboard.
![Terminal - Close Bitcoin Cash Node](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi/blob/main/docs/assets/screenshots/upgrade_bitcoin_cash_node_close_terminal.png?raw=true)

Now, let's update and upgrade Ubuntu Desktop by running the following command in Terminal.

```console
sudo apt update && sudo apt upgrade -y
```

Since we might have installed major updates and upgrades, let's reboot the device by running the following command in Terminal.

```console
sudo reboot
```
Loading

0 comments on commit 1418042

Please sign in to comment.