Click here to Skip to main content
15,607,554 members
Articles / Security / Blockchain
Posted 31 Jan 2019

Tagged as


4 bookmarked

Setup Your Private Blockchain with NEO

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
31 Jan 2019CPOL2 min read
How to setup your private Blockchain with NEO


Private Chain is important for data privacy, permission control, as well as testing dApps and smart contracts. A private chain is an isolated copy of public blockchain which would run on your local machine. In this article, we’ll be going through the basic steps to run NEO private chain on a local machine and receive some initial NEO and GAS tokens.

To set up the NEO private network (often called private-net), we have to install and configure Docker in the local system. If you’re using Windows 10 Pro, you can download Docker directly. For an older version of Windows, you need to install and configure the Docker toolbox.

Once Docker gets installed, start and run the docker. Then, open a command line or PowerShell and write the following command:

docker –v

This will display the version of Docker that has been installed in your system.

Image 1

Pull the latest image using the following command:

docker pull cityofzion/neo-privatenet

Kindly note that the size of the image is a bit larger. So, it’ll take some time to download it.

Once the image is pulled up, start the container using the command mentioned below:

docker run --rm -d --name neo-privatenet -p 20333-20336:20333-20336/tcp 
-p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet

To check if the container is running or not, fire this command which will display the current running container(s).

Image 2

Download the NEO-GUI wallet from here or use developer version (recommended for development) from here.

Replace the content of the config.json file and protocol.json file with the following network details.

The updated config.json should look like this:

  "ApplicationConfiguration": {  
    "Paths": {  
      "Chain": "Chain",  
      "Notifications": "Notifications"  
    "P2P": {  
      "Port": 20333,  
      "WsPort": 10333  
    "RPC": {  
      "Port": 30333,  
      "SslCert": "",  
      "SslCertPassword": ""  
    "DataDirectoryPath": "ChainTestNet",  
    "CertCachePath": "Certs",  
    "NodePort": 20333,  
    "WsPort": 20334,  
    "UriPrefix": [ "https://localhost:20332" ],  
    "SslCert": "",  
    "SslCertPassword": "",  


    "ProtocolConfiguration": {  
        "Magic": 56753,  
        "AddressVersion": 23,  
        "SecondsPerBlock": 15,   
        "StandbyValidators": [  
        "SeedList": [  
        "SystemFee": {  
            "EnrollmentTransaction": 1000,  
            "IssueTransaction": 500,  
            "PublishTransaction": 500,  
            "RegisterTransaction": 10000  

Run the neo-gui.exe installation package and check the connection between NEO GUI and the docker container. If you can see the number of connected nodes is 4, that simply means that the connection has been established successfully and the numbers represent the consensus nodes.

Image 3

Create a new wallet from NEO GUI Tool, go to wallet > New wallet database > input wallet name and password, it will generate a new wallet file for you. 

Get some initial NEO and GAS by importing WIF key. Click to the black area > Import > Import from WIF > add key


Image 4

Click OK, and check NEO and GAS balance you have!! We can use this NEO and GAS for smart contract execution.

Image 5

In this article, we’ve have seen how to setup NEO private network and got some initial NEO and GAS tokens. These we can use in testing smart contract over a local system. There are several other ways to configure it, however, the easiest one is using Docker.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This is a Collaborative Group (No members)

Comments and Discussions

PraiseGood Article Pin
Sarathlal Saseendran31-Jan-19 20:20
Sarathlal Saseendran31-Jan-19 20:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.