-
Notifications
You must be signed in to change notification settings - Fork 22
Running Conseil
Conseil can either be run in a Docker container or as a JAR file using a Java runtime environment.
If you don't want to run your own Conseil instance and prefer an easy hosted solution, check out Nautilus Cloud.
Please visit the releases page and use a git tag corresponding to a release of your choice. It is advisable to always use the latest release as blockchain protocols keep changing.
Conseil needs access to a Postgres database that is set up with the right schema. To view a SQL file with the right schema, see the file sql/conseil.sql
in the git branch or tag you are using.
Make sure that you apply the schema found in sql/conseil.sql
to the database. Conseil won't work without it!
Conseil also needs access to a Tezos node to collect blockchain data. See instructions for Running Tezos for Lorre.
Synchronizing Lorre from scratch, i.e. downloading all the blockchain data into the database, can take a very long time. We therefore recommend using the database dumps we provide on the releases page. These dumps can be applied to your Postgres database using the pg_restore tool.
Working docker-compose.yml
file for running Conseil and Lorre from DockerHub can be found here:
https://github.com/Cryptonomic/Conseil/blob/2020-june-release-23/docker/docker-compose.yml
Conseil is available from dockerhub. This is the recommended option if you want to use an official release.
You can pull the latest docker image with:
docker pull cryptonomictech/conseil:latest
You can find available tags on our dockerhub page.
The container can be configured using the following environment variables:
Database Config:
- DB_Host - default: db
- DB_User - default: user
- DB_Password - default: password
- DB_Database: default: conseil
Tezos Node Config:
- XTZ_Scheme - http or https, default : http
- XTZ_Host - default: node
- XTZ_Prefix - prefix for api calls, default: ""
- XTZ_Port - default 8732
- XTZ_Network - default mainnet
- XTZ_Platform - default tezos
Conseil Config:
- API_PORT - Conseil API port, default: 80
- API_KEY - Conseil API key, default: conseil
Or, you can use your own config file, in which case specify the environment variable CONFIG
with the path to your file. See Configuring Conseil for details on building a config file.
To start the Lorre indexer run:
docker run cryptonomictech/conseil:latest lorre
To start the Conseil API run:
docker run cryptonomictech/conseil:latest conseil
To run container with environment variables stated before you can use -e
parameter, for example:
docker run -e XTZ_Host=tezos.example.node.com -e XTZ_Port=443 cryptonomictech/conseil:latest conseil
Depending on the flags you pass in, you may want to start the container with the --network="host"
flag in order to make sure Conseil can access Postgres, and the Tezos node.
Alternatively, to build your own image, clone the Conseil git repo, switch to your desired tag or branch and run this command:
docker build -t conseil .
The container can be configured using the following environment variables:
Tezos Node Config:
- CONSEIL_XTZ_NETWORK - default zeronet
- CONSEIL_XTZ_ENABLED - default false
- CONSEIL_XTZ_NODE_PROTOCOL - default https
- CONSEIL_XTZ_NODE_HOSTNAME - default nautilus.cryptonomic.tech
- CONSEIL_XTZ_NODE_PORT - default 8732
- CONSEIL_XTZ_NODE_PATH_PREFIX - default tezos/zeronet/
Bitcoin Node Config:
- CONSEIL_BTC_NETWORK - default mainnet
- CONSEIL_BTC_ENABLED - default false
Conseil Api db:
- CONSEIL_API_DB_NAME - default conseil
- CONSEIL_API_DB_USER - default foo
- CONSEIL_API_DB_PASSWORD - default bar
- CONSEIL_API_DB_URL - default jdbc:postgresql://localhost:5432/postgres
Conseil Api:
- CONSEIL_API_HOSTNAME - default 0.0.0.0
- CONSEIL_API_PORT - default 1337
- CONSEIL_API_KEY - required
- CONSEIL_API_ALLOW_BLANK_KEYS - default false
Conseil Lorre:
- CONSEIL_LORRE_DB_NAME - default conseil
- CONSEIL_LORRE_DB_USER - default foo
- CONSEIL_LORRE_DB_PASSWORD - default bar
- CONSEIL_LORRE_DB_URL - default jdbc:postgresql://localhost:5432/postgres
JVM Config:
- JVM_XMX - recommended -Xmx4G
Or, you can use your own config file, in which case specify the environment variable CONFIG_PATH
with the path to your file. See Configuring Conseil for details on building a config file.
To start the Lorre indexer run:
docker run conseil conseil-lorre
To start the Conseil API run:
docker run conseil conseil-api
To run container with environment variables stated before you can use -e
parameter, for example:
docker run -e CONSEIL_XTZ_NODE_HOSTNAME=tezos.example.node.com -e CONSEIL_XTZ_NODE_PORT=443 conseil conseil-lorre
This is the recommended option if you simply want to run the latest release. Each release listed on GitHub has a JAR file attached which you can simply download.
Alternatively, you can build your JAR file by following the instructions on Building Conseil.
You will need to create a configuration file. See Configuring Conseil for details.
To start the Lorre indexer:
java -Dconfig.file=conseil.conf -jar conseil-lorre.jar <platform> <network>
To start the Conseil API:
java -Dconfig.file=conseil.conf -jar conseil-api.jar