You'll probably wonder how setting up your new Trezor hardware wallet would be any different on Arch than with any other Linux distribution. You'll be right to think so because it's actually not that different, yet it requires some additional steps.
Bridging the gap
Since Trezor is using a web-application to run it's wallet interface there needs to be a piece of software that bridges the gap between your Trezor hardware and this web-application. For this Trezor has developed an (in true Trezor fashion) Open Source bridge daemon. However they build binary releases for these in both .deb
and .rpm
format which as you probably know (by default) won't run on Arch.
If you look at the AUR however you'll see that there are quite a few community maintained packages out there. Although it might be tempting to simply pick the most popular one and install it through your favorite AUR helper (mine is yay
btw.) it requires quite some trust in the package maintainer. Not only trust because of potential ill intent but also simply the fact that he/she could also be subject to a hack of some sorts. All of this is not very likely but since the whole goal of you purchasing a Trezor is about eliminating trust and storing stuff securely you might want to look into building your bridge from source.
Trezor made this actually super easy by using GO as their programming language. This makes for very fast and easy building.
Below I will explain how I compiled it and set it up to conveniently run at boot-time using systemd. But since I'm raising the issue of trust you would be foolish to not check out the original instructions from the Github Page itself, I will simply repeat some steps for tutorial completeness.
Building trezord from source
GO111MODULE=auto go get github.com/trezor/trezord-go
GO111MODULE=auto go build github.com/trezor/trezord-go
Verify that your build was succesful
./trezord-go -h
If succesful you will see the output of the help
section of the program detailing all the features of this little daemon.
Moving the binary to /usr/local/bin
sudo mv ~/trezord-go /usr/local/bin/trezord
Setting appropriate udev
rules
In order for your regular user to access this USB device you need to set the rules for it in /etc/udev/rules.d/51-trezor.rules
.
Or for the truly lazy fetch the rules straight from te source
sudo curl https://data.trezor.io/udev/51-trezor.rules -o /etc/udev/rules.d/51-trezor.rules
This might require a reboot to get loaded correctly.
Configuring and enabling systemd service
Feel free to use this template for your Systemd entry in /usr/lib/systemd/system/trezord.service
.
Be sure to symlink your systemd service to /etc/systemd/system/multi-user.target.wants
like this:
sudo ln -s /usr/lib/systemd/system/trezord.service /etc/systemd/system/multi-user.target.wants/
sudo systemctl enable --now trezord.service
Voila!
You are now ready to start using your Trezor by going through the original instructions going forward. You have bridged the gap and built from source! Yay!
NOTE: Remember to also update your trezord
binary from time to time. I would recommend starring and subscribing to the Github Page of this project to keep updated on the latest releases. Updating is just as easy as your first compilation:
go clean
GO111MODULE=auto go get -u github.com/trezor/trezord-go
GO111MODULE=auto go build -a github.com/trezor/trezord-go
Then simply move the binary to /usr/local/bin
like before.
sudo mv trezord-go /usr/local/bin/trezord
Have fun and stay safe!
Comments