A Relay Node is a full node in the Ark Network; it maintains a complete copy of the ledger (blockchain). These nodes serve as a public API endpoint, use an internal service discovery mechanism to locate other nodes and keep each other in sync. Public nodes are used by the SPV clients to transmit signed transactions.
core-commander only supports Ubuntu (16.04, 18.04) and depends on PostgreSQL as the persistent store.
Ark Nodes execute many query intensive operations. The most cost-effective approach for running a high-performance Node is choosing SSD over HDD. Increasing the total RAM improves cache performance.
Stable internet connection
Access to multiple open ports (actual ports may be configured)
|service||port||required||enabled by default||documentation|
On a fresh Ubuntu installation, follow these commands.
Always ensure your server has the latest set of updates, due to performance and security considerations.
sudo apt-get update && sudo apt-get upgrade
It is best to create a specific Ark-related user, which can later own the required databases as well.
sudo adduser username sudo usermod -aG sudo username
Switch to the new user account and use
git to obtain the installation script. Git is a required dependency of
core-commander, as it relies on git to check for updates.
sudo su - username git clone https://github.com/ArkEcosystem/core-commander
core-commander install and update software dependencies. It might request sudo privileges depending on which version of the script you are using.
___ ____ __ __ ______ ___ ____ / | / __ \/ //_/ / ____/___ ________ |__ \ / __ \ / /| | / /_/ / ,< / / / __ \/ ___/ _ \ __/ / / / / / / ___ |/ _, _/ /| | / /___/ /_/ / / / __/ / __/_/ /_/ / /_/ |_/_/ |_/_/ |_| \____/\____/_/ \___/ /____(_)____/ ______ __ / ____/___ ____ ___ ____ ___ ____ _____ ____/ /__ _____ / / / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __ / _ \/ ___/ / /___/ /_/ / / / / / / / / / / / /_/ / / / / /_/ / __/ / \____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_/\___/_/ =============================================================== ==> Installing system dependencies... ... ==> Installing node.js & npm... ... ==> Installed node.js & npm! ==> Installing Yarn... ... ==> Installed Yarn! ==> Installed system dependencies! ==> Installing program dependencies... ==> Dependencies [libcairo2-dev ] are not installed. ==> Installing program dependencies... ... ==> Program dependencies Installed! ==> Installing PostgreSQL... ... ==> Starting PostgreSQL... ==> Started PostgreSQL! ==> Installed PostgreSQL! ==> Installing NTP... ... ==> Stopping NTP... ==> Stopped NTP! ... ==> Starting NTP... ==> Started NTP! ==> Installed NTP! ==> Installed program dependencies! ==> Installing node.js dependencies... ==> [pm2 lerna ] are not installed. ==> Installing node.js dependencies... ... ==> Installed system updates! ==> All system dependencies have been installed! Press any key to continue
Depending on the installed dependencies, a reboot might be required.
... ==> Checking for system updates... ... ==> All system dependencies have been installed! ... ==> A reboot is required to complete the system update. It is recommended to reboot now.
If a reboot was required, log back in and run Core Commander with bash again.
If your repository is not at the current branch's
core-commander will inform you that an update is available.
An update is available for Ark Core, do you want to install it? [Y/n] :
Afterward, you will be told that your system is up to date and the command console is shown. The top two rows display:
| ||the current |
| ||version of NodeJS uses by the relay node|
| ||version of the configured |
| ||status of the relay service|
| ||status of the forging service; indicates if this relay is configured as a delegate.|
| ||connection status with the |
=============================================================== Core: a71f007f NodeJS: 10.15.0 PG: 10.6 =============================================================== Relay: Off Forger: Off NTP: On PG: On =============================================================== A. Manage Ark Core R. Manage Relay F. Manage Forger E. Manage Explorer C. Manage Commander =============================================================== M. Miscellaneous =============================================================== L. Show Log P. Show Process Monitor =============================================================== H. Show Help =============================================================== X. Exit =============================================================== Please enter your choice:
A. Manage Ark Core to configure the relay node, then
C. Configure Ark Core. We will now configure the database connection parameters and logging level.
=============================================================== U. Update Ark Core P. Uninstall Ark Core C. Configure Ark Core =============================================================== L. Configure Log Level D. Configure Database A. Configure Hosts & Ports R. Reset Configuration =============================================================== H. Show Help =============================================================== X. Back to Main Menu ===============================================================
You will be presented with a selection of networks.
mainnet is the actual Ark network,
testnet are used by the core developers and community to develop Ark and test surrounding infrastructure. Choose
1. mainnet for production use.
... ==> Which network would you like to configure? 1) mainnet 2) devnet 3) testnet #?
You will be requested to enter different settings by a series of prompts.
Credentials are not censored in the console, ensure they are not observed nor logged.
... Enter the database host, or press ENTER for the default [localhost]: Enter the database port, or press ENTER for the default : Enter the database username, or press ENTER for the default [$USER]: Enter the database name, or press ENTER for the default [ark_mainnet]: ... ==> Which log level would you like to configure? 1) debug 2) info 3) warning 4) error
core-commander will attempt to create the specified user and database. You may be prompted if the user or database already exists. Decline to overwrite existing users or databases.
==> Creating Database... The database user $USER already exists, do you want to overwrite it? [y/N] : N createdb: database creation failed: ERROR: database "ark_mainnet" already exists ==> Created Database!
Lerna will perform a check on old dependencies and remove outdated/unused packages. Afterward, it will prompt you to start the relay node, enter
lerna notice cli v3.5.0 lerna info versioning independent lerna info clean removing /home/$USER/ark-core/packages/core-API/node_modules lerna info clean removing /home/$USER/ark-core/packages/core-blockchain/node_mod ... Ark Core has been configured, would you like to start the relay? [Y/n] :
Check the node status. Back in the main console, Relay should be set to
=============================================================== Core: a71f007f NodeJS: 10.15.0 PG: 10.6 =============================================================== Relay: On Forger: Off NTP: On PG: On ===============================================================
Monitor the sync progress using the log stream. Enter
R. Manage Relay, and then
L. Show Log
1|ark-core-relay | [2019-01-08 09:37:40][INFO] : Starting Round 898 🕊 1|ark-core-relay | [2019-01-08 09:37:40][INFO] : Saving round 898
Each round represents ~51 blocks synced. ::: info A single round consists of 51 delegates each forging a single block. Sometimes a delegate misses a block, and thus around contains < 51 blocks on average. :::
If your organization policy doesn't allow the use of other installation tools - meaning requirements clearly state that a standalone installation is needed, then the following scripts will help you with the installation of the Ark blockchain. The script assumes you have configured the other services such as
PostgreSQL and is not idempotent.
The following scripts assume that NodeJs and
PostgreSQL are already installed on your system. For minimum versions, please use
NodeJs >10 and
Postgres database >9.5. Install them according to your operating system instructions.
The script below is an ARK Core install script. You can adjust it to your own needs and system requirements.
sudo yarn global add pm2 lerna sudo -u postgres psql -c "create user ark with password 'password';" sudo -u postgres psql -c "create database ark_mainnet with owner 'ark';" mkdir -p ~/.ark/config cat > ~/.ark/.env <<EOL ARK_LOG_LEVEL=debug ARK_DB_HOST=localhost ARK_DB_PORT=5432 ARK_DB_USERNAME=ark ARK_P2P_HOST=0.0.0.0 ARK_P2P_PORT=4001 ARK_API_HOST=0.0.0.0 ARK_API_PORT=4003 ARK_API_RATE_LIMIT=false ARK_API_ENABLED=true ARK_WEBHOOKS_HOST=0.0.0.0 ARK_WEBHOOKS_PORT=4004 ARK_GRAPHQL_HOST=0.0.0.0 ARK_GRAPHQL_PORT=4005 ARK_JSON_RPC_HOST=0.0.0.0 ARK_JSON_RPC_PORT=8080 EOL cd ~/ git clone https://github.com/ArkEcosystem/core.git ark-core cp -f ~/ark-core/packages/core/lib/config/mainnet/* ~/.ark/config/ cp -f ~/ark-core/packages/crypto/lib/networks/ark/mainnet.json ~/.ark/config/network.json cd ark-core lerna bootstrap cd packages/core pm2 --name 'ark-core-relay' start -l ~/ark-core.log --merge-logs ./bin/ark -- relay --config ~/.ark/config --network mainnet
pm2 stop all cd ark-core git reset --hard git pull lerna bootstrap rm -f ~/.ark/config/peers_backup.* cp -f ~/ark-core/packages/core/lib/config/mainnet/* ~/.ark/config/. cp -f /home/node/ark-core/packages/crypto/lib/networks/ark/mainnet.json /home/node/.ark/config/network.json pm2 start all --update-env
Ensure you properly restart the node process when editing your .env file. Use the
--update-env flag, for example:
pm2 restart all --update-env
Please note that API will be available when the node has synced with the network, which can take up to 15 hours depending on your network speed.
Now that the relay node has been configured, you should head over to the JSON-RPC installation guide or look at relevant Public API endpoints related to blockchain functionality to manage your wallets and transactions.
If you need to configure your node further, go to:
Please read the documentation pages for all of our Ark API clients and cryptography libraries (offered in many programming languages).
Also, read the API documentation.