Skip to main content

Reverse Hash Service Set up

Repository: https://github.com/iden3/reverse-hash-service

There are two options for installing and running the RHS:

  1. Docker Setup Guide
  2. Standalone Mode Guide

Docker Set Up Guide

note

Docker set up should only be used for testing purposes only

Requirements

  • Unix-based operating system (e.g. Debian, Arch, Mac OS X)
  • Docker Engine 1.27
  1. Start the services
docker-compose up -d
  1. Copy schema.sql to the db container
docker cp schema.sql reverse-hash-service_db_1:/
  1. Exec db container
docker exec -it reverse-hash-service_db_1 /bin/bash
  1. Create RHS DB
createdb -U iden3 -h localhost rhs
  1. Upload schema.sql inside on docker container
psql -h localhost -U iden3  -d rhs < schema.sql

Standalone Mode Guide

Requirements

  • Unix-based operating system (e.g. Debian, Arch, Mac OS X)
  • Go version 1.18 or higher
  • Postgres
  1. Access PostgreSQL instance and create database
createdb rhs && psql -d rhs < ./schema.sql
  1. Export DB configuration
export RHS_DB="host=localhost password=pgpwd user=postgres database=rhs"
  1. Build and run RHS servoce
go build && ./reverse-hash-service