Install a Node¶
This guide builds STRATO from source and starts a node with strato-up. Check the requirements first.
1. Clone the repository¶
git clone https://github.com/strato-net/strato-platform
cd strato-platform
Releases are tagged MAJOR.MINOR, for example 19.1. To build a specific release, check out its tag:
git checkout 19.1
2. Install dependencies¶
./install_deps.sh
On Linux, activate the new docker group membership in your shell, then confirm that Docker works without sudo:
newgrp docker
docker ps
3. Build¶
make
For a Nix-based build, use NIX=true make instead.
Run as a regular user, not root
Do not run make or any strato-* command as root or with sudo.
make does three things:
- It compiles the STRATO executables, including
strato-setup,convokeand the node processes. It installs them and thestrato-*scripts to~/.local/bin. - It installs a BIP-39 word list to
~/.local/share/strato/. - It builds the node's Docker images: nginx, apex, smd, postgrest, prometheus, app-backend, app-ui, local-auth, bridge and tracking.
If ~/.local/bin is not on your PATH, make prints a note. Run source ~/.profile or open a new terminal.
4. Store your OAuth credentials¶
Skip this step if you will run the node with --localAuth.
Run strato-login once:
strato-login
It prompts for three values:
| Prompt | Value |
|---|---|
| OAuth Discovery URL | Press Enter for the default, https://keycloak.blockapps.net/auth/realms/mercata/.well-known/openid-configuration |
| OAuth Client ID | The client ID you received from support.blockapps.net |
| OAuth Client Secret | The client secret |
The credentials are saved to ~/.secrets/strato_credentials.yaml with mode 600. strato-setup copies them into each new node directory. To replace them, run strato-login --force.
Note
Don't pass OAuth client credentials as environment variables. strato-login is the supported path.
5. Start the node¶
strato-up mynode --sslDir=/path/to/ssl --snapshot
strato-up mynode --network=helium --sslDir=/path/to/ssl --snapshot
Notes on the command:
- Node directory.
mynodeis the node directory. It must be the first argument. - Network.
--networkdefaults toupquark, the production mainnet. See Networks. - Snapshot.
--snapshotrestores the latest published snapshot for the network, so the node doesn't replay the chain from genesis. This is recommended. To pick a specific snapshot, add a timestamp:--snapshot=YYYYMMDD-HH:mm:ssZ. - Flag format. Write flags as
--flag=value.strato-upreads--network=<name>in that form to choose which snapshot to restore. - Other flags. For every other flag, see Configuration.
Flags only apply to a new node directory
Flags only take effect when the node directory is created. If mynode already exists, strato-setup ignores the flags and strato-up ignores --snapshot. Both print a warning.
What strato-up does¶
-
Setup.
strato-setupcreatesmynode/and fills it with the generated files:.ethereumH/ethconf.yamlsecrets/docker-compose.ymlcommands.txtgenesis.json- the data directories
It also fetches the node's key from the Vault, creating the key if none exists. Finally it records
mynodeas the default node, sostrato-psandstrato-downwork without arguments. 2. Snapshot restore (with--snapshot).strato-snapshotdownloads the archive over HTTPS from the publicstrato-snapshotsbucket. It verifies the archive's SHA-256 checksum, then loads the archive into the node. 3. Start.convokestarts in the background. It runsdocker compose -p strato up -d --wait, then launches the node processes listed incommands.txt. Its output goes tomynode/logs/convoke.log.
With --localAuth, strato-up then creates the first admin user:
- It prompts for a password.
- It asks you to generate or restore a BIP-39 recovery phrase. That phrase also restores the node's operator identity, so write it down.
See Identity and Vault.
6. Verify¶
Node status¶
strato-ps
strato-ps shows sync progress, then each processing layer's block position:
sequencervmindexedcirrusworld, the highest block your peers report
After that it lists the Docker containers and the processes run by convoke. The sync line reads Sync: syncing, N% ... until it changes to Sync: synced.
Health endpoint¶
curl -s https://<host>/health
Check these fields:
healthStatus: one ofHEALTHY,SYNCING,UNHEALTHYorSYNC STALLED.lastBlock.number: the node's latest block.nodeAddress: the node's address.pbftData.is_validator: whether this node is currently a validator.
Network identity¶
curl -s https://<host>/strato-api/eth/v1.2/metadata
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' \
https://<host>/rpc
The metadata response includes networkName, networkID, chainId and isSynced. eth_chainId returns 0x7030addddcf2 on mainnet and 0xb165855668ca on testnet.
Web interfaces¶
- The STRATO app:
https://<host>/ - The STRATO Management Dashboard (SMD):
https://<host>/smd/
Next steps¶
- Operations: logs, stop and start, upgrades and troubleshooting
- Configuration: all
strato-upflags and environment variables