Gridlock Demo Setup
Run the demo in under 10 minutes!
This guide will walk you through setting up a complete Gridlock setup, including the orchestration node, guardian nodes, and CLI.
1. Setting Up the Orchestration Node
The orchestration node handles overall network management, including the database and NATS distributed networking framework.
# Download setup files
curl -o orch-node-compose.yml https://raw.githubusercontent.com/GridlockNetwork/orch-node/main/docker-compose.yml
curl -o .env https://raw.githubusercontent.com/GridlockNetwork/orch-node/main/example.env
curl -o nats-server.conf https://raw.githubusercontent.com/GridlockNetwork/orch-node/main/nats-server.conf
# Create a local network so all processes can talk to each other
docker network create gridlock-net 2>/dev/null || true
# Start the orchestration node, database, and networking layer
docker compose -f orch-node-compose.yml -p gridlock-orch-stack up
2. Setting Up Guardian Nodes
Run three guardian nodes at once to test a minimum setup
# Download the guardian nodes setup files
curl -o guardian-nodes-compose.yml https://raw.githubusercontent.com/GridlockNetwork/guardian-node/main/docker-compose.yml
curl -o .env https://raw.githubusercontent.com/GridlockNetwork/guardian-node/main/example.env
# Start the guardian nodes
docker compose -f guardian-nodes-compose.yml up
3. Setting Up the CLI
Set up the Gridlock CLI to interact with the network:
Download the setup files for the CLI demo:
curl -o demo.env https://raw.githubusercontent.com/GridlockNetwork/gridlock-cli/refs/heads/main/demo.env
Configure your guardians for the demo:
Look for the guardian configuration details in the output logs from step 2
Edit the
demo.json
file, replacing the placeholder values with your guardian information:
{
"guardians": [
{
"name": "GUARDIAN_1_NAME",
"nodeId": "GUARDIAN_1_NODE_ID",
"networkingPublicKey": "GUARDIAN_1_NETWORKING_PUBLIC_KEY",
"e2ePublicKey": "GUARDIAN_1_E2E_PUBLIC_KEY"
}
]
}
Install and run the CLI:
npm install -g gridlock-cli
gridlock run-example -i
Use the guardian output when you get to the recovery step.
That's it!
See more technical details on the Github repo.
Last updated
Was this helpful?