Go to file
2019-04-12 09:54:31 +00:00
docs Split up and enhance documentation 2019-04-12 11:51:52 +02:00
modules Merge branch 'user-config' of https://github.com/nixbitcoin/nix-bitcoin into nixbitcoin-user-config 2019-04-12 09:03:59 +00:00
pkgs Update gmaxwell banlist 2019-04-11 23:38:47 +02:00
secrets Use plain /bin/sh as /bin/bash does not exist under NixOS. 2019-03-25 14:34:27 +01:00
.gitignore Add rpc user and password as secrets 2018-11-22 23:51:16 +00:00
configuration.nix Clean up configuration.nix formatting 2019-04-12 09:01:49 +00:00
default.nix Make repository importable as NUR (including an overlay) 2019-03-29 11:12:05 +01:00
LICENSE Add license 2019-01-02 14:03:52 +00:00
network-libvirtd.nix Add network-libvirtd.nix for libvirtd environments. 2019-03-29 14:24:28 +01:00
network-vbox.nix Move deployment keys into network.nix 2018-12-06 11:33:13 +00:00
network.nix Stop assuming that clightning is always enabled 2019-04-10 15:48:55 +00:00
non-broken.nix Make repository importable as NUR (including an overlay) 2019-03-29 11:12:05 +01:00
overlay.nix Make repository importable as NUR (including an overlay) 2019-03-29 11:12:05 +01:00
README.md Split up and enhance documentation 2019-04-12 11:51:52 +02:00
shell.nix move nixpkgs-pinned.nix 2019-01-26 18:12:08 +00:00

nix-bitcoin

Nix packages and nixos modules for easily installing Bitcoin nodes and higher layer protocols. This is a work in progress - don't expect it to be bug free or secure.

The default configuration sets up a Bitcoin Core node and c-lightning. The user can enable spark-wallet in configuration.nix to make c-lightning accessible with a smartphone using spark-wallet. A simple webpage shows the lightning nodeid and links to nanopos letting the user receive donations. It also includes liquid-daemon. Outbound peer-to-peer traffic is forced through Tor, and listening services are bound to onion addresses.

A demo installation is running at http://6tr4dg3f2oa7slotdjp4syvnzzcry2lqqlcvqkfxdavxo6jsuxwqpxad.onion. The following screen cast shows a fresh deployment of a nix-bitcoin node.

The goal is to make it easy to deploy a reasonably secure Bitcoin node with a usable wallet. It should allow managing bitcoin (the currency) effectively and providing public infrastructure. It should be a reproducible and extensible platform for applications building on Bitcoin.

Available modules

By default the configuration.nix provides:

  • bitcoind (pruned) with outbound connections through Tor and inbound connections through a hidden service. By default loaded with banlist of spy nodes.
  • clightning with outbound connections through Tor, not listening
  • includes "nodeinfo" script which prints basic info about the node
  • adds non-root user "operator" which has access to bitcoin-cli and lightning-cli

In configuration.nix the user can enable:

The data directories of the services can be found in /var/lib on the deployed machines.

Installation

The easiest way is to run nix-shell (on a Linux machine) in the nix-bitcoin directory and then create a NixOps deployment with the provided network.nix. Fix the FIXMEs in configuration.nix and deploy with nixops in nix-shell. See install.md for a detailed tutorial.

Hardware requirements

  • Disk space: 300 GB (235GB for Bitcoin blockchain + some room)
    • Bitcoin Core pruning is not supported at the moment because it's not supported by c-lightning. It's possible to use pruning but you need to know what you're doing.
  • RAM: 2GB of memory

Tested hardware includes pcengine's apu2c4

Usage

For usage instructions, such as how to connect to spark-wallet, electrs and the ssh Tor Hidden Service, see usage.md.

Troubleshooting

If you are having problems with nix-bitcoin check the FAQ or submit an issue. We are always happy to help.

Docs