(deprecated) Using

This option is deprecated and is not supported anymore. Please setup your node Using Node Binary.

1. Download

Before we proceed to next steps we need to download the necessary files:
curl -LO && chmod +x
./ -d && mv staging/* ./
curl -LO && chmod +x
./ -d -N testnet && mv staging/* ./
Check the node binary and version that was downloaded:
./harmony -V
./ -v

2. Setup

You can run your the node using flags parsing:
./ -D -S -z -D -S -z -N testnet
A full list of active flags as well as examples can be access through running with --help option:
./ --help
Usage: [options]
-c back up database/logs and start clean (not for mainnet)
(use only when directed by Harmony)
-C disable interactive console for bls passphrase (default: enabled)
-1 do not loop; run once and exit
-h print this help and exit
-k KEYFILE use the given BLS key files
-s run setup env only (must run as root)
-S run the as non-root user (default: run as root)
-p passfile use the given BLS passphrase file
-d just download the Harmony binaries (default: off)
-D do not download Harmony binaries (default: download when start)
-N network join the given network (mainnet, testnet, staking, partner, stress, devnet, tnet; default: mainnet)
-n port specify the public base port of the node (default: 9000)
-T nodetype specify the node type (validator, explorer; default: validator)
-i shardid specify the shard id (valid only with explorer node; default: 1)
-a dbfile specify the db file to download (default:off)
-U FOLDER specify the upgrade folder to download binaries
-P enable public rpc end point (default:off)
-v print out the version of the
-V print out the version of the Harmony binary
-z run in staking mode
-y run in legacy, foundational-node mode (default)
-Y verify the signature of the downloaded binaries (default: off)
-m minpeer specify minpeers for bootstrap (default: 6)
-f blsfolder folder that stores the bls keys and corresponding passphrases (default: ./.hmy/blskeys)
-A enable archival node mode (default: off)
-B blacklist specify file containing blacklisted accounts as a newline delimited file (default: ./.hmy/blacklist.txt)
-r address start a pprof profiling server listening on the specified address
-I use statically linked Harmony binary (default: true)
-R tracefile enable p2p trace using tracefile (default: off)
-l limit broadcasting of invalid transactions (default: off)
-L log_level logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
# start node program with all key/passphrase under .hmy/blskeys
# first try to unlock account with .pass file. If pass file not exist or cannot decrypt, prompt to get passphrase. -S
# start node program w/o accounts -S -k mybls1.key,mybls2.key
# download beacon chain (shard0) db snapshot -i 0 -b
# just re-download the harmony binaries -d
# start a non-validating node in shard 1
# you need to have a dummy BLSKEY/pass file using 'touch BLSKEY; touch blspass' -S -k BLSKEY -p blspass -T explorer -i 1
# upgrade harmony binaries from specified repo -1 -U upgrade
# start the node in a different port 9010 -n 9010
# multi-bls: specify folder that contains bls keys -S -f /home/xyz/myfolder
# multi-bls using default passphrase: place all keys under .hmy/blskeys
# supply passphrase file using -p option (single passphrase will be used for all bls keys) -S -p blspass.txt
# disable interactive console for passphrase (prepare .pass file before running command) -S -C

3. Setup Systemd

On this example, we will be installing the harmony daemon for user harmony on its home directory. Daemon will be configured with sudobut it will run with the harmonyuser at the end.
Create the harmony.service file:
sudo vi /etc/systemd/system/harmony.service
Add the content below to the file and save it. Change User to the local user you will be running the daemon and also WorkingDirectory to the home directory where you downloaded the harmony binary file previously. Parameter ExecStart needs to point to this same directory. On the example below we will be running using parameters -S and -z.
Description=Harmony daemon
ExecStart=/home/harmony/ -D -S -z
Give the necessary permissions to run the daemon service, enable it and start it:
sudo chmod 755 /etc/systemd/system/harmony.service
sudo systemctl enable harmony.service
sudo service harmony start
If you want to check the status of the daemon you can use:
sudo service harmony status
To restart, or stop the service daemon you can run:
sudo service harmony restart
sudo service harmony stop
To check your node follow instructions on Checking A Node.