Starting the Hyperledger Indy test pool reachable on your WIFI network






Hyperledger Indy's README.md explains how to start the @Sovrin test pool on localhost using docker and in a docker network.


Doing it this way the pool is not reachable from clients that are not on your local machine.
Building a mobile app then has the problem that the phone can't talk to the test pool because neither localhost nor the private docker network are reachable.

Starting the test pool on a specific IP address

Dockerfile ci/indy-pool.dockerfile supports an optional pool_ip param that allows changing the IP address of the pool nodes in the generated pool configuration.

You can start the pool with e.g. the IP address of your development machine's WIFI interface so that mobile apps in the same network can reach the pool.

# replace 192.168.179.90 with your wifi IP address
docker build --build-arg pool_ip=192.168.179.90 -f ci/indy-pool.dockerfile -t
.
docker run -itd -p 192.168.179.90:9701-9708:9701-9708 indy_pool
 
To connect to the pool the IP addresses in /var/lib/indy/sandbox/pool_transactions_genesis (in docker) and the pool configuration you use in your mobile app must match.

Here is some Java code that creates a pool configuration. Be sure to put your IP address in there when you open the pool connection.

-------

Please contribute to Indy. Even if your company does not allow you to publish code please consider helping by improving the documentation.
Please sign-off your commits. git commit -s -m 'my first commit' README.md

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.