Coder Social home page Coder Social logo

jdsnyke / crypto Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 2.0 7.9 MB

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

License: MIT License

Python 4.59% Shell 72.60% CSS 10.06% JavaScript 4.82% HTML 7.93%
bitcoin docker docker-compose electrum mempool raspberry-pi linux umbrel

crypto's Introduction

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.
  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.
  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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.