Tools for quickly setting up a Cardano-Node!
Follow our quickstart guide to get a relay node up and running in less than 10 minutes! The following sections provide other configuration examples.
This container runs with the cardano-node as the ENTRYPOINT (see inside the entrypoint.sh script). A CMD statement provides a default argument if no arguments are provided when running the container. This will simply print the cardano-node version.
Note: Make sure to export HOME=/home/lovelace so that it can be resolved correctly within the container
The following command will run the container in this configuration:
docker run registry.gitlab.com/viper-staking/docker-containers/cardano-node:latestBelow is an example on overriding the default CMD arguments to run cardano-node as a block producing node:
docker run registry.gitlab.com/viper-staking/docker-containers/cardano-node:latest \
run \
--database-path $HOME/cardano-node/db/ \
--socket-path $HOME/cardano-node/db/node.socket \
--host-addr "0.0.0.0" \
--port 4444 \
--config $HOME/cardano-node/config.json \
--topology $HOME/cardano-node/topology.json \
--shelley-kes-key $HOME/cardano-node/pool_kes.skey \
--shelley-vrf-key $HOME/cardano-node/pool_vrf.skeyBelow is an example on overriding the default CMD arguments to run cardano-node as a relay node:
docker run registry.gitlab.com/viper-staking/docker-containers/cardano-node:latest \
run \
--database-path $HOME/cardano-node/db/ \
--socket-path $HOME/cardano-node/db/node.socket \
--port 4444 \
--host-addr "0.0.0.0" \
--topology $HOME/cardano-node/topology.json \
--config $HOME/cardano-node/config.jsonBelow is an example on overriding the entrypoint to enter the container in a shell. This configuration boots the container into a ZSH shell so that the user can interact with the container and run any desired commands. Use this for debugging:
docker run -it --entrypoint /usr/bin/zsh registry.gitlab.com/viper-staking/docker-containers/cardano-node:latestThe script run-cardano-node.sh is provided to simplify running the
cardano-node either via the docker container or from a local installation. The
first argument accepts a command prefix string which specifies where to execute cardano-node so it may be used with the container as:
export CMD="docker run --mount type=bind,source=$PWD/config,target=/home/lovelace/cardano-node/ -p 9100:9100 -p 12798:12798 registry.gitlab.com/viper-staking/docker-containers/cardano-node:latest"
./run-cardano-node.sh $CMDThe run-cardano-node.sh script assumes the location of the node configuration
files and may need to be adjuster per your setup.
You can open a shell in the running container with the following command:
docker exec -it <container_id> /usr/bin/zshYou can get the ID of the running container by running docker ps.
Use this to run cardano-node from a local cardano installation (or to run cardano-node when inside the docker container via shell):
export CMD="/usr/local/bin/cardano-node"
./run-cardano-node.sh $CMD- Node configuration files (latest files here)
- config.json
- topology.json
- genesis.json
These files are different depending on the network (e.g., testnet vs. mainnet)
and may be fetched automatically using the provided get_latest_config_files.sh
script.
- Ensure the node has been updated to enable prometheus by adding the following
to the
config.jsonfile:
hasPrometheus:
- "0.0.0.0"
- 12789
- Pull prometheus docker container from Dockerhub:
docker pull prom/prometheus- Get the IP address of the node you'd like to monitor. If using docker, you can get the IP with:
docker network inspect bridge- Modify prometheus.yml and change
localhostto the container's IP address - Run the prometheus container:
docker run \
-p 9090:9090 \
-v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus- Access the prometheus web UI at
<container IP>:9090/graph
Visit our website for information on our other open source Cardano tools. If you find our tools useful, please consider buying us a beer! 🍺 Contribute