6d694a6269ccc00f50f31788dfd47dff7102e061 backups: allow extraFiles to override default settings (Erik Arvstedt) 0c45415c86d6f778f0549c14a1028338917128dc backups: exclude bitcoind, liquidd txindex data (Erik Arvstedt) 0853dedc4321c6d75f6a70c8913952f065f07792 tests/regtest: don't fail when restarting bitcoind (Erik Arvstedt) b73c093d3dcb76e91a5ca881ed729cf46643a748 joinmarket-ob-watcher: require nix-bitcoin.service (Erik Arvstedt) 27905e2c3a64fcf10b41c8c76395b4ce134ec5a3 tests: disable restarting joinmarket-ob-watcher (Erik Arvstedt) c8251cdad7d511042c968cd2bda730de2ed5ca2b onion-services: don't always enable Tor (Erik Arvstedt) 3c6a664b7b5e01801ac22f73a02c91985b02e986 examples/configuration: show how to enable sudo/doas for `operator` (Erik Arvstedt) 4d5bc810eb7b0af6da5861c22b880d0ad8c2552f secrets: fix setup-secrets in case of no secrets (Erik Arvstedt) e61c743644a27f47668d477f35903132f17b24bb test: add option `extraTestScript` (Erik Arvstedt) 2cf12d8765e50e4919b613f5788f91eb938afafd README: minor fixes (Erik Arvstedt) e57ab83a5149d97c60a6dc7562ea3bba0ad257d1 docs/hardware: update (Erik Arvstedt) 1b597f92a64f4a77626d7f77c97260addef6a4ea docs/hardware: add line breaks (Erik Arvstedt) a92d6a8e80ca5cd1a7ee579b9d69ee9dcec8be2e netns: expose bridgeIp as an option (Erik Arvstedt) f36df8f5638ec09cc8ab79a0e20db0fff268175c secure-node: remove redundant bitcoind settings (Erik Arvstedt) 09169365d8dfb7ed5ec4c2b197b9fd53bff21f19 liquid: remove unused features (Erik Arvstedt) 82d910e9371f5fa98f5ba10f1c94ea435700a203 nbxplorer: fix bitcoind, liquidd settings (Erik Arvstedt) f61e928139b9b97c4b7afcb773d222691d2df2f6 services: support 0.0.0.0/:: in `address` options (Erik Arvstedt) 1848c3dd983078e145c2f6a449f61d2e6be55024 btcpayserver: minor improvements (Erik Arvstedt) e5616376005136d69c238993b837535e53bbd8ff minor fixes (Erik Arvstedt) Pull request description: ACKs for top commit: nixbitcoin: ACK 6d694a6269ccc00f50f31788dfd47dff7102e061 jonasnick: ACK 6d694a6269ccc00f50f31788dfd47dff7102e061 Tree-SHA512: 9a409e05e75284a27b94ef489ab0bce8bf49b50fa01e31c7c3430e388e273e7186f74794b979b625db9cd7ec2861e9933cc93e4c54139314f7f9d54d9b5f39f2
nix-bitcoin is a collection of Nix packages and NixOS modules for easily installing full-featured Bitcoin nodes with an emphasis on security.
Overview
nix-bitcoin can be used for personal or merchant wallets, public infrastructure or for Bitcoin application backends. In all cases, the aim is to provide security and privacy by default. However, while nix-bitcoin is used in production today, it is still considered experimental.
nix-bitcoin nodes can be deployed on dedicated hardware, virtual machines or containers. The Nix packages and NixOS modules can be used independently and combined freely.
nix-bitcoin is built on top of Nix and NixOS which provide powerful abstractions to keep it highly customizable and maintainable. Testament to this are nix-bitcoin's robust security features and its potent test framework. However, running nix-bitcoin does not require any previous experience with the Nix ecosystem.
Get started
- See the examples for an overview of all features.
- To setup a new node from scratch, see the installation instructions.
- To add nix-bitcoin to an existing NixOS configuration, see importable-configuration.nix and the Flake example.
Features
A configuration preset for setting up a secure node
- All applications use Tor for outbound connections and support accepting inbound connections via onion services.
NixOS modules (src)
- Application services
- bitcoind, with a default banlist against spy nodes
- clightning with support for announcing an onion service
Available plugins:- clboss: automated C-Lightning Node Manager
- helpme: walks you through setting up a fresh c-lightning node
- monitor: helps you analyze the health of your peers and channels
- prometheus: lightning node exporter for the prometheus timeseries server
- rebalance: keeps your channels balanced
- summary: print a nice summary of the node status
- zmq: publishes notifications via ZeroMQ to configured endpoints
- lnd with support for announcing an onion service
- Lightning Loop
- Lightning Pool
- charge-lnd: policy-based channel fee manager
- lndconnect via a REST onion service
- spark-wallet
- electrs
- btcpayserver
- liquid
- JoinMarket
- recurring-donations: for periodic lightning payments
- bitcoin-core-hwi
- Helper
- netns-isolation: isolates applications on the network-level via network namespaces
- nodeinfo: script which prints info about the node's services
- backups: duplicity backups of all your node's important files
- operator: adds non-root user
operator
who has access to client tools (e.g.bitcoin-cli
,lightning-cli
)
Security
- Simplicity: Only services enabled in
configuration.nix
and their dependencies are installed, support for doas (sudo alternative), code is continuously reviewed and refined. - Integrity: The Nix package manager guarantees that all dependencies are exactly specified, packages can be built from source to reduce reliance on binary caches, nix-bitcoin merge commits are signed, all commits are approved by multiple nix-bitcoin developers, upstream packages are cryptographically verified where possible, we use this software ourselves.
- Principle of Least Privilege: Services operate with least privileges; they each have their own user and are restricted further with systemd features, RPC whitelisting and netns-isolation. There's a non-root user operator to interact with the various services.
- Defense-in-depth: nix-bitcoin supports a hardened kernel, services are confined through discretionary access control, Linux namespaces, dbus firewall and seccomp-bpf with continuous improvements.
Note that if the machine you're deploying from is insecure, there is nothing nix-bitcoin can do to protect itself.
Docs
Troubleshooting
If you are having problems with nix-bitcoin check the FAQ or submit an issue.
There's also a #nix-bitcoin
IRC channel on libera.
We are always happy to help.