Installing Sparrow Wallet on TailsOS persistently

contenido

Recently, I’ve had the chance to experiment with TailsOS and Sparrow Wallet. Essential pieces for any Bitcoiner.

TailsOS, short for “The Amnesic Incognito Live System,” is a Linux-based operating system designed to preserve users’ privacy and anonymity. It runs from a USB drive or DVD and aims to provide a secure and anonymous environment for online activities.

TailsOS includes encryption and anonymity tools like Tor, which routes traffic through a network of servers to hide the user’s identity and location. Furthermore, TailsOS is designed not to leave any trace on the device it’s used on, as it doesn’t save information permanently, thus offering an additional layer of protection for those seeking to browse the internet discreetly and safely.

Sparrow Wallet is a Bitcoin wallet designed for those who value financial sovereignty. With a focus on security, privacy, and ease of use, Sparrow doesn’t conceal information but provides comprehensive details about transactions and UTXOs in a manageable way.

The wallet supports standard features of modern Bitcoin wallets, such as full support for single and multisig wallets, multiple connection options, compatibility with hardware wallets, full control over coins and fees, and transaction labeling.

Moreover, Sparrow is unique in offering a fully-featured transaction editor that also functions as a blockchain explorer, allowing for the editing and inspection of transaction bytes before transmission. Sparrow encourages privacy and promotes cold storage practices, being user-friendly even for advanced users.

So far, all the guides I’ve found that use Sparrow on TailsOS do so by installing and configuring Sparrow each time the system starts. It’s a secure strategy, but it requires time investment every time you boot up the system.

⚠️ Keep in mind that this guide is not a recommendation on how to use Sparrow with TailsOS; it simply proposes one way to do things. You’ll need to evaluate whether in your personal case you want to store the data or not.

🚨 Do not use this method if you’re going to store any seeds in Sparrow. This would be ideal if you want to store a “Watch Only Wallet” and label the UTXOs (for example).

Once you activate persistent storage in TailsOS from Applications → Tails → Persistent Storage, you should activate among others:

  • Personal Documents → Persistent Folder
  • System Settings → Welcome Screen (optional for convenience)
  • Network → Network Connections (optional for convenience)
  • Advanced Settings → Dotfiles

We are going to download the Sparrow Wallet binary from https://sparrowwallet.com/download/. Since I am using a device with Intel, I will go for the Linux (Intel/AMD) Standalone version (it is important that you download the Standalone version).

At the time of writing this article, the version is sparrow-1.8.2-x86_64.tar.gz.

⚠️ Don’t forget to verify the integrity of the downloaded files following the guide at the bottom of the download page.

Once the integrity of the downloaded data has been verified, let’s create some folders in the persistent storage:

  • ~/Persistent/Programas
  • ~/Persistent/Programas/Sparrow
  • ~/Persistent/Programas/Sparrow/data

You can create all the folders with the following command:

mkdir -p ~/Persistent/Programas/Sparrow/data

The next step will be to extract the contents of the downloaded file sparrow-1.8.2-x86_64.tar.gz into the folder Programas/Sparrow.

Now you will have 3 folders inside Programas/Sparrow: bin, data, and lib.

Let’s do a quick test to see if we can run Sparrow from the terminal:

~/Persistent/Programas/Sparrow/bin/Sparrow -d ~/Persistent/Programas/Sparrow/data

What we’re indicating with the parameter -d when running Sparrow is to assign our data directory. You can see the parameters here: https://sparrowwallet.com/docs/faq.html#how-can-i-run-testnet

If the test goes well, we know that the paths are correct and that our persistent storage has been organized as we wanted.

👊 Close Sparrow.

The next step is to add Sparrow Wallet to the list of applications in TailsOS. To do this, we need to create some more folders, this time within the dotfiles folder:

  • /live/persistence/TailsData_unlocked/dotfiles/.local
  • /live/persistence/TailsData_unlocked/dotfiles/.local/share
  • /live/persistence/TailsData_unlocked/dotfiles/.local/share/applications

Keep in mind that if you go to the /live/persistence/TailsData_unlocked/dotfiles/ folder and create a .local folder, you won’t see it from the file explorer since it’s a hidden file. If you want to view the folder, you’ll need to enable the option to View Hidden Files in the folder.

You can create all the folders with the following command.

mkdir -p /live/persistence/TailsData_unlocked/dotfiles/.local/share/applications

Now we are going to create a new file Sparrow.desktop and edit it with nano:

nano /live/persistence/TailsData_unlocked/dotfiles/.local/share/applications/Sparrow.desktop

The content we are going to put inside that file is the following:

[Desktop Entry]
Name=Sparrow
Comment=Sparrow
Exec=/home/amnesia/Persistent/Programas/Sparrow/bin/Sparrow -d /home/amnesia/Persistent/Programas/Sparrow/data %U
Icon=/home/amnesia/Persistent/Programas/Sparrow/lib/Sparrow.png
Terminal=false
Type=Application
Categories=Unknown
MimeType=application/psbt;application/bitcoin-transaction;x-scheme-handler/bitcoin;x-scheme-handler/auth47;x-scheme-handler/lightning

The source of this file is https://github.com/sparrowwallet/sparrow/blob/80fab6df995afde64a7334cb6faad341b99b6fbe/src/main/deploy/package/linux/Sparrow.desktop, the only details we have changed are the paths to the executable and the icon.

Here we have two options: one is to test the entire system we’ve set up right away like crazy 🤣, or the other is to restart the computer.

If you can’t wait and want to test before restarting, you just need to copy the file we’ve just created to your Home folder, with the following command:

cp /live/persistence/TailsData_unlocked/dotfiles/.local/share/applications/Sparrow.desktop ~/.local/share/applications/Sparrow.desktop

Once you have copied the file, you will see Sparrow Wallet icon appear among the list of applications.

Open Sparrow and configure a server in the preferences.

ℹ️ To connect Sparrow through Tor in TailsOS, you must enable and use the proxy in the server preferences.
Use proxy: enabled
Proxy URL: localhost (or 127.0.0.1)
Port: 9050

⚠️ If you’re having trouble connecting to your node from Sparrow on Tails, visit this article: How to connect Sparrow Wallet to your Bitcoin node on Tails.

Then make sure that in the folder ~/Persistent/Programas/Sparrow/data, some files have appeared (the classic ones from the Sparrow configuration).

If you’ve reached this point and everything above has gone well, it’s time to restart the machine.

Once you restart, log in by unlocking the persistent storage first. Connect to the Tor network and finally open the TailsOS applications. You will see the Sparrow icon, and once you click on it, Sparrow will open with the stored configuration.

We have set up Sparrow on TailsOS to keep it running in persistent storage and avoid installing it every time we start the system.

To create this article, I have referenced these threads:

🖖 If this article has been helpful to you, please share to help others.

Resumir
The article discusses the integration of TailsOS, a privacy-focused Linux operating system, with Sparrow Wallet, a Bitcoin wallet emphasizing financial sovereignty. TailsOS operates from a USB or DVD, ensuring user anonymity and not leaving traces on the host device. It utilizes tools like Tor for secure browsing. Sparrow Wallet is designed for security and privacy, offering features like multisig support and a transaction editor. The author outlines a method to set up Sparrow Wallet on TailsOS with persistent storage, allowing users to avoid reinstalling the wallet each time the system starts. The guide includes steps for downloading Sparrow, creating necessary folders in persistent storage, and configuring the wallet to run from TailsOS. Users are advised to only store non-sensitive data in Sparrow and to enable proxy settings for Tor connectivity. The article concludes with instructions for testing the setup and ensuring that Sparrow retains its configuration after a system restart, thus enhancing user convenience while maintaining security and privacy.