3.1 KiB
Updating
Run git pull in the nix-bitcoin directory, enter the nix shell with nix-shell and redeploy with nixops deploy -d bitcoin-node.
Verifying GPG Signatures (recommended)
-
Import jonasnick's gpg key
gpg2 --receive-key 36C71A37C9D988BDE82508D9B1A70E4F8DCD0366 -
Trust jonasnick's gpg key
gpg2 --edit-key 36C71A37C9D988BDE82508D9B1A70E4F8DCD0366 trust 4 quit -
Verify commit after
git pullgit verify-commit <hash of latest commit>
Nodeinfo
Run nodeinfo to see your onion addresses for the webindex, spark, etc. if they are enabled.
Connect to spark-wallet
-
Enable spark-wallet in
configuration.nixChange
# services.spark-wallet.enable = true;to
services.spark-wallet.enable = true; -
Deploy new
configuration.nixnixops deploy -d bitcoin-node -
Get the onion address, access key and QR access code for the spark wallet android app
journalctl -eu spark-walletNote: The qr code might have issues scanning if you have a light terminal theme. Try setting it to dark or highlightning the entire output to invert the colors.
-
Connect to spark-wallet android app
Server Settings Scan QR Done
Connect to electrs
-
Enable electrs in
configuration.nixChange
# services.electrs.enable = true;to
services.electrs.enable = true; -
Deploy new
configuration.nixnixops deploy -d bitcoin-node -
Get electrs onion address
nodeinfo | grep 'ELECTRS_ONION' -
Connect to electrs
On electrum wallet laptop
electrum --oneserver --server=<ELECTRS_ONION>:50002:sOn electrum android phone
Three dots in the upper-right-hand corner Network Server > Enter <ELECTRS_ONION> Back Auto-connect: OFF One-server mode: ON
Connect to nix-bitcoin node through ssh Tor Hidden Service
-
Run
nodeinfoon your nix-bitcoin node and note theSSHD_ONIONnixops ssh operator@bitcoin-node nodeinfo | grep 'SSHD_ONION' -
Create a SSH key
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -
Place the ed25519 key's fingerprint in the
configuration.nixopenssh.authorizedKeys.keysfield like so# FIXME: Add your SSH pubkey services.openssh.enable = true; users.users.root = { openssh.authorizedKeys.keys = [ "[contents of ~/.ssh/id_ed25519.pub]" ]; }; -
Connect to your nix-bitcoin node's ssh Tor Hidden Service, forwarding a local port to the nix-bitcoin node's ssh server
ssh -i ~/.ssh/id_ed25519 -L [random port of your choosing]:localhost:22 root@[your SSHD_ONION] -
Edit your
network-nixos.nixto look like this{ bitcoin-node = { config, pkgs, ... }: { deployment.targetHost = "127.0.0.1"; deployment.targetPort = [random port of your choosing]; }; } -
Now you can run
nixops deploy -d bitcoin-nodeand it will connect through the ssh tunnel you established in step iv. This also allows you to do more complex ssh setups thatnixops sshdoesn't support. An example would be authenticating with Trezor's ssh agent, which provides extra security.