Instructions for building your own Steem Testnet

in steem •  4 months ago


I've recently setup my testnet for Steem and I noticed that there isn't much documentation on how to do that, so I decided to write a quick guide.


Ubuntu: 16.04
10GB+ Diskspace

I've got a seperate boot-partition with Linux, but docker would work as well (however I will not cover docker in this guide.)


Step 1: Install Packages

sudo apt-get install -y autoconf automake cmake g++ git libssl-dev libtool make pkg-config python3 python3-jinja2 libboost-chrono-dev libboost-context-dev libboost-coroutine-dev libboost-date-time-dev libboost-filesystem-dev libboost-iostreams-dev libboost-locale-dev libboost-program-options-dev libboost-serialization-dev libboost-signals-dev libboost-system-dev libboost-test-dev libboost-thread-dev libsnappy-dev libbz2-dev doxygen libncurses5-dev libreadline-dev perl

Step 2: Clone Steem

git clone # or
cd steem
git checkout master # or another branch
git submodule update --init --recursive

Step 3: Build Steem

mkdir build && cd build/
make -j$(nproc) steemd cli_wallet
make -j$(nproc) chain_test # optional for tests

Step 4: Edit Config

# Start and stop steemd once to create the default config
./programs/steemd/steemd -d testnet/

# You'll see something like this
# ------------------------------------------------------
# ------------------------------------------------------
# initminer public key: TST6LLegbAgLAy28EHrffBVuANFWcFgmqRMW13wBmTExqFE9SCkg4
# initminer private key: 5JNHfZYKGaomSFvd4NUdQ9qMcEAC43kujbfjueTHpVapX1Kzq2n

# COPY the private key
nano testnet/config.ini

After you've copied the private key and opened up the config.ini, change the following lines

# name of witness controlled by this node (e.g. initwitness )
witness = "initminer"

# WIF PRIVATE KEY to be used by one or more witnesses or miners
private-key = 5JNHfZYKGaomSFvd4NUdQ9qMcEAC43kujbfjueTHpVapX1Kzq2n

# Enable block production, even if the chain is stale.
enable-stale-production = true

# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = 0

# Local http endpoint for webserver requests.
webserver-http-endpoint =

# Local websocket endpoint for webserver requests.
webserver-ws-endpoint =

Step 5: Start Steemd

Once you've configured the config.ini, start steemd.

./programs/steemd/steemd -d testnet/

It will take roughly half a minute and then you should see initminer producing blocks.

Which means: you have now a testnet running. Congratulations!

(Optional) Step 6: Start CLI_Wallet

./programs/cli_wallet/cli_wallet --server-rpc-endpoint="ws://"

# set_password & unlock
import_key 5JNHfZYKGaomSFvd4NUdQ9qMcEAC43kujbfjueTHpVapX1Kzq2n
create_account "initminer" "testaccount" "" true

(Optional) Step 7: Run Tests

If you haven't build them before:

make -j$(nproc) chain_test

Afterwards, you can run all of them or a specific one with the -t flag.

./tests/chain_test # -t "basic_tests"

More info about testing and different types of tests:

Also make sure to check out the developer resources:

And that's it.

I hope this helps with setting up your own testnet and if there are any questions or something else, let me know in the comments below!

I'll get back to coding.


Do you believe that my work is valuable for Steem? Then please vote for me as witness.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

thanks for the instructions :)


Great write-up! Is a testnet like this directly starting with HF20 or does it also gradually activate different HFs on predefined blocks?

Is it possible to create something like which would run on testnet but users would be able to log in and interact with blockchain? Would probably require taking snapshot of the main chain.

Uhm, so what does a testnet do? lol

Superb bro thanks for the information. ....

Posted using Partiko Android

Thank you so much @therealwolf! Great contribution 👍