Skip to content

Using the Pocket Core Service Node Docker Image

Luis de Leon edited this page Apr 3, 2019 · 26 revisions

Configuring your Pocket Core Service Node

POCKET_CORE_SERVICE_GID Required

The unique identifier for all of your Service Nodes instances. This GID will be provided by the Pocket team and will serve as the primary means of authentication with the Trusted MVP Dispatch Node.

Example POCKET_CORE_SERVICE_GID=GID1

POCKET_CORE_SERVICE_IP Required

The IP, domain, loadbalancer or proxy that points to your Service Node.

NOTE: In case you are hosting more than one service node and/or will expect to receive higher traffic, we suggest to set it up behind a load balancer

Example POCKET_CORE_SERVICE_IP=yourdomain.com

Example POCKET_CORE_SERVICE_IP=x.x.x.x

Defaults to POCKET_CORE_SERVICE_IP=127.0.0.1

POCKET_CORE_SERVICE_PORT Required

The port to be used to connect using your POCKET_CORE_SERVICE_IP

NOTE: In case you are going to production, we suggest to use 443 and setup properly HTTPS

Example POCKET_CORE_SERVICE_PORT=443

Defaults to POCKET_CORE_SERVICE_PORT=80

POCKET_CORE_CHAINS Required

Receives a JSON Array with the chains.json information, for more information about the structure

Defaults to []

Example POCKET_CORE_CHAINS='[{"blockchain":{"name":"AION","netid":"32"},"port":"80","medium":"rpc","host":"myaionmasterynode.com"},{"blockchain":{"name":"ETH","netid":"4"},"port":"80","medium":"rpc","host":"mygethtestnetnode.com"}]'

POCKET_PATH_DATADIR

Absolute path to the data directory (defaults to datadir)

Defaults to datadir

Example POCKET_PATH_DATADIR=datadir

Node configuration related variables

You can define Pocket Core’s configuration in various ways:

  • Fetching configuration from S3 bucket
  • Passing local configuration via env variable
  • Mapping datadir or config folder to a folder with your custom configuration files

Fetching configuration from S3 bucket

POCKET_CORE_S3_CONFIG_URL Required

Receives a URL for S3 bucket or S3 bucket and directory path to download configurations from If not provided, it will lookup your configuration using the POCKET_CORE_CHAINS env variable.

The bucket should contain a file named chains.json. Refer to the configuration files for Pocket Core MVP

In order to download the configuration properly from S3. You will also need to define the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

Example with bucket: POCKET_CORE_S3_CONFIG_URL=s3://mypocketconfigbucket/

Example with bucket subdirectory: sub-directory POCKET_CORE_S3_CONFIG_URL=s3://mypocketconfigbucket/staging

Passing local configuration via env variable

Examples

Running Service Node with the official Pocket Trusted MVP Dispatch Node using S3 config

$ docker run 
    -e POCKET_CORE_DISPATCH_IP=dispatch.pokt.network
    -e POCKET_CORE_DISPATCH_PORT=443
    -e POCKET_CORE_SERVICE_IP=yourservice.com
    -e POCKET_CORE_SERVICE_PORT=80 
    -e POCKET_CORE_SERVICE_GID=GID99  
    -e POCKET_CORE_S3_CONFIG_URL=s3://mypocketconfigbucket/
    -it poktnetwork/pocket-core:mvp-latest

Running Service Node with local configuration

$ docker run 
    -e POCKET_CORE_DISPATCH_IP=dispatch.pokt.network
    -e POCKET_CORE_DISPATCH_PORT=443
    -e POCKET_CORE_SERVICE_IP=yourservice.com
    -e POCKET_CORE_SERVICE_PORT=80
    -e POCKET_CORE_SERVICE_GID=GID99  
    -e POCKET_CORE_DEVELOPER_WHITELIST='["DEVELOPER_OVER_9999"]'
    -e POCKET_CORE_SERVICE_WHITELIST='["SERVICE999"]'
    -e POCKET_CORE_CHAINS='[{"blockchain":{"name":"AION","netid":"256","version":"0"},"port":"80","medium":"rpc","host":"myaionmainnetnode.com"},{"blockchain":{"name":"AION","netid":"32","version":"0"},"port":"80","medium":"rpc","host":"myaionmasterynode.com"},{"blockchain":{"name":"ETH","netid":"1","version":"0"},"port":"80","medium":"rpc","host":"mygethmainnetnode.com"},{"blockchain":{"name":"ETH","netid":"4","version":"0"},"port":"80","medium":"rpc","host":"mygethtestnetnode.com"}]'
    -it poktnetwork/pocket-core:mvp-latest

General

Home

How to contribute

Developer Setup Guide

MVP (Minimum Viable Pocket)

Service Node Setup

Setup Options

Docker Setup

Client Developers

API Documentation

Clone this wiki locally