<aside> ⚠️ ALERT: Operations at this step may reset your previous Phala blockchain data and you will need to re-deploy the mirror files. For more detail, refer to: https://github.com/Phala-Network/phala-docker#usage

</aside>

<aside> ⚠️ PLEASE DO NOT change the order when deploying the three docker containers below.

</aside>

2.2.1 Deploying Phala full-node

A Phala full-node helps maintains the backbone of the network. We suggest you run a Phala full-node on a device with 50+ GB storage.

<aside> 💡 What is a full-node

</aside>

Open the Terminal, and use the commands as follow. Your node name will be set by the second line.

  1. sudo docker pull jasl123/phala-poc3-node (to pull a docker file)
  2. sudo docker run -ti --rm --name phala-node -d -e NODE_NAME="YOUR_NODE_NAME" -p 9933:9933 -p 9944:9944 -p 30333:30333 -v $HOME/phala-node-data:/root/data jasl123/phala-poc3-node (to run the docker file; please repalce YOUR_NODE_NAME with your own name, only alhpabets, digits and whitespace are supported)

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/45c5f023-31e6-4b8e-b09b-507a8104f186/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f6b50686-13c8-46d8-9c8e-8d7ee3c745b3/Untitled.png

<aside> 💡 The docker container will start after these two commands. To stop or restart it, please refer to this tutorial. You can stop the full node by sudo docker kill phala-node. Please avoid irregular turning down of the container (e.g., turn off or reboot your computer without stopping it). It may cause damage to the blockchain database, which can only be solved by re-sync of the entire blockchain. If you are planning to run multiple full-nodes on one device (which is not suggested), please set different database path for each node by changing $HOME/phala-node-data to some other directory.

</aside>

2.2.2 Deploying pRuntime

  1. sudo docker pull jasl123/phala-poc3-node
  2. sudo docker run -d -ti --rm --name phala-pruntime -p 8000:8000 -v $HOME/phala-pruntime-data:/root/data --device /dev/isgx jasl123/phala-poc3-pruntime

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7653d387-2da6-49c5-bdeb-a7fe20a2bbf6/Untitled.png

<aside> 💡 If there is no output, please refer to the FAQ. $HOME/phala-pruntime-data is the default path to the data of pRuntime. It's set in the phala-pruntime-data folder by default, which can be changed to another folder that the system admin has full access to. To run multiple pRuntime containers on one device (which is unecessary and not suggested), please set different path for each container. If the data was deleted, please re-register the miner from the beginning.

</aside>