Skip to content

BitcoinCacheMachine/BitcoinCacheMachine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

349 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin Cache Machine Logo Bitcoin Cache Machine

Bitcoin Cache Machine is open-source software that allows you to create a self-hosted privacy-preserving software-defined data-center. BCM is built entirely with free and open-source software and is meant primarily for home and small office use in line with the spirit of decentralization.

Note! Bitcoin Cache Machine REQUIRES a Trezor-T to function! Consider buying a dedicated device for your BCM data center, or use passphrases to maintain distinct keyspace.

Project Status

IMPORTANT! BCM is brand new and unstable. It is in a proof-of-concept stage and deploys to bitcoin TESTNET mode only. Not all features are implemented. Don't put real bitcoin on it. Builds will be formally tagged once a stable proof-of-concept has been created. YOU ASSUME ALL RISK IN USING THIS SOFTWARE!!!

Why Bitcoin Cache Machine Exists

If you're involved with Bitcoin or care about your privacy, you will undoubtedly understand the importance of running your own fully-validating bitcoin node. Running a fully-validating node is easy enough--just download the software and run it on your home machine, but is that really enough to preserve your overall privacy? Did you configure it correctly? Are you also running a properly configured block explorer? Is your software up-to-date? Is your wallet software configured to consult your trusted full node? Has TOR for these services been tested properly? Are you routing your DNS queries over TOR? Are you backing up user critical data in real time?

There are many areas where your privacy can be compromised if you're not careful. BCM is meant to handle many of these concerns by creating a software-defined data center at your home or office that's pre-configured to protect your overall privacy. BCM is a distributed system, so it gets faster and more reliable as you add independent commodity hardware. If you can provide the necessary hardware (CPU, memory, disk), a LAN segment, and an internet gateway, BCM can do much of the rest. Bitcoin Cache Machine dramatically lowers the barriers to deploying and operating your own bitcoin payment infrastructure.

For more information about the motivations behind Bitcoin Cache Machine, visit the public website.

Development Goals

Here are some of the development goals for Bitcoin Cache Machine:

  • Provide a self-contained, distributed, event-driven, software-defined data center that focuses on operational Bitcoin and Lightning-related IT infrastructure.
  • Enable small-to-medium-sized scalability by adding commodity x86_x64 hardware for home and small office settings.
  • Integrate free and open source software (FOSS)!
  • Create a composable framework for deploying Bitcoin and Lightning-related components, databases, visualizations, web-interfaces, etc., allowing app developers to start with a fully-operational baseline data center.
  • Automate the deployment and operation (e.g., backups, updates, vulnerability assessments, key and password management, etc.) of BCM deployments.
  • Require hardware wallets for cryptographic operations (PGP, SSH, and Bitcoin transactions).
  • Pre-configure all software to protect user's privacy (e.g., TOR for external communication, disk encryption, minimal attack surface, etc.).
  • Pursue Global Consensus and Local Consensus Models for core platform components, e.g., Bitcoin for global financial operations and cwtch for asynchronous, multi-peer communications.
  • Enhance overall security and performance and network health by running a Tor middle relay and serving bitcoin blocks over Tor.
  • Facilitate local (SSH) and remote using SSH port-forwarding with TOR transport for cluster administration.

How to Run Bitcoin Cache Machine

If you can run a modern Linux kernel and LXD, you can run BCM. BCM workload components run as background server-side processes only, so you'll usually want to have one or more always-on computers with a reliable Internet connection. User-facing GUI applications such as Electrum Wallet are containerized and require docker (LXC is NOT required for GUI apps). You can run BCM data-center workloads in a hardware-based VM (default) or directly on bare-metal.

BCM application components are deployed using the LXD REST API and Docker API. LXD is widely available on various free and open-source linux platforms. Don't worry too much about all the dependencies. The BCM CLI is designed to handle the installation and deployment of all software.

Getting Started

The first step to getting started with Bitcoin Cache Machine is to clone the git repo to your new SDN controller, a user-facing desktop or laptop.

NOTE: All BCM documentation ASSUMES you're working from a fresh install of Ubuntu (Desktop or Server) >= 18.04. Windows and MacOS are not directly supported, though you can always run Ubuntu in a VM. This goes for both the user-facing SDN controller and dedicated back-end x86_64 data center hardware.

Start by installing tor and git from your SDN Controller. Next, configure your local git client to download (clone) the BCM github repository using TOR for transport. This prevents github.com (i.e., Microsoft) from recording your real IP address. (It might also be a good idea to use a TOR browser when browsing this repo directly on github.).

sudo apt-get update
sudo apt-get install -y tor git
BCM_GITHUB_REPO_URL="https://github.com/BitcoinCacheMachine/BitcoinCacheMachine"
git config --global http.$BCM_GITHUB_REPO_URL.proxy socks5://localhost:9050

You can now clone the BCM repository to your machine over TOR and run setup. You can update your local BCM git repo by running git pull from $BCM_GIT_DIR.

export BCM_GIT_DIR="$HOME/git/github/bcm"
mkdir -p "$BCM_GIT_DIR"
git clone "$BCM_GITHUB_REPO_URL" "$BCM_GIT_DIR"
cd "$BCM_GIT_DIR"
./setup.sh
source ~/.bashrc

Feel free to change the directory in which you store the BCM repository on your machine. Just update the BCM_GIT_DIR variable. setup.sh sets up your SDN Controller so that you can use Bitcoin Cache Machine's CLI. Since setup.sh modifies group membership, you will have to log out and log back in before the BCM CLI operates correctly. Running bcm at the terminal builds the docker images needed to run bcm commands. The first place you should look for help is the CLI --help menus, e.g., bcm --help.

Deploying your own BCM Infrastructure

After the BCM CLI is available, you can deploy your own infrastructure using the bcm stack deploy command. For example, to deploy the spark lightning wallet and all its dependencies including clightning and bitcoind, run the bcm stack deploy spark command. Other user-facing components you can deploy include:

bcm stack deploy spark
bcm stack deploy btcpayserver
bcm stack deploy esplora
bcm stack deploy electrs

You can also run GUI-based applications that are fully integrated into your back end infrastructure. For example, run bcm run electrum to run a container-based Electrum wallet that is configured to consult a self-hosted Electrum server (electrs). You can use the bcm info command to view your current BCM environment variables--certificate, password, ssh, wallet, and certificate stores as well as deployment information like current cluster that under management and the chain (i.e., mainnet, testnet, regtest) you're targeting.

Documentation

Documentation for BCM can be found on the BCM Docs public website. It's definitely an area that needs work.

How to contribute

Users wanting to contribute to the project may submit pull requests for review. Users wanting to contribute documentation can fork the BCM public website here and add blog posts in the _posts directory. A Keybase Team has been created for those wanting to discuss project ideas and coordinate. Keybase Team for Bitcoin Cache Machine

You can also donate to the development of BCM by sending Bitcoin (BTC) to the following address.

  • Public on-chain donations: 3KNX4GTmXETtnFWFXvFqXg9sDJCbLvD8Zf

BCM Donation Address

About

Run privacy-preserving Bitcoin payment infrastructure at your home or office. Deploy on commodity x64_86.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors