Introduction - Installing a Node
The current release of our TestNet package includes a single installation with a simplified auto-update mechanism. A node installation consists of two folders: the binaries (bin) and the data (data) folders. The bin folder can be anywhere you choose, but we recommend the location
~/node, and we will reference this location later in the documentation so remember to replace with the name that you chose if different. We assume this folder is dedicated to Algorand binaries and will archive it before each update. Note that we do not currently delete anything, but instead we will overwrite our own binaries and add new ones.
When installing for the first time we will ask you to specify a data folder. We recommend using a location under your node folder, e.g.
~/node/data. See Node Overview for a detailed list of all files that are installed on your computer and their functions. You can also set an environment variable that points to the data directory and goal will use this location if a specific data folder is not specified.
Installing a new node is generally a 3 to 4-step process and will depend on the operating system. Choose your operating system below for a step-by-step guide to setting up your environment and installing the correct package for your platform.
One of the motivations behind running TestNet, and having many participants, is to collect telemetry so we have insight into the software's performance and usage. For this reason, the first time you start your node, we enable telemetry by default. In addition to allowing us to collect telemetry, we encourage you to configure a hostname for your machine. This is optional but it will allow us to identify sources of telemetry and more easily diagnose issues. Follow the commands below to setup telemetry, replacing <name> with your desired hostname (e.g. 'SarahsLaptop').
./diagcfg telemetry name -n <name>
If this reports an error instead of your node and GUID values, double-check that you have completed all the steps outlined above.
Please run ./diagcfg telemetry. The output contains the name and GUID of your node. We encourage you to submit the output via the following form: Telemetry Registration. This will allow us to correlate you with your telemetry so we can contact you if we see something that needs further investigation. This data will be used for the sole purpose of improving and supporting the TestNet and later MainNet.
If you wish to disable or enable telemetry, you can do so by running the following command:
./diagcfg telemetry enable|disable
Running the diagcfg commands will create and update the logging configuration settings stored in ~/.algorand/logging.config.
Now you are ready to start your node! We will assume that you are in your node directory and that your data directory is named
data. Run the following command:
goal node start -d data
You should now have a running algorand node! You can verify the daemon is running with:
If it outputs a number (i.e., a process ID) then algod is running.
Sync Node with Network
When you first start a node, it will need to sync with the network. This process can take a while as your node is loading up the current ledger and catching up to the rest of the network. You can check the status of your node by running the following goal command:
goal node status -d data
Or watch the process live with our carpenter tool. It is a long-running program so Ctrl+c to stop watching.
carpenter -d data
goal node status command will return information about the node and what block number it is currently processing. When your node is caught up with the rest of the network, the "Sync Time" will be 0.0 as in the example response below.
Last committed block: 64529 Time since last block: 0.9s Sync Time: 0.0s Last consensus protocol: v0 Next consensus protocol: v0 Round for next consensus protocol: 64530 Next consensus protocol supported: true
Check for Updates
To check for and install the latest update, you can simply run
./update.sh -d ~/node/data at any time from within your node directory. It will query S3 for available builds and see if any are newer than your installed version. To force an update, you can delete algod and run
./update.sh -i -c stable -d ~/node/data again. If there is a newer version, it’s downloaded and unpacked before we shut down your node, back up your files, and install the update. If any part of the process fails, we attempt to restore your previous version (bin and data) and restart the node. If it succeeds, we’ll start the new version of the node even if it wasn’t running when you initiated the update.