I’m happy to announce that I just recently concluded @NotATether ‘s 14 days Bitcoin Node challenge and I must say it was an exciting experience because I happen to have learned and added that knowledge to my knowledge shelve (one of the advantages of joining this forum) Yeah, I got rewarded with 14 merits and that pretty helpful.
Anyways, I didn’t create this thread to be explain how I ran the node challenge and received some merit rewards, I’m here for a completely different reason.
Now to the purpose of this thread. I recently had some technical issues with my laptop, but I was determined to run do the challenge and acquire that knowledge so I had to borrow my friend’s laptop for the duration of the challenge and so I had to return the laptop after the challenge but I still want to continue running the node to help strengthen the network more, which isn’t possible without a laptop, which raised my curiosity about the possibilities of running a node with my mobile phone, whether a full or pruned. Yeah that sounds crazy, but I’m the kind of person that believes anything is possible.
So a few days ago, I started doing my digging and researching, and here I am to share my findings so I could also get some suggestions or contributions from the techies in the house.
1. First thing is to prepare the phone you’ll be needing. Although running a full node with your phone can be pretty challenging and kinda complex, which is why we’ll be focusing on running a pruned node and for this we’ll be needing.
a. A phone with at least 2+GB RAM that you can always leave plugged in to power because running a node consumes battery so your battery can’t be low.
b. Running a node requires lots of memory space, so just like on the computer, you’re advised to use an external SSD, which you can use with the help of an OTG, but if you can equally get a phone with at least 1TB, then I don’t think you’ll be needing an external SSD.
2. Secondly, you download/install the Termux and Linux userland.
a. Install Termux app, you can do that from F-Droid (highly recommended) or you can download from your play store and then grant the app storage location.
b. To run a bitcoin node, you need to have a Linux environment and to achieve this, you need to install proot distro (Ubuntu/Debian) inside the Termux app (tool: proot-distro or you can use Andronix.
3. Get Bitcoin Core binaries.
a. Download prebuilt ARM aarch64 Linux binaries for Bitcoin Core, and please make sure you’re downloading from a trusted build and be sure to verify PGP/signature. But if there are no available prebuilt binaries for your CPU, then look for a PC to compile, and copy the binaries to your phone.
4. Now, install and configure.
a. Inside the proot Linux
# example (adjust for your distro and downloaded tarball)
sudo apt update && sudo apt install wget tar ca-certificates
wget <bitcoin-core-aarch64-tar.gz>
tar -xzf bitcoin-*.tar.gz
sudo cp bitcoin-*/bin/* /usr/local/bin/
b. Create your bitcoin data dir and bitcoin.conf (~/.bitcoin/bitcoin.conf) with minimal entries:
prune=20000 # amount in MiB (set to suit device: min 550, higher = more recent blocks kept)
rpcuser=youruser
rpcpassword=strongpassword
txindex=0 # disabled for pruning
listen=1
5. Now attach your external storage and point bitcoins to it (very recommended)
a. Mount your external SSD and set -datadir=/path/to/external/ssd or symlink ~/.bitcoin to a directory on the SSD.
6. Initial sync
a. Now it’s time to start the daemon: bitcoind -daemon (or with -prune=<MiB> on command line).
b. The initial chain sync is CPU/IO intensive and it can take way more time to sync on phone. So to avoid a full initial sync on your phone, you can simply copy a recent pruned blockchain snapshot from a device that’s already synced to your SSD and start the bitcoind. This is also another way to reduce unusual phone load.
7. Time to Monitor and connect a wallet.
a. Track your progress via Use bitcoin-cli getblockchaininfo.
b. When you’re done syncing, connect a wallet that supports your node.
8. Lastly, keep your node healthy.
a. One way to do this is to always keep the phone plugged to power, so what you can to prevent the phone from overheating and make sure you’re always connected to a stable wifi.
b. Always remember to backup your wallet, (not the blockchain) and secure your rpcuser/rpcpassword. You can equally enable Tor if you want privacy for RPC connection.
Unfortunately, I can’t do this with my current mobile phone, I’ll need to get another phone to try this out, since I’ll have to always leave the phone plugged in. But I just felt like bringing this up here so I can hear your thoughts about this.