Skip to content

Commit

Permalink
GITBOOK-13: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
twofaktor authored and gitbook-bot committed Oct 12, 2024
1 parent e694334 commit ccbb31b
Show file tree
Hide file tree
Showing 40 changed files with 375 additions and 68 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
# RaMiX

{% hint style="danger" %}
<mark style="color:red;">**Attention!! This guide is in the WIP (work in progress) state and hasn't been tested yet. Many steps may be incorrect. Act behind your responsibility**</mark>
<mark style="color:red;">**Attention!! This guide is in the WIP (work in progress) state and hasn't been tested yet. Many steps may be incorrect. Pay special attention to the "Status: Not tested on RaMiX" tag at the beginning of the guides. Be careful and act behind your responsibility.**</mark>
{% endhint %}

<figure><img src=".gitbook/assets/home_screen.webp" alt=""><figcaption></figcaption></figure>
Expand Down Expand Up @@ -63,7 +63,7 @@ Your Bitcoin node will offer the following functionality:

We aim to keep the core of this guide well-maintained and up-to-date:

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th align="center"></th><th align="center"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><ol><li><a href="broken-reference">System</a> <strong>🖥️</strong></li></ol></td><td align="center">Prepare the hardware and set up the operating system</td><td align="center"></td><td><a href="index-1/operating-system.md">operating-system.md</a></td><td><a href="index-1/remote-access.md">remote-access.md</a></td><td><a href="system/">system</a></td><td><a href=".gitbook/assets/operating-system.gif">operating-system.gif</a></td></tr><tr><td><ol start="2"><li><a href="bonus/bitcoin/"><strong>₿</strong></a><a href="broken-reference"><strong>itcoin</strong></a> <strong>🟠</strong></li></ol></td><td align="center">Sync your own Bitcoin full node, Electrum server, Blockchain Explorer, and connect a desktop wallet to the Electrum server</td><td align="center"></td><td><a href="bitcoin/bitcoin/electrum-server.md">electrum-server.md</a></td><td><a href="bitcoin/bitcoin/blockchain-explorer.md">blockchain-explorer.md</a></td><td><a href="bitcoin/bitcoin/">bitcoin</a></td><td><a href=".gitbook/assets/core_logo.png">core_logo.png</a></td></tr><tr><td><ol start="3"><li> <a href="broken-reference">Lightning</a><strong>⚡</strong></li></ol></td><td align="center">Run your Lightning client with web-based node management, connect a mobile app, and save safely your SCB backup</td><td align="center"></td><td><a href="lightning/channel-backup.md">channel-backup.md</a></td><td><a href="lightning/web-app.md">web-app.md</a></td><td><a href="lightning/">lightning</a></td><td><a href="images/lightning-network-daemon-logo.png">lightning-network-daemon-logo.png</a></td></tr><tr><td><br><strong>➕</strong> <a href="broken-reference"><strong>Bonus guides</strong></a><br></td><td align="center">The bonus section contains more specific guides that build on top of the main section. More fun, lots of knowledge, but with lesser maintenance guarantees. Everything is optional.</td><td align="center"></td><td><a href="bonus/system/">system</a></td><td><a href="bonus/bitcoin/">bitcoin</a></td><td><a href="broken-reference">Broken link</a></td><td><a href=".gitbook/assets/bonus-logo.png">bonus-logo.png</a></td></tr></tbody></table>
<table data-view="cards" data-full-width="false"><thead><tr><th></th><th align="center"></th><th align="center"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><ol><li><a href="broken-reference">System</a> <strong>🖥️</strong></li></ol></td><td align="center">Prepare the hardware and set up the operating system</td><td align="center"></td><td><a href="index-1/operating-system.md">operating-system.md</a></td><td><a href="index-1/remote-access.md">remote-access.md</a></td><td></td><td><a href="system/">system</a></td><td><a href=".gitbook/assets/operating-system.gif">operating-system.gif</a></td></tr><tr><td><ol start="2"><li><a href="bonus/bitcoin/"><strong>₿</strong></a><a href="broken-reference"><strong>itcoin</strong></a> <strong>🟠</strong></li></ol></td><td align="center">Sync your own Bitcoin full node, Electrum server, Blockchain Explorer, and connect a desktop wallet to the Electrum server</td><td align="center"></td><td><a href="bitcoin/bitcoin/electrum-server.md">electrum-server.md</a></td><td><a href="bitcoin/bitcoin/blockchain-explorer.md">blockchain-explorer.md</a></td><td></td><td><a href="bitcoin/bitcoin/">bitcoin</a></td><td><a href=".gitbook/assets/core_logo.png">core_logo.png</a></td></tr><tr><td><ol start="3"><li> <a href="broken-reference">Lightning</a><strong>⚡</strong></li></ol></td><td align="center">Run your Lightning client with web-based node management, connect a mobile app, and save safely your SCB backup</td><td align="center"></td><td><a href="lightning/channel-backup.md">channel-backup.md</a></td><td><a href="lightning/web-app.md">web-app.md</a></td><td></td><td><a href="lightning/">lightning</a></td><td><a href="images/lightning-network-daemon-logo.png">lightning-network-daemon-logo.png</a></td></tr><tr><td><br><strong>➕</strong> <a href="broken-reference"><strong>Bonus guides</strong></a><br></td><td align="center">The bonus section contains more specific guides that build on top of the main section. More fun, lots of knowledge, but with lesser maintenance guarantees. Everything is optional.</td><td align="center"></td><td><a href="bonus/system/">system</a></td><td><a href="bonus/bitcoin/">bitcoin</a></td><td><a href="bonus-guides/nostr/">nostr</a></td><td><a href="broken-reference">Broken link</a></td><td><a href=".gitbook/assets/bonus-logo.png">bonus-logo.png</a></td></tr></tbody></table>

## Community

Expand Down Expand Up @@ -91,8 +91,14 @@ Difficulty: Medium
Difficulty: Hard
{% endhint %}

* **Paid service:** indicates if the service used in the guide is free or paid
* **Cost:** indicates if the service used in the guide is free or paid

{% hint style="warning" %}
Cost: Paid service
{% endhint %}

* **Status:** indicates if the guide has been tested on a RaMiX environment or not

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}
3 changes: 2 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@
* [Bisq](bonus/bitcoin/bisq.md)
* [Safu Ninja, a DIY steel mnemonic backup](bonus/bitcoin/safu-ninja.md)
* [Ordisrespector spam filter](bonus/bitcoin/ordisrespector.md)
* [Nostr relay](bonus-guides/bitcoin/nostr-relay.md)
* [Download the bitcoin whitepaper](bonus/bitcoin/white-paper.md)
* [RaMiX on Testnet](bonus/bitcoin/minibolt-on-testnet.md)
* [BTCPay Server](bonus-guides/bitcoin/btcpay-server.md)
* [🟣 Nostr](bonus-guides/nostr/README.md)
* [Nostr relay](bonus-guides/nostr/nostr-relay.md)

***

Expand Down
24 changes: 14 additions & 10 deletions bitcoin/bitcoin/bitcoin-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ layout:

# 2.1 Bitcoin client: Bitcoin Core

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

We install [Bitcoin Core](https://bitcoin.org/en/bitcoin-core/), the reference client implementation of the Bitcoin network.

![](../../images/bitcoin-core-logo-trans.png)
Expand All @@ -26,9 +30,9 @@ Bitcoin Core will download the full Bitcoin blockchain, and validate all transac

We download the latest Bitcoin Core binary (the application) and compare this file with the signed and timestamped checksum. This is a precaution to make sure that this is an official release and not a malicious version trying to steal our money.

💡 If you want to install the Ordisrespector patch to reject the Ordinals of your mempool, follow the [Ordisrespector bonus guide](../../bonus/bitcoin/ordisrespector.md#preparations) and come back to continue with the ["Create the bitcoin user"](bitcoin-client.md#create-the-bitcoin-user) section.
💡 If you want to install the Ordisrespector patch to reject the Ordinals of your mempool, follow the [Ordisrespector bonus guide](../../bonus/bitcoin/ordisrespector.md) and come back to continue with the ["Create the bitcoin user"](bitcoin-client.md#create-the-bitcoin-user-and-group) section.

💡 If you want to install Bitcoin Core from the source code but without the Ordisrespector patch, follow the [Ordisrespector bonus guide](../../bonus/bitcoin/ordisrespector.md#preparations) skipping [Apply the patch “Ordisrespector”](../../bonus/bitcoin/ordisrespector.md#apply-the-patch-ordisrespector) and come back to continue with the ["Create the bitcoin user"](bitcoin-client.md#create-the-bitcoin-user) section.
💡 If you want to install Bitcoin Core from the source code but without the Ordisrespector patch, follow the [Ordisrespector bonus guide](../../bonus/bitcoin/ordisrespector.md) skipping [Apply the patch “Ordisrespector”](../../bonus/bitcoin/ordisrespector.md#apply-the-ordisrespector-patch) and come back to continue with the ["Create the bitcoin user"](bitcoin-client.md#create-the-bitcoin-user-and-group) section.

### Download binaries

Expand Down Expand Up @@ -113,8 +117,8 @@ Primary key fingerprint:...
### Timestamp check

* The binary checksum file is also timestamped with the Bitcoin blockchain using the [OpenTimestamps protocol](https://en.wikipedia.org/wiki/Time\_stamp\_protocol), proving that the file existed before some point in time. Let's verify this timestamp. On your local computer, download the checksums file and its timestamp proof:
* [Click to download](https://bitcoincore.org/bin/bitcoin-core-27.0/SHA256SUMS.ots) the checksum file
* [Click to download](https://bitcoincore.org/bin/bitcoin-core-27.0/SHA256SUMS) its timestamp proof
* [Click to download](https://bitcoincore.org/bin/bitcoin-core-27.1/SHA256SUMS.ots) the checksum file
* [Click to download](https://bitcoincore.org/bin/bitcoin-core-27.1/SHA256SUMS) its timestamp proof
* In your browser, open the [OpenTimestamps website](https://opentimestamps.org/)
* In the "Stamp and verify" section, drop or upload the downloaded `SHA256SUMS.ots` proof file in the dotted box
* In the next box, drop or upload the `SHA256SUMS` file
Expand Down Expand Up @@ -342,7 +346,7 @@ Remember to accommodate the `"dbcache"` parameter depending on your hardware. Re
{% endhint %}

<pre><code># RaMiX: bitcoind configuration
# /home/bitcoin/.bitcoin/bitcoin.conf
# /data/bitcoin/bitcoin.conf

# Bitcoin daemon
server=1
Expand Down Expand Up @@ -686,22 +690,22 @@ If everything is running smoothly, this is the perfect time to familiarize yours

Once Bitcoin Core **is fully synced**, we can reduce the size of the database cache. A bigger cache speeds up the initial block download, now we want to reduce memory consumption to allow the Lightning client and Electrum server to run in parallel. We also now want to enable the node to listen to and relay transactions.

* As user `admin`, edit the `bitcoin.conf` file

{% hint style="info" %}
Bitcoin Core will then just use the default cache size of 450 MiB instead of your setting RAM setup. If `blocksonly=1` is left uncommented it will prevent Electrum Server from receiving RPC fee data and will not work. Save and exit
Bitcoin Core will then just use the default cache size of 450 MiB instead of your setting RAM setup. If `blocksonly=1` is left uncommented it will prevent Electrum Server from receiving RPC fee data and will not work
{% endhint %}

* As user `admin`, edit the `bitcoin.conf` file

```sh
sudo nano /home/bitcoin/.bitcoin/bitcoin.conf
```

* Comment the following lines (adding a `#` at the beginning)
* Comment the following lines by adding a `#` at the beginning. Save and exit

```
#assumevalid=0
#dbcache=2048
#blocksonly=1
#assumevalid=0
```

* Restart Bitcoin Core for the settings to take effect
Expand Down
4 changes: 4 additions & 0 deletions bitcoin/bitcoin/blockchain-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ layout:

# 2.3 Blockchain explorer: BTC RPC Explorer

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

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

<figure><img src="../../.gitbook/assets/btc_rpc_explorer_logo.png" alt=""><figcaption></figcaption></figure>
Expand Down
4 changes: 4 additions & 0 deletions bitcoin/bitcoin/desktop-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ layout:

# 2.4 Desktop wallet: Sparrow wallet

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

We install [Sparrow wallet](https://github.com/sparrowwallet/sparrow) on a computer and connect it to your Electrum server on your node for private Bitcoin on-chain transactions.

<figure><img src="../../.gitbook/assets/sparrow_wallet_logo.png" alt=""><figcaption></figcaption></figure>
Expand Down
8 changes: 6 additions & 2 deletions bitcoin/bitcoin/electrum-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ layout:

# 2.2 Electrum Server: Fulcrum

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

[Fulcrum](https://github.com/cculianu/Fulcrum) is a fast & nimble SPV server for Bitcoin created by [Calin Culianu](https://github.com/cculianu). It can be used as an alternative to Electrs because of its performance, as we can see in Craig Raw's [comparison](https://www.sparrowwallet.com/docs/server-performance.html) of servers.

<div data-full-width="false">
Expand Down Expand Up @@ -56,7 +60,7 @@ Make sure that you have [reduced the database cache of Bitcoin Core](bitcoin-cli
sudo apt update && sudo apt full-upgrade
```

* Make sure that all necessary software packages are installed
* Make sure that all necessary software packages are installed. Press "**y**" and `enter` or directly `enter` when the prompt asks you

```sh
sudo apt install libssl-dev
Expand Down Expand Up @@ -100,7 +104,7 @@ sudo systemctl restart bitcoind
* Check Bitcoin Core is enabled `zmqpubhashblock` on the `8433` port

```bash
sudo ss -tulpn | grep LISTEN | grep bitcoind | grep 8433
sudo ss -tulpn | grep bitcoind | grep 8433
```

Expected output:
Expand Down
16 changes: 15 additions & 1 deletion bonus-guides/bitcoin/btcpay-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ layout:

[BTCPay Server](https://github.com/btcpayserver/btcpayserver) is a free, open-source, and self-hosted Bitcoin payment gateway, which means developers and security auditors can always inspect the code for quality. It enables individuals and businesses to accept Bitcoin payments online or in person without any fees, offering self-sovereignty in the process.

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

{% hint style="danger" %}
Difficulty: Hard
{% endhint %}
Expand Down Expand Up @@ -349,6 +353,10 @@ Time Elapsed 00:00:41.43

</details>

{% hint style="info" %}
This process can take quite **a long time**, 10-15 minutes or more, depending on the performance of your device. Please be patient until the prompt shows again
{% endhint %}

* Check the correct installation

```bash
Expand Down Expand Up @@ -663,6 +671,10 @@ MSBuild version 17.3.2+561848881 for .NET

</details>

{% hint style="info" %}
This process can take quite **a long time**, 10-15 minutes or more, depending on the performance of your device. Please be patient until the prompt shows again
{% endhint %}

* Check the correct installation

```bash
Expand Down Expand Up @@ -706,7 +718,9 @@ postgres=User ID=admin;Password=admin;Host=localhost;Port=5432;Database=btcpay;
</code></pre>

{% hint style="info" %}
If you want to connect your Lightning LND node to BTCpay too, go to the [Connect to your LND internal node](btcpay-server.md#connect-to-your-lnd-internal-node) optional section
\-> If you want to connect your Lightning LND node to BTCPay Server too, go to the [Connect to your LND internal node](btcpay-server.md#connect-to-your-lnd-internal-node) optional section

\-> The `socksendpoint=127.0.0.1:9050` parameter is optional but recommended to increase your privacy, if you want to delete, comment with # before it or delete it directly
{% endhint %}

* Go back to the `admin` user
Expand Down
21 changes: 21 additions & 0 deletions bonus-guides/nostr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout:
title:
visible: true
description:
visible: false
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: true
---

# 🟣 Nostr

## Bonus Section: Nostr guides

### Nostr relays

* [**Nostr relay**](./) - a nostr relay written in Rust with support for the entire relay protocol and data persistence using PostgreSQL or SQLite
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ layout:

A [nostr relay written in Rust](https://github.com/scsibug/nostr-rs-relay) with support for the entire relay protocol and data persistence using PostgreSQL or SQLite.

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

{% hint style="warning" %}
Difficulty: Medium
{% endhint %}

<figure><img src="../../.gitbook/assets/nostr-relay-gif.gif" alt=""><figcaption></figcaption></figure>

## What is Nostr?
Expand Down Expand Up @@ -207,6 +215,10 @@ If the prompt shows you this error:
You need to type **`rustup default stable`** and wait for the process to finish, then try again the command before
{% endhint %}

{% hint style="info" %}
This process can take quite **a long time**, 10-15 minutes or more, depending on the performance of your device. Please be patient until the prompt shows again
{% endhint %}

* Install it

<pre class="language-bash" data-overflow="wrap"><code class="lang-bash"><strong>sudo install -m 0755 -o root -g root -t /usr/local/bin /tmp/nostr-rs-relay/target/release/nostr-rs-relay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ layout:

If the Raspberry Pi is not able to boot from your external drive, you can boot from a microSD card and use the external drive to store all the application data.

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

{% hint style="success" %}
Difficulty: Easy
{% endhint %}
Expand Down
4 changes: 4 additions & 0 deletions bonus-guides/system/cloudflare-tunnel.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ layout:

Exposing your local server on the Internet (clearnet) has various solutions, but the Cloudflare Tunnel stands out as the easiest and most cost-effective option. Traditionally, configuring Firewalls, using Tor, or setting up an SSH reverse tunnel to a public VPS were common approaches, each with its challenges and costs. Cloudflare Tunnel offers an alternative, though it acts as a middleman and can access or modify your traffic.

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

{% hint style="warning" %}
Cost: Paid service
{% endhint %}
Expand Down
8 changes: 6 additions & 2 deletions bonus-guides/system/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ layout:

[Go](https://github.com/golang/go)[!](https://github.com/golang/go) is an agent-based programming language in the tradition of logic-based programming languages like Prolog designed at Google.

{% hint style="danger" %}
Status: Not tested on RaMiX
{% endhint %}

{% hint style="success" %}
Difficulty: Easy
{% endhint %}
Expand Down Expand Up @@ -62,7 +66,7 @@ echo "$SHA256 go$VERSION.linux-arm64.tar.gz" | sha256sum --check
* Extract and install Go in the `/usr/local` directory

```bash
sudo tar -C /usr/local -xvzf go$VERSION.linux-arm64.tar.gz
sudo tar -C /usr/local -xzvf go$VERSION.linux-arm64.tar.gz
```

* Add the next line at the end of the `/etc/profile` file
Expand Down Expand Up @@ -148,7 +152,7 @@ go1.22.3.linux-arm64.tar.gz: OK
* Extract and install Go in the `/usr/local` directory

```bash
sudo tar -C /usr/local -xvzf go$VERSION.linux-arm64.tar.gz
sudo tar -C /usr/local -xzvf go$VERSION.linux-arm64.tar.gz
```

* Verify that you've updated Go by typing the following command
Expand Down
Loading

0 comments on commit ccbb31b

Please sign in to comment.