This guide explains how to deploy the Primus Network Attestor Node using TEE (provided by Phala) in production environments.
| Chain | ChainId | Task Contract Address | Support |
|---|---|---|---|
| base-mainnet | 8453 | 0x151cb5eD5D10A42B607bB172B27BDF6F884b9707 | ✅ |
| base-sepolia | 84532 | 0xC02234058caEaA9416506eABf6Ef3122fCA939E8 | ✅ |
| hashkey-chain-testnet | 133 | 0x6588a24D34C881cF10c8DA77e282f6E1fBc262C7 | ✅ |
| hashkey-chain-mainnet | 177 | 0x1c5D0d5e0a3e0a5c9B0cDcF5C25A892281e4cd04 | ✅ |
| ink-mainnet | 57073 | 0xCE7cefB3B5A7eB44B59F60327A53c9Ce53B0afdE | ✅ |
- If you don't have a Phala account, you can register one here.
1. Visit the deployment template and click
Deploy button.
- Name: This node's name.
- docker-compose.yml: You can find the
docker-compose.ymlfile here. Please paste it into thedocker-compose.ymlfield. - KMS Provider: Only supports
Base - Node:
prod9 - Instance Type: Use
Large TDX Instance(4 vCPU, 8 GB) - Storage: Larger than
20 GB - Operating System:
dstack-0.5.4.1 - Encrypted Secrets: Please set:
-
PRIVATE_KEY.PRIVATE_KEYshould start with0x.PRIVATE_KEYacts as the owner of the node, used to report results, and will also be used to register the node. -
NETWORK_CHAINS: A compressed single-line JSON string (no line breaks). Each element hasrpcUrl,taskContractAddress, andchainId— see Supported Chains.Example value to paste:
Here is an example for base mainnet
[{"rpcUrl":"https://mainnet.base.org","taskContractAddress":"0x151cb5eD5D10A42B607bB172B27BDF6F884b9707","chainId":8453}]If you edit in expanded form, use this tool to minify before pasting.
-
IMAGE_TAG: Please use the tag:0.1.1-alpha.5.
-
5. Click the attestor-node service to view the node's log. You will find the attestor's address in the log.
Please save this address as you will need it when registering the node.
Please save this endpoint for registering the node.
If you see Hi, PRIMUS NETWORK!, it means you have successfully deployed the node.
NOTE: Before managing a node, you must first contact the primuslabs team to have the attestor added to the whitelist.
Make sure Docker is installed on your system.
git clone https://github.com/primus-labs/primus-network-startup.git
cd primus-network-startup
chmod +x ./run.shBased on the chain where your node is located, run the following command:
cp env_files/.env.base-mainnet .envThen set your private key, RPC URL, and other parameters:
Here is an example for base mainnet
PRIVATE_KEY=0x
# Rpc for base chain testnet
RPC=
NODE_CONTRACT_ADDRESS=0x9C1bb8197720d08dA6B9dab5704a406a24C97642
ATTESTOR_ADDRESS=
RECIPIENT_ADDRESS=
ATTESTOR_URLS=
NODE_META_URL=- PRIVATE_KEY: This private key owns the node and is the same as the above
while deploying the node. We recommend depositing 0.01 ETH(for base chain) to this address. If you set it as the
RECIPIENT_ADDRESSbelow, it will automatically receive task fees. This ensures sufficient balance for reporting results. Otherwise, you must manually monitor and maintain the balance. - RPC: rpc for the chain.
- NODE_CONTRACT_ADDRESS: This is the address of the node contract. You can use the default value from
env_files/.env.base-mainnet. - ATTESTOR_ADDRESS: Attestor's address to sign attestations, this address is from above attestor-node.
- RECIPIENT_ADDRESS:Address to receive task fees. This address can be set to the node owner address corresponding to the PRIVATE_KEY above, or to any other address.
- ATTESTOR_URLS: Attestor node domain names. This domain is
from endpoint above,
and remove
https://, just the domain name like:dd26063786a0fccd8e4cc499374b4515d4df1e87-18080.dstack-base-prod9.phala.network.If you have multiple URLs, separate them with commas. - NODE_META_URL: Attestor node metadata url. The metadata should be a JSON document containing the following fields:
{
"name": "Your node name",
"description": "Introduce your node",
"website": "Your website URL",
"x": "https://x.com/<your_x_username>",
"logo": ""
}MAKE SURE NODE_META_URL IS PUBLICLY ACCESSIBLE ON THE INTERNET.
One chain per run: Registration applies to one chain only (the chain determined by your current
.envfrom step 3.3). If you need to register the node on multiple chains, repeat 3.3 (set environment variables for the next chain, e.g.cp env_files/.env.<other-chain> .envand fill in the values) and 3.4 (runregister) for each chain.
sudo ./run.sh registerIf you want to unregister from the Primus network, run the following command:
sudo ./run.sh unregisterPlease note: Unregistering from the network means you will no longer receive any tasks and will not earn any income.




