Local node configuration
Recommended: Run from source
For a single local node (consensus disabled), you can run with or without the indexer:
# Without indexer (faster dev loop; ephemeral)
HYLE_RUN_INDEXER=false cargo run
# With indexer (starts a temporary PostgreSQL; data cleared on stop)
cargo run -- --pg
# With SP1 verifier
cargo run -F sp1
Optional: Persistent storage
For a persistent PostgreSQL:
Then, from the Hyli root:
HYLE_RUN_INDEXER=true \
HYLE_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres \
cargo run
Tip
To reset your local node, delete the ./data folder and restart from Step 1. Otherwise, you risk re-registering a contract that still exists.
Alternative: Start with Docker
Use Docker to run a local node.
Pull the Docker image
Run the Docker container
Run without indexer:
If you run into an error, try adding the --privileged
flag:
Run with indexer (requires a PostgreSQL container):
docker run -d --rm --name pg_hyle -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres
docker run -v ./data:/hyle/data \
-e HYLE_RUN_INDEXER=true \
-e HYLE_DATABASE_URL=postgres://postgres:postgres@pg_hyle:5432/postgres \
--link pg_hyle \
-p 4321:4321 \
ghcr.io/hyli-org/hyli:v0.7.2
You can now create your first app.
Alternative: Build the Docker image locally
If you prefer to build the image from source, run:
Configuration
You can configure your setup using environment variables or by editing a configuration file.
Using a configuration file
Place a config.toml
in the node’s working directory to load it automatically at startup.
See the defaults at src/utils/conf_defaults.toml.
Docker users can mount the file:
docker run -v ./data:/hyle/data -v ./config.run:/hyle/config.toml -e HYLE_RUN_INDEXER=false -p 4321:4321 -p 1234:1234 ghcr.io/hyli-org/hyli:v0.12.1
cp ./src/utils/conf_defaults.toml config.toml
For source users, copy the default config template:
Using environment variables
All variables can be customized on your single-node instance. The mapping uses 'HYLE_' as a prefix, then '__' where a '.' would be in the config file.
Examples: