Hardware wallets
Connecting your wallet to your own node
How to set up and connect Trezor Suite to a full node running Electrum server
For more control over your privacy, Trezor users can connect to any node running Electrum Server when using the app’s desktop version. Note that you cannot connect to your own node via the Trezor Suite web app. By connecting to your own node, you can prevent data about your hardware wallet use from being leaked to a third-party host. This guide introduces why using your own node matters and how to get set up.
Running your own node can offer additional peace of mind as data such as addresses and balances are never shared externally, but the concept can be too advanced for some users. It is still completely safe to continue using the default backend settings, which connect Trezor Suite to SatoshiLabs’ nodes. These nodes are run by us directly, operate on open-source Blockbook software, and do not keep track of user data.
Contents
- What is a full node?
- Setting up a custom node connection
- Connecting Trezor Suite to Umbrel
- Building your own full node
What is a full node?
A node is software that indexes the entire blockchain, checking for and verifying new transactions. Having a network of decentralized nodes running independently is what keeps the network secure, preventing double spends, and resilient, preventing the network from going offline. Full nodes store and keep track of a lot of data, so lightweight nodes also exist, where the data is heavily pruned to keep computing requirements low.
Running a full node means maintaining a copy of the Bitcoin blockchain, and continuously checking for new transactions and blocks to validate. The key part of this is bitcoind
, a ‘headless’ piece of software that can retrieve and send data to the blockchain. It is pretty difficult to work with on its own, so interfaces like Electrum server, Blockbook and Bitcoin core are built on top of the Full node functionality of bitcoind
to make it easier and automate some processes.
Why Electrum server?
There are three options when setting your Trezor Suite backend: connect to the default nodes run by SatoshiLabs; connect to a node running Blockbook; or connect to a node running Electrum Server.
The Electrum server implementation is essentially just a
bitcoind
client set up in a way that meets the needs of Electrum, an open-source software wallet.
Having software between bitcoind
and your wallet is great as it can cache data, tune performance and provide additional information such as fiat conversion rates. By default bitcoind
can not give you the full transaction history of an address, so Electrum server acts as a layer on top, with a so-called address index feature to provide such functionality.
Advantages of running your own node
When you connect to the blockchain without a node of your own, you connect to a server hosted by someone else. If the server were malicious or attacked, it could serve Trezor Suite incorrect data and impact the ability to use Bitcoin.
Connecting to a third-party node can also leak data, such as the addresses and transactions you are querying. The node host can also tell how much Bitcoin you have, among other things. Using Tor you can at least protect your identity so no one knows who you are, but your addresses can be linked together. Connecting to your own node prevents your data from being sent to third-party node operators.
Setting up a custom full node connection
If you have set up a node of your own or wish to connect to an existing public node running Electrum server, you will need three pieces of data: the address to connect to, the port to connect to, and the protocol (TCP or SSL) to use for the connection.
The address is the URL, IP address or Tor .onion address that identifies your node. The port is the connection that address has designated to accept external wallet connections. The protocol specifies whether SSL is enabled or disabled, i.e. whether the connection between your node and Trezor Suite will be encrypted or not.
Use these three data points to construct a string in the format address:port:protocol
. For example, electrum.blockstream.info:50001:t
.
Once you have constructed a string like the above, simply open the Settings menu in Trezor Suite and go to the Crypto tab. Hover over the Bitcoin button and a gearwheel will appear, click on it to open your Backend settings for Bitcoin.
A pop-up menu will appear with a list of currently connected backends. Click on the dropdown menu and select Custom Electrum server. If this is your first time, you will be presented with a blank input field. Enter the URL, port and protocol in the format shown above, then click confirm.
More than one custom server can be set, so just repeat the process until all your nodes have been added.
Once you have set your custom backends, click confirm to save your settings and then close the pop-up. It may take several moments to establish a connection. A new icon will appear in the top-right of the menu-bar, showing that a custom backend has been set.
Clicking on the icon will show details of the node which is currently connected to and its connection status. A yellow dot indicates the connection is not yet established, while a green dot shows the connection is working. Clicking on the name of the connected node will reopen Backend settings.
Connecting to your node over Tor using onion addresses
Servers which operate over the Tor network are accessible using an onion address. These are long strings of characters which substitute the traditional .com
URL format and instead end in .onion
.
To connect to your backend over Tor, you need an onion address, a port and a protocol — onion addresses are always set to TCP so the protocol will be t
. Once you’ve added these details and clicked confirm, all communication with your node will take place over the Tor privacy network.
When connecting to your node over Tor, Tor must be enabled in order for Trezor Suite to function properly. Trezor Suite will automatically prompt you to switch on Tor if the backend it is trying to connect to is located at an onion address.
Disabling Tor will prevent you from connecting to your node, therefore preventing you from sending transactions or using other features. If you have multiple custom backends active, Trezor Suite will attempt to connect to a different, non-onion backend when Tor is disabled.
Only one node is ever connected to at one time, but if you have several nodes running, you can add them to the list of connections and Trezor suite will attempt to connect to others if a connection drops.
Practical step-by-step example: Connecting Trezor Suite to Umbrel
One of the main reasons Electrum server support was chosen for this implementation is that it is commonly found in off-the-shelf home node solutions such as a Raspberry Pi running Umbrel. Here we cover the process of getting connection details from a device running Umbrel and show where to enter them in Trezor Suite.
First you will need Umbrel to provide the connection details. Go to Connect Wallet in the side menu, then select Electrum server from the dropdown menu.
Identifying your node
On the next screen, you will be shown details needed to connect your node. Umbrel shows three pieces of information which you need to copy out, in the format address:port:protocol
.
The address is the URL, IP address or Tor .onion address that identifies your node. The port is the connection that address has designated to accept external wallet connections. The protocol specifies whether SSL is enabled or disabled, i.e. whether the connection between your node and Trezor Suite will be encrypted or not.
Copy the data into Trezor Suite and separate it with colons. For the protocol, enter s
if the connection is secured by SSL, or t
if SSL is disabled, signifying a plain TCP connection. Put all together, you end up with something that looks like this: ex4mpl3avds34zbtf4xustmzei6nlr3g62fz7c7tp7iqemmpwjx7ktad.onion:50001:t
You can add multiple backends at once, but Trezor Suite will only connect to one at a time. When you’re done, click Confirm.
Connecting over Tor
To connect to an onion address, Tor must be enabled in Trezor Suite. If you attempt to connect to a node located at an onion address you will first be prompted to enable Tor. When multiple connections are available, Trezor Suite will switch to the appropriate connection depending on whether Tor is on or off.
Establishing a connection
It may take several moments for a connection to be established. You can check the connection status by clicking on the Backends icon. A green dot shows that it’s working, while yellow means it is still trying to establish a connection. While Trezor Suite attempts to connect, you will be shown a message in your Bitcoin Account with the option to refresh the connection.
Building your own full node
Running your own full node strengthens the Bitcoin network and gives you more transparency in how your transactions are broadcast. There are many ways to build your own full node, and it can be as simple as installing some software on your computer. Factors to think about when deciding how to implement you node include space, noise, connection reliability, and cost, as well as your technical abilities.
Nodes should aim for the highest possible uptime, as they must be online to validate new transactions. Many people choose to build a designated machine for their node to run on, to allow it to remain online without needing to provide constant power to their main computer. A Raspberry Pi is a popular choice as it is cheap, yet powerful enough to handle node computing requirements.
The open source community has created many guides to building one’s own node for different hardware. Below are a few approaches to consider, each with different pros and cons. Note that you should first verify the signature of any software you plan to install.
Installing Blockbook on your home server. Blockbook is a blockhain indexer that can be installed on Linux Debian machines. Once set up, simply select Custom Blockbook server from the dropdown on the Bitcoin Backend settings menu in Trezor Suite and add the backend details from Blockbook settings.
Buying an off-the-shelf node is a good option for anyone with low technical skills. Several companies now make plug-and-play machines that can run Bitcoin and Lightning nodes with minimal setup. Generally these are more expensive than a DIY approach.
A Raspberry Pi node can make a neat self-contained and portable node solution for minimal expense. One caveat being that older models often don’t have sufficient resources to run the necessary software. A node-specific operating system like Umbrel OS, which comes bundled with Electrum server, requires a Raspberry Pi 4 at minimum. Make sure the equipment you choose is appropriate for the software setup you are planning to run.
Running Bitcoin Core on your computer . Bitcoin Core is not currently supported by Trezor Suite. Bitcoin Core is most likely the easiest and cheapest way to get started, using your regular computer. Installation takes a few minutes, but it may take several days before the initial block download completes, which is standard for all types of full node.
Future updates of Trezor Suite will further expand full node capabilities, making it easy for anyone to remain in full control when using Bitcoin.