Set environment variables
Set environment variables when running an Aleph node on the testnet for validating transactions.
To run the node you will have to set several variables. Below you can find example configurations which you might want to tailor to your needs.
Variables
It is the most convenient to put all of the variables into a file that you can later source, let's assume it's called set_env.sh
and has the following contents:
NAME
should be a name for your node. It’s mostly used for logging in various ways, so make it specific and recognizable.PUBLIC_IP_OR_DNS
should be set to the public, static IP of your node (or a domain name pointing to such address). Note that this should not include the port, which is specified by a separate variable (VALIDATOR_PORT
).PUBLIC_ADDR
should contain a public address in the libp2p format that your node will be using. This can also be omitted: in that case it will be auto-generated. The libp2p format is the following:/ip4/<your ip>/tcp/30333
or/dns4/<your domain>/tcp/30333
(the port number is what you set asPORT
above).
Remember to export
the variables for later use.
Note that these variables should be available every time you run the binary, so you might want to put them in your .bashrc
(or your shell's equivalent)
Note that the directory that's your $BASE_PATH
has to be manually created if it doesn't exist:
mkdir -p $BASE_PATH && cd $BASE_PATH
Last updated