* How to create a bootable Ubuntu Server microSD card
* How to setup internet connectivity on the Raspberry Pi 4
* How to access your Raspberry Pi 4 remotely
* How to install zcashd
* How to setup zcashd
* How to use zcashd
A Wi-Fi network or an ethernet cable with an internet connection
External SSD/HHD with USB3 support
note: keeping your server secure is not simple by any means. Any tips/recommendations/best practices beyond what is talked about in this guide please create a PR and help keep this guide as up-to-date as possible.
Prepare the SD Card
In this step you will create a bootable SD card that will allow your Raspberry Pi 4 to boot. Insert the microSD card into your computer. You may need to use the adapter that comes with the Canakit or any other equivalent adaptor. Install Raspberry Pi Imager for your operating system. Download the version for the OS you currently have access to.
For example in linux you would type the following after downloading:
sudo dpkg -i imager_latest_amd64.deb
Open Raspberry Pi Imager
rpi-imager
Choose OS and Storage Device. Since Raspberry Pi 4's are 64 bit, I recommend choosing "Other general-purpose OS" => Ubuntu => Ubuntu Server 24.04.3 LTS (64 bit). Click on Storage and select your SD Card. Before writing to SD card, click on Advanced options by clicking on the white gear icon near the bottom right corner.
Here you can update:
* Hostname of your Raspberry Pi 4
* Enable SSH
* Create a username and pw
* Enable and configure your wi-fi if needed
Once complete hit Write
Boot Ubuntu Server
If you have an extra monitor and keyboard plug those in now. Note: these are optional. Install the SD card you just formatted into the Raspberry Pi 4 and also plug in the External SSD/HHD into the USB3 port. Also plug in the power cord and turn it on.
Connect remotely to your Raspberry Pi 4
We now need to connect to your Raspberry Pi 4. Things we need:
* Username and pw (from previous step)
* IP address so we can use SSH
* Monitor, and keyboard (optional)
* If you have a monitor and keyboard connected directly to your pi, the rest of this section can be skipped.
Two ways to find your IP address are via your router admin page, or with nmap. If using the router, it depends on which manufacture and I'll defer those details to a quick google search. For nmap, first make sure it is installed:
sudo apt-get install nmap
Find the IP address of your current computer and note the first three sections. This is typically 192.168.1.xxx or 192.168.50.xxx. Plug these details into nmap as follows:
sudo nmap -sn 192.168.50.0/24
or
sudo nmap -sn 192.168.1.0/24
This will display all devices connected to your home network, which should reveal your Raspberry Pi 4's IP address / MAC address. Using your username, pw, and IP address we can now login using SSH
* ssh <username>@<ip address of your pi> note: you must plugin *your* username and *your* IP address, and *your* pw when prompted.
* For example: `ssh ubuntu@192.168.1.25 where the username is *ubuntu* and IP address is 192.168.1.25.
If youâre curious which version Raspberry Pi you are using, try this command:
cat /sys/firmware/devicetree/base/model ; echo
Installing zcashd
Two ways of installing zcashd include downloading a precompiled binary or compiling zcashd from source. I highly recommend compiling from source. For compiling yourself it is highly recommended to cross-compile. Cross-compile is to build on one platform a binary that will run on another platform. One reason for this is Raspberry Pi 4's are low-powered and thus not very fast! Leverage your main computer to help with this. You can grab the latest release here . To cross compile we need to make sure we have the needed packages. Install the following:
These files are found in the /src directory of your latest release download location if you compiled them yourself. Otherwise, the precompiled files are where you downloaded them. Two ways of achieving the tranfers are either using SFTP, or by using your External drive.
SFTP
sftp username@<ip of RaspberryPi4>
put zcash*
External Copy
Simply copy the files onto the External before you plug it into the Raspberry Pi 4. If you already have a full node synced and want to save time, you can also copy the blocks and chainstate data.
cd ~/.zcash/
Simply run:
tar -zcvf blocks.tar.gz /blocks
tar -zcvf chainstate.tar.gz /chainstate
Copy the blocks and chainstate .gz files into your External SSD/HHD. Next mount the External SSD/HDD in the Media folder so you can see it:
lsblk will display all drives connected. Most will be of the format sda
id will show your user and group id's.
sudo mount -o umask=0077,gid=<groupid>,uid=<userid> /dev/sda1 /media/portableHD/
Keep an eye on both who owns the folders/files and also the permissions.
If you copied the blocks and chainstate .gz files from your other computer untar these now. Make sure they are in the .zcash folder on your External drive.
tar - xvzf blocks.tar.gz
tar - xvzf chainstate.tar.gz
Setup /media/portableHD/.zcash/zcash.conf
Notice how we moved the datadir to the External SSD/HDD which has much more space available. Since the default .zcash folder location has been moved, we need to tell zcashd this by using symbolic links:
cp -rp ~/.zcash/* /new_dir // Make copy of datadir or supply with an external HD
rm -rf ~/.zcash // Remove default folder
ln -s /media/portableHD/ ~/.zcash // Symbolic link new data location to the default so zcashd is happy
Run fetch-params.sh script to download needed data for zcashd
./fetch-params.sh
Start a new 'screen' [ program in linux ]. Open zcashd with -datadir set:
How do you resume your zcashScreen after you detached it?
screen -r zcashScreen
How do you stop zcashd ?
zcash-cli stop
How do you create a UA?
zcash-cli z_getnewaccount
Now build a UA receiver according to your needs. This includes Orchard only, Orchard + Sapling, and finally Orchard + Sapling + Transparent. Note you can tell the difference between receivers by how long they are.
It should be noted both, from AND destination addresses can be transparent,sapling, or orchard addresses however you may need to adjust the privacyPolicy flag in order for the transation to be valid. (Some combos wont work if privacyPolicy doesn't make sense!)
Where can I find more info on UA's?
Check out Hanh's post on transaction privacy. Also this post from the zcash forum.