Mainnet/Testnet: Running Nodes using AWS 1-click Deployment
Last updated
Last updated
This tutorial will use our AWS 1-click Deployment image to start and create the latest Cronos POS Chain 1-Click Node for both Mainnet and Testnet
CAUTION We do not recommend directly running validator on Mainnet by 1-Click deployment. Please use it with caution! Because the 1-click deployment is not running with and your tendermint validator key is in plain text /chain/.chain-maind/config/priv_validator_key.json
. You may consider running validator with .
You will first need to create an account. This will require providing your credit card information to AWS
and you may be subject to getting charged when you create a virtual machine. More details on account creation, check this .
Please read AWS
free trial to see if you are eligible for the free-tier.
Sign in to your AWS account and go to EC2 Dashboard and change to your favourite region. Click "Launch Instance"
Search for "Cronos POS Chain 1-Click Node" in Choose an Amazon Machine Image (AMI) section. Select "Cronos POS Chain 1-Click Node" from the search results.
Network
Select an existing one or default vpc if you don't have any
Subnet
Choose a subnet or default subnet if you don't have any
Auto-assign Public IP
Enable
Other fields
Follow default setting
Follow the default setting with 125
Throughput (MB/s)
Create Tag if needed
By default, the image creates a new security group for you allowing ssh, p2p, rpc, and rest ports. You can remove the default opened rules or add more rules for example: grpc(9090), node_exporter(9100), prometheus (26660), etc.
22
ssh
26656
p2p
26657
rpc
1317
rest
You should consider updating your security group rules to allow access from known IP addresses only.
Click "Launch" once you finish the review
Once the deployment is completed, you can connect to your instance via SSH.
AfterwardAfterwards, go to the chain
directory, and you will find all the essential binaries for setting up your node:
Now we use the reconfiguration script reconfig.sh
to choose the existing networks to join.
CAUTION Blocks before state-sync trust height
will NOT be queryable. If you want to run a full node or a validator with complete blockchain data; It is not suggested to use state-sync.
Clean up the old blockchain data (if any)
The consensus public key information could be found in /chain/.chain-maind/config/priv_validator_key.json
Backup your old /chain/.chain-maind/config/priv_validator_key.json
if you ever created.
The script will also ask you to fill in the moniker
value which is a human-readable display name for tendermint p2p. p2p gossip will allow you to connect with more nodes (data sources).
node_id and node_key are the unique identity of your node. Save them for later use.
chain-maind
is now running in the background as a systemd service.
You can check its log by the command journalctl
, for example:
The latest block height can be found by:
Mainnet
Testnet
Once the tendermint syncs to the latest block, the setup is done! You may move on to the next step if you want to join the network as a validator.
By default, it will choose the recommended instance type (m5a.large) for you. But you can choose another instance type based on / requirements.
You can either create a new key pair or import a key pair. Follow this .
(Optional) You may also enable . Your node will download data related to the head or near the head of the chain and verify the data. This leads to drastically shorter times for joining a network for validator. For validator, It will be amazingly fast to sync the near head of the chain and join the network.
The consensus public key can be found by and please take note of it for the next :
We suggest that you should do this process locally with chain-maind
to avoid exposing your keys on a cloud server. If you haven't installed chain-maind
yet, please follow or .
Mainnet binary for and are also available.
Testnet binary for Mac ( / )and are also available.
Please follow
You should obtain a consensus public key from
Please follow Step 3-5. .
Back your server, and follow
Please follow
You should obtain a consensus public key from
Please follow .
Back your server, and follow