Deploy Local Testnet

There are two options to run the pdiem demo:

  1. Use our Docker Compose file
  2. Build from the source and run it directly

This guide will only cover the Docker Compose approach because it handles everything automatically for you. It installs the dependencies, builds the code, starts the network with the components connected correctly, and start them.

In the development environment we build the code natively. The pro users who want to hack on our code can look into the Dockerfiles and docker-compose file to learn how the system is configured. If you need any help, don't hesitate to ask in our Discord #dev group.


Requirements to run the demo:

  1. A Linux computer with Docker and Docker Compose installed
  2. 50G free disk space (SSD is preferred because the compilation takes longer on HDDs)
  3. A powerful CPU

Maker sure the docker and docker-compose commands are available for your user:

1docker --version
2# > Docker version 20.10.5, build 55c4c88
3docker-compose --version
4# > docker-compose version 1.28.5, build c4eb3a1f

To start the full stack, first clone the phala-docker repo on pdiem-m3 branch.

1git clone -b pdiem-m3

Cd to the repo, build the docker images.

1docker-compose build
It may take up to 1-2 hours to build 5 separate projects. A powerful CPU can build it in around 30 mins.

To start the pdiem full stack:

1docker-compose up

To stop the pdiem full stack (and remove diem blockchain history):

1docker-compose down --volume

To check the service states:

1docker-compose ps


  • The state of diem-cli should be "Exit 0" because we will start it manually on demand.
  • Don't keep it running for a long time. Diem writes ~1MB/s to the disk.