Local node configuration
Recommended: Run from source
For a single local node (consensus disabled) with an indexer, clone the hyli repository and run:
This command starts a temporary PostgreSQL server and erases its data when you stop the node.
Optional: Persistent storage
For persistent storage, start a standalone PostgreSQL instance:
# Start PostgreSQL with default configuration:
docker run -d --rm --name pg_hyle -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres
Then, navigate to the Hyli root and run:
Alternative: Start with Docker
Use Docker to run a local node.
Pull the Docker image
Run the Docker container
If you run into an error, try adding the --privileged
flag:
To run with an indexer, add the parameter -e HYLE_RUN_INDEXER=true
and set up a running PostgreSQL server with Docker:
And the node linked to it:
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.
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: 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
To load settings from a file, place config.toml
in your node's working directory. It will be detected automatically at startup.
For documentation, see the defaults at src/utils/conf_defaults.toml.
For Docker users, mount the config file when running the container:
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.
e.g.
id
is set with HYLE_ID="your_id"
.
run_indexer
is set with HYLE_RUN_INDEXER="true"
.
p2p.address
is set with HYLE_P2P__ADDRESS="127.0.0.1:4321"
(note the double __ for the dot).