JDsnyke / crypto

🐳 An all in one Docker stack for installing bitcoin-core, electrs, their relevant web-ui's from Umbrel and a mempool explorer.

Home Page:https://jdsnyke.github.io/crypto/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Bitcoin Stack

top-language last-commit repo-size tag license

An all in one Docker stack for installing bitcoin-core, electrs, their relevant web-ui's from Umbrel and a mempool explorer.

Table of Contents

Getting Started

Prerequisites

Tip

We recommend running this on an SSD for faster load times. Initialization of bitcoind can take forever on an HDD!

  • Ideally a fresh install (not required, but HIGHLY recommended).
  • A 64 bit linux based server.
  • Access to the server through ssh.
  • Git installed.
  • Python installed.
  • Docker installed.
  • Docker compose installed.
  • Free storage space of 1.5TB or over.
  • A folder for your docker containers.
  • Relevant permissions to that folder in order to run bash scripts.

Installation

This stack works out of the box with no editing. Consider making modifications to make the script more secure.

Tip

Refer to the wiki for additional configuration options.

  1. SSH into the server using your credentials.
ssh pi@raspberrypi.local
  1. Install the dependencies if you haven't already. An example using the APT package manager is shown below.
sudo apt install git python3 docker docker-compose --yes
  1. Navigate to your docker container folder.
cd example_docker_folder
  1. Clone this repository.
git clone https://github.com/JDsnyke/crypto.git
  1. Double check the permissions for the folder, the parent folder, and its subfolders. An example of setting permissions for your folders is shown below.

Important

As of version v.1.2.0, the permissions should be fine by default.

cd ..
sudo chown -R 1000:1000 example_docker_folder
chmod -R 770 example_docker_folder
ls -l
  1. Go into the new crypto folder.
cd example_docker_folder
cd crypto
  1. Edit the execution permissions for the start.sh script.
chmod u+x start.sh
  1. Edit the start.sh script using your favorite text editor (e.g. vim, nano, vscode, etc). You want to modify the following variables.

Tip

Feel free to use the local and offline password generation tool bundled with the script!

STACK_BITCOIND_USERNAME="yourfavusername"
STACK_BITCOIND_PASSWORD="yourbitcoinpasswordd"
STACK_TOR_PASSWORD="yourtorpasswordd"
  1. Run the script.
./start.sh
  1. Visit your active containers!

    Bitcoin Node Electrum Server Mempool Explorer

  2. Give the bitcoin node time to download fully. This can take days to weeks.

Tip

If you using an HDD, this can take much longer and be slower to initialize.

  1. Stop the stack.
./stop.sh

Installation on Synology NAS

Caution

Due to issues with Synology, Docker and user permissions, the only way this works is to be run as 'root'.

  1. SSH into the server using your credentials.
ssh user@synology.local
  1. Install the dependencies if you haven't already. For Synology this would be Container Manager, Python and Git (using the SynoComunity repo) through the package manager on the web dashboard.

  2. Navigate to your docker container folder on your terminal.

cd example_docker_folder
  1. Clone this repository.
git clone https://github.com/JDsnyke/crypto.git
  1. Go into the new crypto folder, and update the usernames / passwords on the start.sh file as needed.

Tip

Use the Text Editor in the web interface to edit files and values as needed!

  1. Edit the docker-bitcoin.yml file in the compose folder as below, and save.

From,

volumes:
  - "../volumes/bitcoin/node:/data/.bitcoin"

To,

volumes:
  - "../volumes/bitcoin/node:/root/.bitcoin"
  1. In the terminal, run the start.sh script. Enter your account password when prompted.
sudo bash start.sh
  1. Stop the stack using the stop.sh script. Enter your account password when prompted.
sudo bash stop.sh

Updates

  1. Check for updates using the start.sh script argument.
./start.sh --check
  1. If an update is available, run the update.sh script file.
./update.sh

Switching the Mempool Explorer

By default, the lighter BTC RPC Explorer is used.

If you wish, you may swap the the bundled Mempool Space Explorer instead.

  1. Edit the start.sh script file's environment variable.
STACK_RUN_MEMPOOL_SPACE="True" # From False

Lightning Node

Important

It's recommended that you run the start.sh script normally without the lightning node first.

Caution

The bitcoin node must be fully synced to avoid issues with the lightning node.

  1. Edit the start.sh script file's environment variable (recommended) or run the file with the the appropriate argument.
STACK_RUN_LIGHTNING_SERVER="True" # From False

OR

./start.sh --lightning
  1. Visit the Umbrel LND container.

    Lightning Node

  2. Follow the prompts and create a new wallet.

Extra Containers

Tip

Feel free to add requests to the relevant discussions board.

I am working on adding additional containers to the script. You will be able to toggle what you want!

Caution

I will not provide any support for these containers. Please refer to the original providers!

Containers available:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

🐳 An all in one Docker stack for installing bitcoin-core, electrs, their relevant web-ui's from Umbrel and a mempool explorer.

https://jdsnyke.github.io/crypto/

License:MIT License


Languages

Language:Shell 72.6%Language:CSS 10.1%Language:HTML 7.9%Language:JavaScript 4.8%Language:Python 4.6%