66 lines
1.8 KiB
Markdown
66 lines
1.8 KiB
Markdown
|
|
# Counterweight V2
|
||
|
|
|
||
|
|
This is the repo where I store everything necessary to spin up my
|
||
|
|
Bitcoin-related node.
|
||
|
|
|
||
|
|
It currently includes:
|
||
|
|
|
||
|
|
- Bitcoin core
|
||
|
|
- electrs
|
||
|
|
- mempool block explorer
|
||
|
|
- lnbits
|
||
|
|
|
||
|
|
## How to deploy
|
||
|
|
|
||
|
|
### Requirements
|
||
|
|
|
||
|
|
These instructions assume you are on a debian/ubuntu machine with docker,
|
||
|
|
docker compose and git installed.
|
||
|
|
|
||
|
|
### Cloning
|
||
|
|
|
||
|
|
First, clone this repo where you would like to run your node.
|
||
|
|
|
||
|
|
### Building electrs
|
||
|
|
|
||
|
|
TODO: explain
|
||
|
|
|
||
|
|
### Environment and configuration files
|
||
|
|
|
||
|
|
Now, you need to build a `.env` file. You can start by making a copy of
|
||
|
|
`.env-example` and filling it.
|
||
|
|
|
||
|
|
Afterwards, create the `data` folder in the root of the cloned repo. Inside,
|
||
|
|
create the folders `bitcoin`, `electrs`, `mempool` and `lnbits`.
|
||
|
|
|
||
|
|
Inside `data/bitcoin`, you will need to place a `bitcoin.conf` file. You can
|
||
|
|
use the example in `config_templates/bitcoin.conf`. Ensure that your inputs
|
||
|
|
here are consistent with the ones in the `.env` file.
|
||
|
|
|
||
|
|
Inside `data/electrs/config`, you will need to place a `config.toml` file. You
|
||
|
|
can use the example in `config_templates/config.toml`. For this one, you should
|
||
|
|
not make any changes if you are following these instructions.
|
||
|
|
|
||
|
|
Inside `data/lnbits`, you will need to place a `.env` file. Pay attention: this
|
||
|
|
file is specific for LNbits and is unrelated to the other `.env` file that sits
|
||
|
|
on the root of this repo. TODO: make template in
|
||
|
|
|
||
|
|
|
||
|
|
### Smoke testing
|
||
|
|
|
||
|
|
TODO: describe how to check that everything is warning.
|
||
|
|
|
||
|
|
## Upgrading versions of the different services
|
||
|
|
|
||
|
|
- Bitcoin: upgrade in docker-compose.yaml.
|
||
|
|
- electrs: specify tag in custom electrs dockerfile, build again.
|
||
|
|
- mempool: upgrade web, api and db in docker-compose.yaml.
|
||
|
|
- LNbits: upgrade in docker-compose.yaml.
|
||
|
|
|
||
|
|
|
||
|
|
### How to backup data
|
||
|
|
|
||
|
|
TODO: explain how to back all the data up with a rsync.
|
||
|
|
|
||
|
|
|