- Ensure that
koinos-cliis on your path
- Copy the
config/directory to yourkoinos/koinosdirectory - Copy the
envfile to yourkoinos/koinosdirectory and rename it to.env - Set up the block producer by creating the directory
mkdir -p ~/.local.koinos/block_producerand copying the private keycp producer/private.key ~/.local.koinos/block_producer/private.key - Start up the Koinos cluster with
docker compose up - Install dependencies to run the script (you need node JS installed):
yarn install - When the cluster has started producing blocks, execute
yarn bootstrap - After the script completes, you can change the block producer to run
pobalgorithm by modifyingconfig/config.yml
If you want to expose the RPC node, you can use the nginx.conf file. To enable this, you need to manually add the cors-proxy service to your docker-compose.yml file in the koinos/koinos directory. Add the following service block to the services section:
cors-proxy:
image: nginx:alpine
restart: always
ports:
- "80:80"
volumes:
- ~/koinos-local-testnet/nginx.conf:/etc/nginx/nginx.confThe nginx proxy will expose the RPC endpoints on port 80 with CORS headers enabled, allowing you to access the JSON-RPC API, REST API, and gRPC endpoints from external applications.