crypto
crypto copied to clipboard
🐳 An all in one Docker stack for installing bitcoin-core, electrs, their relevant web-ui's from Umbrel and a mempool explorer.
Docker Bitcoin Stack
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
- Installation
- Installation on Synology NAS
- Updates
- Switching the Mempool Explorer
- Lightning Node
- Extra Containers
- License
- Acknowledgments
Getting Started
Prerequisites
[!TIP] We recommend running this on an SSD for faster load times. Initialization of
bitcoindcan 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.
- SSH into the server using your credentials.
ssh [email protected]
- 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
- Navigate to your docker container folder.
cd example_docker_folder
- Clone this repository.
git clone https://github.com/JDsnyke/crypto.git
- 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
- Go into the new
cryptofolder.
cd example_docker_folder
cd crypto
- Edit the execution permissions for the
start.shscript.
chmod u+x start.sh
- Edit the
start.shscript 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"
- Run the script.
./start.sh
-
Visit your active containers!
-
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.
- 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'.
- SSH into the server using your credentials.
ssh [email protected]
-
Install the dependencies if you haven't already. For Synology this would be
Container Manager,PythonandGit(using the SynoComunity repo) through the package manager on the web dashboard. -
Navigate to your docker container folder on your terminal.
cd example_docker_folder
- Clone this repository.
git clone https://github.com/JDsnyke/crypto.git
- Go into the new
cryptofolder, and update the usernames / passwords on thestart.shfile as needed.
[!TIP] Use the
Text Editorin the web interface to edit files and values as needed!
- Edit the
docker-bitcoin.ymlfile in thecomposefolder as below, and save.
From,
volumes:
- "../volumes/bitcoin/node:/data/.bitcoin"
To,
volumes:
- "../volumes/bitcoin/node:/root/.bitcoin"
- In the terminal, run the
start.shscript. Enter your account password when prompted.
sudo bash start.sh
- Stop the stack using the
stop.shscript. Enter your account password when prompted.
sudo bash stop.sh
Updates
- Check for updates using the
start.shscript argument.
./start.sh --check
- If an update is available, run the
update.shscript 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.
- Edit the
start.shscript file's environment variable.
STACK_RUN_MEMPOOL_SPACE="True" # From False
Lightning Node
[!IMPORTANT] It's recommended that you run the
start.shscript normally without the lightning node first.
[!CAUTION] The bitcoin node must be fully synced to avoid issues with the lightning node.
- Edit the
start.shscript 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
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:
- Ordinals.
Tested - Adguard.
Untested - Nostr Wallet Connect.
Untested - Back That Mac.
Untested - Llama GPT.
Untested - Lightning Terminal.
Untested - My Speed.
Untested
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Files, container images and scripts from the Umbrel team.
- CyberShield Password Generator by karthik558
- Hat tip to anyone else's code that was used.