Skip to content

Latest commit

 

History

History
266 lines (186 loc) · 6.79 KB

sparrow-server.md

File metadata and controls

266 lines (186 loc) · 6.79 KB
title parent grand_parent nav_exclude has_children has_toc layout
Sparrow Server
+ Bitcoin
Bonus Section
true
false
false
title description tableOfContents outline pagination
visible
true
visible
visible
true
visible
true
visible
true

Sparrow Server

Sparrow Server is a stripped down version of Sparrow that can be run on systems without displays. It's primarily intended as a configuration utility for running Sparrow as a server daemon.

{% hint style="warning" %} Difficulty: Medium {% endhint %}

Requirements

Installation

Download Sparrow Server

  • Login as admin and change to a temporary directory which is cleared on reboot
cd /tmp
  • Set a temporary version environment variable to the installation
VERSION=1.9.1
  • Download the application, checksums, and signature

{% code overflow="wrap" %}

wget https://github.com/sparrowwallet/sparrow/releases/download/$VERSION/sparrow-server-$VERSION-x86_64.tar.gz

{% endcode %}

{% code overflow="wrap" %}

wget https://github.com/sparrowwallet/sparrow/releases/download/$VERSION/sparrow-$VERSION-manifest.txt.asc

{% endcode %}

{% code overflow="wrap" %}

wget https://github.com/sparrowwallet/sparrow/releases/download/$VERSION/sparrow-$VERSION-manifest.txt

{% endcode %}

  • Import keys that signed the release
curl https://keybase.io/craigraw/pgp_keys.asc | gpg --import
  • Verify the release
gpg --verify sparrow-$VERSION-manifest.txt.asc

Example of expected output:

> gpg: assuming signed data in 'sparrow-1.8.4-manifest.txt'
> gpg: Signature made Thu Mar  7 16:47:57 2024 UTC
> gpg:                using RSA key D4D0D3202FC06849A257B38DE94618334C674B40
> gpg: Good signature from "Craig Raw <[email protected]>" [unknown]
> gpg: WARNING: This key is not certified with a trusted signature!
> gpg:          There is no indication that the signature belongs to the owner.
> Primary key fingerprint: D4D0 D320 2FC0 6849 A257  B38D E946 1833 4C67 4B40
sha256sum --check sparrow-$VERSION-manifest.txt --ignore-missing

Expected output:

> sparrow-server-$VERSION-x86_64.tar.gz: OK
  • If everything is correct, unpack Sparrow
tar -xvf sparrow-server-$VERSION-x86_64.tar.gz
  • Move data files to the home admin user
sudo cp -r Sparrow /home/admin/
  • Clean the remaining installation files from the tmp folder to avoid problems for the next update
sudo rm -r Sparrow && rm sparrow-server-$VERSION-x86_64.tar.gz

{% hint style="info" %} If you come to update, this is the final step. Check the correct update by entering the "Sparrow --version" command, skip the next step, and jump directly to the Run Sparrow section to start Sparrow server again with the new version {% endhint %}

  • Add the Sparrow executable to your PATH by creating a symlink to it within /usr/local/bin, which is already part of the PATH
sudo ln -s /home/admin/Sparrow/bin/Sparrow /usr/local/bin/Sparrow
  • Check the correct installation by reclaiming the version output
Sparrow --version

Example of expected output:

> Sparrow Wallet 1.7.6

Run

  • You can run Sparrow with the following command
Sparrow

{% hint style="danger" %} Sparrow Server doesn't work on MobaXterm with X11-Forwarding enabled in the SSH connection. {% endhint %}

  • In the "wallet" tab you can create or restore your wallet

Connect Sparrow to your backend (optional)

  • Open Sparrow Wallet
Sparrow
  • Go to Preferences > Server > Private Electrum > Continue
  • Set values according to your Electrum Server protocol implementation and test connection
# For Fulcrum (TCP)
URL: 127.0.0.1:50001
Use SSL?: No

# For Fulcrum (SSL)
URL: 127.0.0.1:50002
Use SSL?: Yes
  • You are now connected to your own Electrum Server

Mix Bitcoin with Sparrow Terminal

Launch Sparrow using tmux

  • Start a new tmux session called "Sparrow"
tmux new -s sparrowserver
  • Launch Sparrow Terminal
Sparrow
  • Connect Sparrow Terminal to your own Electrum Server implementation according to the steps above if not already done

Create/import wallet

  • Go to Wallets > Create Wallet
  • Paste the seed words of the hot wallet you will mix bitcoin with. If you use for example Samourai Wallet - do not forget to paste the SW passphrase as well
  • Create a strong password for the Sparrow Terminal wallet to prevent loss of funds in case someone gets access to your node/wallet
  • Open your Wallet

Start mixing

  • Send Bitcoin to your hot wallet if not already done
  • Go to "UTXOs" and select the UTXOs you want to mix. Set Premix priority or fee rate
  • Choose the pool you desire. If not sure, you can calculate which pool to use based on fees you will pay using Whirlpoolfees. It is recommended to use the most economical solution
  • Enter SCODE if available, and you will get a discount on the pool fee. You can monitor SCODEs by following the Samourai Wallets RRSS. SCODEs are shared occasionally at random by the Samourai Wallet developer team to give Whirpool participants discounted mixing fees
  • Mix selected funds
  • Once confirmed, go to Accounts > Postmix > UTXOs > Mix To
  • You can mix to cold storage if desired. Select the value for minimum mixes before sending them to cold storage
  • If you use Whirlpool with Dojo as well - set the Postmix index range to "odd". This way you improve your chances of getting into a mix by running two separate mixing clients at the same time, using different index ranges to prevent mix failures

Detaching a session

  • Detach tmux session to run Sparrow Server in the background
  1. Press Ctrl + b once
  2. Press d once

Closing or logging out from your node without detaching would cause mixing to stop. Sparrow Server now runs as a separate process regardless of your disconnecting from the node

  • You can view tmux sessions using the following command
tmux ls
  • You can get back in sessions using
tmux a
  • Or use this if you have other sessions opened
tmux a -t sparrowserver
  • You can leave and delete the tmux session by pressing Ctrl + d

Upgrade

Follow the complete Installation section replacing the environment variable "VERSION=x.xx" value for the latest if it has not been already changed in this guide.

Uninstall

  • Delete Sparrow symlinks & directory
sudo rm /usr/local/bin/Sparrow
sudo rm -r /home/admin/Sparrow