Running an own node of the Beam MW network is not only strengthening your favorite cryptocurrency network but also has certain advantages for your daily wallet usage. For example, an always-online own node allows you to connect to your wallets on all your devices to this trusted node — and so saving space on your devices while preserving perfect privacy for your transactions. Furthermore, it can allow you to run your wallets with the same seed phrase — and so access your funds from whatever device you use.
Thanks to Google Cloud’s Always Free program and the low resource usage of the Mimblewimble protocol behind Beam, it is possible to create an instance on Google Cloud Compute that runs a full Beam node, 24/7, without it costing you anything. This article will guide you to do your own node setup.
How to create your Google Cloud Compute Node
First, you need to set up an account at cloud.google.com as an individual. You will be asked to give the data of a credit or debit card on which you will get charged $1 (and afterward charged back). This is required to qualify for the always free program. Note that with your registration you will be granted a $300 balance to be spent for testing purposes within your first year of membership.
Note that we won’t have to actually spend this testing balance since we want to setup our Beam node within the limitations of the always free program.
Once registered, visit https://console.cloud.google.com. This is your google cloud computing dashboard where you can monitor and create your projects running on the cloud.
In the top right corner next to your user picture hit the “Activate Cloud Shell” button to open a console that will allow us to create our virtual machine instance.
You will see a black colored shell opening up at the bottom for your screen. Already excited? You are only a few seconds away from of getting your personal VM!
The next step is just copy-paste the following (long) line
gcloud beta compute instances create beam-node --zone=us-east1-b --machine-type=f1-micro --tags=beam-node --image=debian-9-stretch-v20180806 --image-project=debian-cloud --boot-disk-size=10GB --boot-disk-type=pd-standard --boot-disk-device-name=beam-disk
Sounds easy? Let’s look what we just created: A debian 9 virtual machine hosted in the us-east data center with a 10 GB boot disk — which will be enough for our Beam node over the next year. Note that free instances are available at the us-west1, us-central1, and us-east1 Google data centers.
How to Access the VM and Install the Node
Now that our VM is created we want to open a console on it and install our Beam node. For this we navigate to the VM instances overview by opening the navigation menu and following “Compute Engine” -> “VM Instances”
In the overview showing up, you will see your lonely VM instance listed. On the right side of the beam node column, you will see a button labeled with “SSH”. Hit this one to open a console window in your browser — this is your tunnel to your node.
You do not see a console showing up? I had my issues with the Firefox browser here, but Chrome / Chromium did the job. Maybe that helps you 😉
Type in the following commands in the console that pops up:
sudo apt-get update sudo apt-get install nano tmux
This installs a command line text editor (nano) and a tool that will allow us to run the node in the background detached from console (tmux).
Now we create a new folder for our node, download the latest (at the time of writing) Beam node release and unpack the archive.
mkdir beam && cd beam wget https://builds.beam.mw/mainnet/2019.08.08/Release/linux/beam-node-3.1.5765.tar.gz tar -xvzf ./beam-node-3.1.5765.tar.gz
How to Configure the Node
Now we are going to configure our node. Type in
to open the command line text editor nano with the configuration file open.
We see that some lines are already in the file — but all of them are commented, indicated by a “#” sign in the beginning of the line. Let’s change this!
Navigate with the arrow keys on your keyboard to the lines you like to change and remove the “#” on those options you want to set. For a minimum setup we need to set the options “port” — which is the port your wallets later use to access your node — and “peer” — which is the first node your own node will poll to download the blockchain.
Furthermore, I recommend adding two lines to the bottom of the file, namely
This will activate the fast synchronization mode of the Beam node and make sure cut-throughs are activated for your node. With this setting, the Beam node will use much less disk space and synchronize quicker. Highly recommended because a free VM is neither fast nor blessed with unlimited disk space.
In case you want to connect multiple wallets with the same seed to the node make further sure you feed the line “owner-key=” with the owner key of the wallet. Else this step is optional.
This is how it looks like in my configuration after editing.
To save your changes in your configuration hit crtl + o and use ctrl+x to close the nano editor.
Finally, it is time to run our node. Type in the following two lines (hit return after each):
That’s it, your node starts up and will start syncing with the network. This may take a while (at the time of writing about 4–5 hours), because the CPU time our free instance gets is very limited.
But you can allow to run it in the background by hitting ctrl+b and then hit d on your keyboard. This will detach the running node from your command line and you will be allowed to close it then and do something else. For example following the next steps to do the firewall configuration or following your plans for your evening. Just as you like 😉
You will be able to get back the detached console window in which your node is running by typing
tmux attach -t 0
to the node console.
Firewall and Network Setup
When you followed all of the above steps you will have a free Beam node running and you will strengthen the network with it — you can not connect your wallet yet! Why? Well — there is this firewall …
Ok, let’s configure the google cloud firewall for your node allowing incoming connections to the port you put into the config file (at mine it was 8100).
In order to do this, we just need the Cloud Shell Console again that we opened at the beginning of this guide to create the VM instance. There you type
gcloud compute firewall-rules create beam-api-port direction=INGRESS --action=ALLOW --rules=tcp:8100 --target-tags=beam-node
and hit return — this will add the new rule “beam-api-port” to the firewall and allow using the port we need.
Now we still need to know the IP address of our running node — and turn it into a static one so it does not change on every reboot. For this, we look up the VM instances page again were the (dynamic) external IP of our node is listed.
Next, we enter
gcloud compute addresses create beam-node --addresses <current_dynamic_address> --global
to make the dynamic ip address static for your VM. Now that you have your own node up and running, you can connect your desktop and mobile wallet directly to it. It is especially relevant for the mobile wallet since it can not (yet) run an own node on the device. As mentioned using an own node has advantages in comfort using Beam as well as guaranteeing you the best possible privacy on your transactions.
To connect your wallet with the node, so to the Settings screen of the wallet and add the IP and port of your new node.
Creating an Always Online Wallet
You still do not have enough of the opportunities your own VM with a Beam node on it gives to you? Ok, then let’s take another step and create a wallet for you that will be always online — so you can receive e.g. donations, pool payouts or your funds from an exchange independently of you being online or not — the VM wallet will do it for you!
For this, we open the console on the VM again just as we did when we downloaded the Beam node. Ready? Then copy the following lines to download and unpack the Beam command line wallet.
mkdir beam_wallet && cd beam_wallet wget https://builds.beam.mw/mainnet/2019.08.08/Release/linux/beam-wallet-cli-3.1.5765.tar.gz tar -xvzf ./beam-wallet-cli-3.1.5765.tar.gz
We will see that the two files were extracted — beam-wallet and beam-wallet.cfg. We will edit that latter file to make our wallet connect to the node we just did set up. Type
to open up the text editor nano again. Now search for the line starting with #node_addr, remove the # and append 127.0.0.1:8100 to this line (if the port of your node was 8100). It should look like this
Once done hit ctrl+o to store and ctrl+x to close the editor.
Now we need to initialize the wallet. For doing this we have two opportunities
a) create a complete new wallet with a random seed
b) recover an existing wallet.
This now depends on your personal preferences — do you want to run this wallet stand alone or do you want the wallet to collect funds for your other desktop or mobile wallets while you are offline? Its your choice, but we will cover both scenarios on course.
a) To create a completely new wallet type in
You will get asked twice about your wallet password and there will be a line started by “Generated seed phrase:”. Note down that seed phrase and pick a secure password you can well remember. Both are important to recover your funds in case this installation gets lost, so take this seriously.
b) In case you already connected a mobile or desktop wallet to your node and the node is having the “owner_key” (see above), you can create a copy of your wallet here that will receive funds for you while your other wallets are offline. For this type in
./beam-wallet --command=restore --seed_phrase '<your BIP 39 phrase>'
Replace here the words within the <> angles with your 12 BIP-39 words, separated by a semicolon ‘;’ in between. After confirming your password the VM wallet will share the same private key as your other wallets and can complete transactions for you while you are offline.
In both cases, we now want to create a receiving address for our always online node. Since the wallet is always online we will pick a non-expiring address for this purpose. Type in
./beam-wallet --command new_addr --expiration_time never
to see your new permanent online Beam address.
The last thing we need to do now is to start the wallet in listening mode, so it collects transactions for us. We will use tmux again to make sure it continues to run when we close the console. Type
tmux ./beam-wallet --command listen
and confirm your wallet password. Now we can detach the tmux session again with crtl+b and then hit d. Voila, your wallet is now waiting for incoming funds and you can safely close the console. Note that for getting the node window back to the active input we now need to call
tmux attach -t 1
because the wallet is running in the second active tmux session.
Final Closing Words
As we see, setting up an own free Beam node is rather easy and definitely worth the effort. But when your node is running please always monitor your cloud account from time to time to make sure that the node does not exceed the free resources — in case it does your trial balance will be touched first and automatically, so there is no immediate danger for your purse. But once the trial balance is expired it could be, so always make sure this does not happen or decide yourself if the cost is worth running an own node.
That said, have fun with your personal Beam node.
Did you like this article?
This is my Beam donation address that runs on an always-online wallet and node I created using the method described in this article.
Come discover Beam and join our community!
Download Beam Desktop Wallet here
Download Beam iOS Wallet on App Store
Download Beam Android Wallet on Google Play
QQ Beam 中国官方社区: https://jq.qq.com/?_wv=1027&k=5Mbs8N4