Skip to content

Commit

Permalink
Harmonize navigation and file structure
Browse files Browse the repository at this point in the history
# Menu navigation

The guide navigation now uses generic descriptions instead of specific 
software names. The chapter explaining the installation of the Bitcoin 
client is now called "Bitcoin client" instead of "Bitcoin Core".

See discussion in raspibolt#930
Pull-request: raspibolt#938

# File structure

With the guide accumulating more technical support files, the guide 
content itself got buried. Storing all core guide files in the root 
directory became confusing with increasing scope. Moving all markdown 
files into the /guide directory makes it human-readable again. 
Images are kept in /images to keep it tidy.

Pull-request: raspibolt#941
  • Loading branch information
Stadicus authored Mar 2, 2022
1 parent 01d8f21 commit b4d0a81
Show file tree
Hide file tree
Showing 53 changed files with 433 additions and 349 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions backstory.md → guide/backstory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Backstory
nav_order: 10
---
<!-- markdownlint-disable MD014 MD022 MD025 MD040 -->
{% include_relative include_metatags.md %}
{% include include_metatags.md %}

# Backstory
{: .no_toc }
Expand Down Expand Up @@ -47,7 +47,7 @@ This was the original goal of the RaspiBolt guide back in 2017: simply buying a
I used the [Eclair](https://github.com/ACINQ/eclair){:target="_blank"} Lighting implementation back then, on Lightning testnet, as mainnet was not even running yet.
Oh, how time flies...

[![Buying a Blockaccino](images/backstory_blockaccino.png)](https://vimeo.com/252693058){:target="_blank"}
[![Buying a Blockaccino](../images/backstory_blockaccino.png)](https://vimeo.com/252693058){:target="_blank"}

Watch the [original screencast](https://vimeo.com/252693058){:target="_blank"} from back then.

Expand All @@ -64,4 +64,4 @@ Thanks to everyone who cares about Bitcoin and feels that running your own Bitco

---

Next: [Rasperry Pi >>](raspberry-pi.md)
Next: [Rasperry Pi >>](raspberry-pi/index.md)
10 changes: 5 additions & 5 deletions bitcoin-core.md → guide/bitcoin/bitcoin-client.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
layout: default
title: Bitcoin Core
title: Bitcoin client
nav_order: 10
parent: Bitcoin
---
<!-- markdownlint-disable MD014 MD022 MD025 MD033 MD040 -->
# Bitcoin Core
# Bitcoin client
{: .no_toc }

We install [Bitcoin Core](https://bitcoin.org/en/bitcoin-core/){:target="_blank"}, the reference client implementation of the Bitcoin network.
Expand Down Expand Up @@ -412,7 +412,7 @@ If everything is running smoothly, this is the perfect time to familiarize yours
* you definitely need to have a [real copy](https://bitcoinbook.info/){:target="_blank"} of this book!
* read it online on [Github](https://github.com/bitcoinbook/bitcoinbook){:target="_blank"}
![Mastering Bitcoin](images/30_mastering_bitcoin_book.jpg){:target="_blank"}
![Mastering Bitcoin](../../images/30_mastering_bitcoin_book.jpg){:target="_blank"}
* [**Learning Bitcoin from the Command Line**](https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line/blob/master/README.md){:target="_blank"} by Christopher Allen gives a thorough deep dive into understanding the technical aspects of Bitcoin.
Expand Down Expand Up @@ -457,7 +457,7 @@ When upgrading, there might be breaking changes, or changes in the data structur
* There's no need to stop the application.
Simply install the new version and restart the service.

* Download, verify, extract and install the Bitcoin Core binaries as described in the [Bitcoin section](bitcoin-core.md) of this guide.
* Download, verify, extract and install the Bitcoin Core binaries as described in the [Bitcoin section](bitcoin-client.md#installation) of this guide.

* Restart the Bitcoin Core systemd unit

Expand All @@ -469,4 +469,4 @@ When upgrading, there might be breaking changes, or changes in the data structur

---

Next: [Electrum >>](electrs.md)
Next: [Electrum server >>](electrum-server.md)
12 changes: 6 additions & 6 deletions btcrpcexplorer.md → guide/bitcoin/blockchain-explorer.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
layout: default
title: Blockchain Explorer
title: Blockchain explorer
nav_order: 30
parent: Bitcoin
---
<!-- markdownlint-disable MD014 MD022 MD025 MD033 MD036 MD040 -->

# Blockchain Explorer
# Blockchain explorer
{: .no_toc }

Run your own private blockchain explorer with [BTC RPC Explorer](https://github.com/janoside/btc-rpc-explorer){:target="_blank"}. Trust your node, not some external services.

![BTC RPC Explorer home screen with dark theme](images/btcrpcexplorer-homepage.png)
![BTC RPC Explorer home screen with dark theme](../../images/btcrpcexplorer-homepage.png)

---

Expand Down Expand Up @@ -42,7 +42,7 @@ For the BTC RPC Explorer to work, you need your full node to index all transacti

* If you followed this guide, the transaction index parameter is already enabled (`txindex=1`), and you can skip to the next section.

* If this is not the case, you need to set the `txindex=1` parameter in your Bitcoin Core configuration file (`bitcoin.conf`): [Bitcoin node configuration](bitcoin-core.md#configuration).
* If this is not the case, you need to set the `txindex=1` parameter in your Bitcoin Core configuration file (`bitcoin.conf`): [Bitcoin node configuration](bitcoin-client.md#configuration).

* After adding the parameter, restart Bitcoin Core, which will now index the whole blockchain

Expand Down Expand Up @@ -70,7 +70,7 @@ You can follow the progress using `tail -f ~/.bitcoin/debug.log`.

### Firewall & reverse proxy

In the [Security section](security.md), we set up NGINX as a reverse proxy.
In the [Security section](../raspberry-pi/security.md#prepare-nginx-reverse-proxy), we set up NGINX as a reverse proxy.
Now we can add the BTC RPC Explorer configuration.

* Enable NGINX reverse proxy to route external encrypted HTTPS traffic internally to the BTC RPC Explorer
Expand Down Expand Up @@ -344,5 +344,5 @@ Updating to a [new release](https://github.com/janoside/btc-rpc-explorer/release

---

Next: [Lightning >>](lightning.md)
Next: [Lightning >>](../lightning/index.md)

14 changes: 7 additions & 7 deletions electrs.md → guide/bitcoin/electrum-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Wallets like the [BitBoxApp](https://shiftcrypto.ch/app/){:target="_blank"}, [El

## Preparations

Make sure that you have [reduced the database cache of Bitcoin Core](bitcoin-core.html#reduce-dbcache-after-full-sync) after full sync.
Make sure that you have [reduced the database cache of Bitcoin Core](bitcoin-client.md#reduce-dbcache-after-full-sync)#prepare-nginx-reverse-proxy after full sync.

### Install dependencies

Expand All @@ -48,7 +48,7 @@ Make sure that you have [reduced the database cache of Bitcoin Core](bitcoin-cor

### Firewall & reverse proxy

In the [Security section](security.md), we already set up NGINX as a reverse proxy.
In the [Security section](../raspberry-pi/security.md), we already set up NGINX as a reverse proxy.
Now we can add the Electrs configuration.

* Enable NGINX reverse proxy to add SSL/TLS encryption to the Electrs communication.
Expand Down Expand Up @@ -311,7 +311,7 @@ Only proceed with the next section once Electrs is ready.
[Electrum wallet](https://electrum.org){:target="_blank"} is a well-established, feature-rich Bitcoin wallet for power-users that supports most hardware wallets.
![Electrum Wallet local](images/electrum-wallet-tor.png){:target="_blank"}
![Electrum Wallet local](../../images/electrum-wallet-tor.png){:target="_blank"}
### Force single server connection
Expand Down Expand Up @@ -346,14 +346,14 @@ If you start Electrum, the green LED in the bottom right indicates an active con
If you connect over Tor, make sure that Tor is installed on your regular computer.
There are two options:
* Easy: download, install and run [Tor Browser](https://www.torproject.org).
* Easy: download, install and run [Tor Browser](https://www.torproject.org){:target="_blank"}.
* The application must be started manually and run in the background whe you want to connect over Tor.
* Tor proxy available on port `9150`
* Expert: install Tor as a background service
* The background service must be installed, and is always active in the background.
* Tor proxy available on port `9050`
* See further installation instructions for [Windows](https://bitstobytes.org/tor), [macOS](https://deepdarkweb.github.io/how-to-install-tor-on-macos-tutorial/), and Linux (`sudo apt install tor`).
* See further installation instructions for [Windows](https://bitstobytes.org/tor){:target="_blank"}, [macOS](https://deepdarkweb.github.io/how-to-install-tor-on-macos-tutorial/){:target="_blank"}, and Linux (`sudo apt install tor`).
Now we need to specifiy the Tor address for Electrs and the local Tor proxy port in the Electrum configuration.
Expand Down Expand Up @@ -403,7 +403,7 @@ If you have Tor installed on your computer, you can access your RaspiBolt remote
* Enable it and confirm the proxy address (usually the default `127.0.0.1:9050`)
* When adding your RaspiBolt full node as described above, use your Tor address (e.g. `gwdllz5g7vky2q4gr45zGuvopjzf33czreca3a3exosftx72ekppkuqd.onion:50002`)
![BitBoxApp](images/electrum_BitBoxApp.png)
![BitBoxApp](../../images/electrum_BitBoxApp.png)
---
Expand Down Expand Up @@ -459,4 +459,4 @@ Make sure to check the [release notes](https://github.com/romanz/electrs/blob/ma
---
Next: [Blockchain Explorer >>](btcrpcexplorer.md)
Next: [Blockchain explorer >>](blockchain-explorer.md)
2 changes: 1 addition & 1 deletion bitcoin.md → guide/bitcoin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nav_order: 30
has_children: true
---
<!-- markdownlint-disable MD014 MD022 MD025 MD040 -->
{% include_relative include_metatags.md %}
{% include include_metatags.md %}

# Bitcoin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ layout: default
title: __________________________
nav_order: 99
---
<meta http-equiv="refresh" content="0; URL=bonus-section.html">
<meta http-equiv="refresh" content="0; URL=bonus/">
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ Status: Not tested v3

### Introduction

The best way to safekeep your bitcoin (meaning the best combination of security and usability) is to use a hardware wallet (like [Ledger](https://www.ledgerwallet.com/) or [Trezor](https://trezor.io/)) in combination with your own Bitcoin node. This gives you security, privacy and eliminates the need to trust a third party to verify transactions.
The best way to safekeep your bitcoin (meaning the best combination of security and usability) is to use a hardware wallet (like [Ledger](https://www.ledgerwallet.com/){:target="_blank"} or [Trezor](https://trezor.io/)){:target="_blank"} in combination with your own Bitcoin node. This gives you security, privacy and eliminates the need to trust a third party to verify transactions.

With the RaspiBolt setup, the Bitcoin Core wallet on the node can only be used from the command line as no graphical user interface is installed. As Bitcoin Core does not offer support for hardware wallets, only a "hot wallet" (exposed to the internet) can be realized.

One possibility to use Bitcoin Core with more functionality is to set up an additional [ElectrumX](https://github.com/kyuupichan/electrumx) server and then use the great [Electrum wallet](https://electrum.org/) (on your regular computer) that integrates with hardware wallets. But this setup is not easy, and the overhead is more than a Raspberry Pi can handle.
One possibility to use Bitcoin Core with more functionality is to set up an additional [ElectrumX](https://github.com/kyuupichan/electrumx){:target="_blank"} server and then use the great [Electrum wallet](https://electrum.org/){:target="_blank"} (on your regular computer) that integrates with hardware wallets. But this setup is not easy, and the overhead is more than a Raspberry Pi can handle.

The new [Electrum Personal Server](https://github.com/chris-belcher/electrum-personal-server) makes it possible to connect Electrum (using your hardware wallet) directly to your RaspiBolt. In contrast to ElectrumX, this is not a full server that serves multiple users, but your own dedicated backend.
The new [Electrum Personal Server](https://github.com/chris-belcher/electrum-personal-server){:target="_blank"} makes it possible to connect Electrum (using your hardware wallet) directly to your RaspiBolt. In contrast to ElectrumX, this is not a full server that serves multiple users, but your own dedicated backend.

Before using this setup, please familiarize yourself with all components by setting up your own Electrum wallet, visiting the linked project websites and reading [The Electrum Personal Server Will Give Users the Full Node Security They Need](https://bitcoinmagazine.com/articles/electrum-personal-server-will-give-users-full-node-security-they-need/) in Bitcoin Magazine.
Before using this setup, please familiarize yourself with all components by setting up your own Electrum wallet, visiting the linked project websites and reading [The Electrum Personal Server Will Give Users the Full Node Security They Need](https://bitcoinmagazine.com/articles/electrum-personal-server-will-give-users-full-node-security-they-need/){:target="_blank"} in Bitcoin Magazine.

### Preparations

Expand All @@ -46,7 +46,7 @@ Before using this setup, please familiarize yourself with all components by sett
$ sudo pip3 install setuptools
```

* Configure firewall to allow incoming requests (please check if you need to adjust the subnet mask as [described in original setup](raspibolt_20_pi.md#enabling-the-uncomplicated-firewall))
* Configure firewall to allow incoming requests (please check if you need to adjust the subnet mask as [described in original setup](../../raspberry-pi/security.md#enabling-the-uncomplicated-firewall))
```sh
$ sudo ufw allow from 192.168.0.0/24 to any port 50002 comment 'allow EPS from local network'
$ sudo ufw enable
Expand All @@ -66,7 +66,7 @@ Electrum Personal Server uses the Bitcoin Core wallet with "watch-only" addresse
* Open a "bitcoin" user session and change into the home directory
`$ sudo su - bitcoin`

* Download, verify and extract the latest release (check the [Releases page](https://github.com/chris-belcher/electrum-personal-server/releases) on Github for the correct links)
* Download, verify and extract the latest release (check the [Releases page](https://github.com/chris-belcher/electrum-personal-server/releases){:target="_blank"} on Github for the correct links)

```sh
# create new directory on external hdd
Expand Down Expand Up @@ -118,10 +118,10 @@ Electrum Personal Server uses the Bitcoin Core wallet with "watch-only" addresse
$ pip3 install --user .
```
![Install Electrum Personal Server with Python Pip](./images/60_eps_pip_install.png)
![Install Electrum Personal Server with Python Pip](../../../images/60_eps_pip_install.png)
### First start
The Electrum Personal Server scripts are installed in the directory `/home/bitcoin/.local/bin/`. Unfortunately, in Raspberry Pi OS this directory is not in the system path, so the full path needs to be specified when calling these scripts. Alternatively, just [add this directory to your $PATH environment variable](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path), but it's not necessary in this guide.
The Electrum Personal Server scripts are installed in the directory `/home/bitcoin/.local/bin/`. Unfortunately, in Raspberry Pi OS this directory is not in the system path, so the full path needs to be specified when calling these scripts. Alternatively, just [add this directory to your $PATH environment variable](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path){:target="_blank"}, but it's not necessary in this guide.
* The first time the server is run it will import all configured addresses as watch-only into the Bitcoin node. This can take up to 10 minutes, after that the program will exit.
```sh
Expand All @@ -143,7 +143,7 @@ The Electrum Personal Server scripts are installed in the directory `/home/bitco
$ /home/bitcoin/.local/bin/electrum-personal-server /home/bitcoin/electrum-personal-server/config.cfg
```
[![Run Electrum Personal Server manually](images/60_eps_first-start.png)](images/60_eps_first-start.png)
[![Run Electrum Personal Server manually](../../../images/60_eps_first-start.png)
### Connect Electrum
Expand All @@ -153,11 +153,11 @@ On your regular computer, configure Electrum to use your RaspiBolt:
* Uncheck "Select server automatically"
* Enter the IP of your RaspiBolt (eg. 192.168.0.20) in the address field
[![Connect Electrum to RaspiBolt](images/60_eps_electrum-connect.png)](images/60_eps_electrum-connect.png)
[![Connect Electrum to RaspiBolt](../../../images/60_eps_electrum-connect.png)
* `Close` and check connection in tab "Console"
[![Check Electrum console](images/60_eps_electrumwallet.png)](images/60_eps_electrumwallet.png)
[![Check Electrum console](../../../images/60_eps_electrumwallet.png)
* This can also be achived by starting the Electrum wallet with the following command line arguments:
`--oneserver --server 192.168.0.20:50002:s`
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions bonus/bitcoin/mempool.md → guide/bonus/bitcoin/mempool.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Difficulty: Medium
Status: Tested v3
{: .label .label-green }

![Mempool](../../images/mempool.png)
![Mempool](../../../images/mempool.png)

---

Expand Down Expand Up @@ -56,7 +56,7 @@ To run Mempool, we need to run Node.js v16 or above.
> v16.13.1
```

* If Node.js is not installed, follow [this guide](https://raspibolt.org/btcrpcexplorer.html#install-nodejs) to install it. If the version is v14 or older, update it following [this tutorial](https://phoenixnap.com/kb/update-node-js-version){:target="_blank"}.
* If Node.js is not installed, follow [this guide](../../bitcoin/blockchain-explorer.md#install-nodejs) to install it. If the version is v14 or older, update it following [this tutorial](https://phoenixnap.com/kb/update-node-js-version){:target="_blank"}.

### Firewall

Expand Down
Loading

0 comments on commit b4d0a81

Please sign in to comment.