XRAY/Graph Ogmios is a tool for fast and predictable deployment of Ogmios (Cardano Node) stack in a docker environment. Used in the XRAY/Graph distributed Cardano API provider.
git clone \
--recurse-submodules \
https://github.com/xray-network/xray-graph-ogmios.git \
&& cd xray-graph-ogmiosNETWORK=mainnet \
docker compose -f docker-compose.yaml -p ogmios-mainnet up -d --buildNETWORK=preprod \
OGMIOS_PORT=1338 \
CARDANO_PORT=3001 \
RAPIDOC_OGMIOS_PORT=2501 \
docker compose -f docker-compose.yaml -p ogmios-preprod up -d --buildNETWORK=preview \
OGMIOS_PORT=1339 \
CARDANO_PORT=3002 \
RAPIDOC_OGMIOS_PORT=2502 \
docker compose -f docker-compose.yaml -p ogmios-preview up -d --buildCardano Node Topology
If you need to specify which connections the Cardano Node should establish (useful if you are using node as a relay) - edit the config/cardano-node-ogmios/mainnet/topology.json file before run the docker compose up command.
Restoring From Snapshot
Installing dependepcies (if needed):
sudo apt update && sudo apt install zstd jq wget -y- Enter root dir:
cd xray-graph-ogmios- Run docker compose up (clean run):
NETWORK=mainnet \
docker compose -f docker-compose.yaml -p ogmios-mainnet up -d --build- Stop cardano-node-ogmios container:
docker stop *container_id*- Download lates cardano-node-ogmios db:
wget -c -O - "https://downloads.csnapshots.io/mainnet/$(wget -qO- https://downloads.csnapshots.io/mainnet/mainnet-db-snapshot.json | jq -r .[].file_name)" | zstd -d -c | tar -x -C ./snapshots- Get node_db volume id:
docker volume ls- Remove cardano-node-ogmios db and copy downloaded:
sudo rm -rf /var/lib/docker/volumes/*cardano-node-ogmios_node_db-volume-id*/_data \
sudo mv ./snapshots/db /var/lib/docker/volumes/*cardano-node-ogmios_node_db-volume-id*/_data
- Start cardano-node-ogmios container:
docker start *container_id*TypeScript Client
We recommend to use cardano-ogmios-client. Visit cardano-ogmios-client repo for more information.
Using in Graph Cluster (Traefik Reverse Proxy)
- Clone and run Traefik:
git clone https://github.com/xray-network/traefik-docker.git \
&& cd traefik-docker \
&& docker compose up -d- Set
BEARER_RESOLVER_TOKENanddocker-compose.xray.yaml:
NETWORK=mainnet \
BEARER_RESOLVER_TOKEN=your_access_token \
docker compose -f docker-compose.xray.yaml -p ogmios-mainnet up -d --build- Ogmios — https://ogmios.dev/
- Ogmios Rapidoc Playground (OpenAPI Schema) — https://graph.xray.app/output/services/ogmios/mainnet/api/v1/
- Ogmios OpenAPI Schema (JSON) — https://graph.xray.app/output/services/ogmios/mainnet/api/v1/openapi.json
- Ogmios TypeScript Client — https://github.com/xray-network/cardano-ogmios-client
- Traefik — https://traefik.io/traefik