Running Directly in Linux

Running prb directly in a Linux shell is not recommended since using Docker is more convenient in both development and production.


  • git
  • Redis 5 or newer
  • Node.js 14 (Latest LTS)
  • pnpm

Set up dependencies and generate Protobuf interfaces

1git submodule init
2git submodule update
3pnpm install
4pnpm proto:build # use `pnpm proto:darwin:build` in macOS
5pnpm proto:build_prpc # use `pnpm proto:darwin:build_prpc` in macOS

Start Services

To start any of the services, run pnpm start_module, all parameters are read from the environment variables of current shell.

 1PHALA_MODULE=fetch # module to start
 3PHALA_DB_HOST=io # hostname/ip to io service
 6PHALA_PARENT_CHAIN_ENDPOINT=ws:// # parent chain substrate websocket endpoint
 7PHALA_CHAIN_ENDPOINT=ws:// # parachain substrate websocket endpoint
 8PHALA_REDIS_ENDPOINT=redis:// # redis endpoint for mq and rpc
10# for `io`
11PHALA_DB_PREFIX=/var/data # path to data directory
12PHALA_DB_TYPE=rocksdb # rocksdb or leveldb