Docs
  • Welcome to the ipEHR docs
  • Concepts
    • Basics
      • What is EHR?
      • What is ipEHR?
      • ipEHR and the problems it solves
      • How ipEHR works
    • Components
      • Gateway
      • Datastore Node
      • Document Index
      • Users Directory
      • Access Management
      • Data publishing
    • Encryption
  • Guides
    • Install
      • Contracts deployment
      • Gateway
      • Stat
  • Reference
    • APIs
      • Gateway HTTP REST API
      • Stat HTTP REST API
    • Contracts
      • EhrIndexer
      • Users
      • AccessStore
      • DataStore
Powered by GitBook
On this page
  • Build from source
  • Docker
  1. Guides
  2. Install

Gateway

PreviousContracts deploymentNextStat

Last updated 1 year ago

Build from source

Install Prerequisites

You will need an up-to-date version of Go to build your project. Please follow installation instructions provided .

Cloning

cd /srv
git clone https://github.com/bsn-si/IPEHR-gateway.git

Configuration

cd IPEHR-gateway
cp config.json.example config.json

You can change the parameters inside the configuration file according to your needs.

To work, you will need a private account key in the blockchain, which will be used to send transactions. By default it is located in the file $HOME/.ipehr/.blockchain.key, but you can specify another path in the config in the contract.privKeyPath parameter.

mkdir -p ~/.ipehr
echo "<PRIVATE_KEY>" > ~/.ipehr/.blockchain.key
chmod 600 ~/.ipehr/.blockchain.key

In order for an account to be able to interact with contracts, it must be added by the contract administrator to the whitelist.

Building

cd /srv/IPEHR-gateway/src
go build -o ../bin/ipehr-gateway cmd/ipehrgw/main.go

Running

/srv/IPEHR-gateway/bin/ipehr-gateway -config=/srv/IPEHR-gateway/config.json

Docker

here