---
# System prepended metadata

title: 0L Rex Devnet Configuation Instructions

---

# 0L Rex Devnet Configuation Instructions


[Source Link](https://discordapp.com/channels/833074824447655976/943220507560542268/958134848583762010)

[Here](https://github.com/OLSF/libra/blob/d70716fb154339f4db71ae05edf8064013327b29/ol/documentation/core-devs/provision_dev_net.md) is the main doc to setup a testnet, needs a bit maintenance: 

Out the top of my head, here are the steps I remember:

## Devnet servers specs

2 Cores, 8 Gb RAM, and 50Gb disk space

## 1. All the rex node runners need permission to write to the https://github.com/OLSF/dev-genesis repo (later a GitHub token needs to be generated and used on the node)

Current list of OLSF GH team members [here](https://github.com/orgs/OLSF/people).

Permission list - 

- [ ] @daniyal
- [ ] @thenateway
- [ ] @o0l0o

## 2. Cloning OLSF/libra , OLSF/dev-genesis and OLSF/dev-epoch-archive repos on the node.

## 3. Installing all the dependencies (libra/util/setup.sh):

``sudo curl -sL https://raw.githubusercontent.com/OLSF/libra/main/ol/util/setup.sh | bash``

## 4. Generate a GitHub token, place it in a (new) file called ~/.0L/github_token.txt

Token list -

- [ ]     @idlezone
- [ ]     @thenateway
- [ ]     @0olo0


## 5. Setting up a persona, there are 5 default personas, alice, bob, carol,  dave and eve.

For example the alice node environment needs to setup by running this command: 

``export NODE_ENV=test NS=alice TEST=y``

* Alice node, run by @daniyal: 148.251.89.142
* Bob node, run by @thenateway: 137.184.191.201
* Carol node, run by @o0l0o: 91.229.245.110

New nodes have to create a new layout (checkout the Genesis ceremony on the provision_dev_net.md doc)

## 6. Build binaries

``source $HOME/.cargo/env``
``cd </path/to/libra/source/>``
``make bins && make install``

## 7. Generate keys

``onboard keygen``

## 8. Run ```make check```. 

Make sure below info is correct:

data path: /root/.0L
account: e660402d586ad220ed9beff47d662d54
github_token: ghp_xxx
ip: 127.0.0.1
node path: /root/.0L
github_org: OLSF
github_repo: dev-genesis
env: test
devnet mode: y
devnet name: carol
devnet mnem: giraffe......

## 9.  Edit Makefile under Libra folder:

Change from: 
```GENESIS_REMOTE = 'backend=github;repository_owner=${REPO_ORG};repository=${REPO_NAME};token=${DATA_PATH}/github_token.txt;namespace=${ACC}'```

Change to:
```GENESIS_REMOTE = 'backend=github;repository_owner=${REPO_ORG};repository=${REPO_NAME};token=${DATA_PATH}/github_token.txt;namespace=${ACC}-oper'```

Change from: 
``owner-key:
    cargo run -p diem-genesis-tool ${CARGO_ARGS} --  owner-key \
    --validator-backend ${LOCAL} \
    --shared-backend ${REMOTE}``

Change to:

``owner-key:
    cargo run -p diem-genesis-tool ${CARGO_ARGS} --  owner-key \
    --validator-backend ${LOCAL}-oper \
    --shared-backend ${REMOTE}``
    


## 10. Running ``make dev-register`` from OLSF/libra only for the first time to setup the node.

At the end, there will be a error: Failed to write 'pull request' to github storage. But I think that does not matter.

## 11. Running ``make dev-genesis`` then ``make start``

Here is a list of our IPs and personas we've tried to setup:

* Alice node, run by @thenateway: [IPADDRESS]
* Bob node, run by @0olo0: [IPADDRESS]
* Carol node, run by @idlezone: [IPADDRESS]