Private Network

Introduction

The Matrix AI Network is a powerful public network. Private networks only have a subset of the functions available in the Matrix mainnet. However, private networks are easy and convenient for users to build by themselves. This manual describes the process to build a personal Matrix private network in the Linux centos environment.

Process

  • Install lrzsz.
1
yum -y install lrzsz

image

  • Import compose-gman.yaml & compose-exp.yaml with the rz command.

compose-gman.yaml content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: '3.5'
services:
GMAN:
image: dockermatrix123/matrix
container_name: matrix
stdin_open: true
tty: true
networks:
extnetwork:
ipv4_address: 10.0.75.2
ports:
- 8567:8567
networks:
extnetwork:
ipam:
config:
- subnet: 10.0.75.0/24

compose-exp.yaml content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3.5'
services:
EXP:
image: dockermatrix123/matrixexp
container_name: explore
privileged: true
environment:
IP: 10.0.75.2

ports:
- 3012:3000
- 8011:80
stdin_open: true
tty: true
networks:
extnetwork:
networks:
extnetwork:
ipam:
config:
- subnet: 10.0.75.0/24
  • Install docker.
1
yum install docker

image

  • Launch docker.
1
systemctl start docker

image

  • Install compose.
1
yum -y install docker-compose

image

  • Download image.
1
2
docker pull dockermatrix123/matrix
docker pull dockermatrix123/matrixexp
  • Run *.yaml files.

First:

1
docker-compose -f compose-gman.yaml up –d

Second:

1
docker-compose -f compose-exp.yaml up –d

image

  • Installation complete, you can access gman through port 8567.

    Request data using JS SDK.

1
2
3
4
5
6
7
8
//Initialization process
var AIMan = require('AIMan');
if (typeof aiman !== 'undefined') {
aiman = new AIMan(aiman.currentProvider);
} else {
// set the provider you want from AIMan.providers
aiman = new AIMan(new AIMan.providers.HttpProvider("http://localhost:8567"));
}
  • View wallet and browser.

image

image

image