# Install TOPIO

You can follow these steps to download and install TOPIO:

  1. Set Up a Cloud Server.
  2. Download and install TOPIO.
  3. Configure environment variables (optional).

# 1. Set Up a Cloud Server

Please set up a server to run TOPIO.

It is recommended that you rent a cloud server that can be accessed remotely from your personal computer via SSH terminals such as Xshell.

# Operating System

Operating System Version
Linux CentOS 7, 64-bit, Kernel Version 3.10 , and above (CentOS 8 included)
Ubuntu 16, 64-bit, Kernel Version 4.4, and above

# Server Minimum Configuration

Different types of miners have different requirements for server configuration. Please refer to the following table for the minimum configuration.

Miner Type Minimum Hardware Configuration
edge 1CPU/1GB mem
40GB SSD
100Mb/s
validator 2CPU/2GB mem
60GB SSD
100Mb/s
advance 2CPU/4GB mem
100GB SSD
200Mb/s

# Inbound Ports

Please make sure that the ports below are open to the whole network in inbound traffic, otherwise the miner will not be able to join the TOP Network.

  • TCP:19081, 19082, 19085

  • UDP:9000

# Install "wget" Download Tool

Connect to the server and execute the following command on the SSH terminal page to install the "wget" download tool.

The CentOS and Ubuntu installation commands are as follows, use the corresponding commands according to your server operating system.

  • CentOS

    sudo yum install wget -y
    
  • Ubuntu

    sudo apt install wget -y
    

# 2. Download And Install TOPIO

Run the following command to download and install TOPIO:

Root users can directly run the following command, while non-root users need administrator privileges before running. You can click here to see how to add administrator privileges to non-root users.

wget https://github.com/telosprotocol/TOP-chain/releases/download/v1.2.7/topio-1.2.7-release.tar.gz -O topio-1.2.7-release.tar.gz && tar zxvf topio-1.2.7-release.tar.gz && cd topio-1.2.7-release && sudo bash install.sh && source /etc/profile && ulimit -n 65535

# Verify Installation

Verify if the installation was successful.

# Installation Success

When the following information is printed:

install topio done
now run command to check md5:  topio -v
now run command for help info: topio -h

Execute topio -v in any directory to verify whether the installation was successful.

If the following is output, the installation is successful.

topio version: 1.2.7
git commit info: 7234bf5
git submodule: xtopcom/xbase:e8ead28|xtopcom/xdepends:415349d|xtopcom/xvm:3cb09a9
build date: Jan 10 2022 20:04:09
build options: release
MD5:a52ad3c8970f779d6a6152ab9d6c57d2

WARNING

If the MD5 code is inconsistent with the installation package's MD5 code displayed on the official website, although the installation is successful, there is the possibility that the installation file is tampered with!

# Installation Fail

Execute topio -v in any directory to verify whether the installation was successful.

If the following is output, the installation is failed.

-bash: topio: command not found

If the installation fails, please redo the installation steps.

For new servers, it is recommended that you download the database after installing TOPIO, which can reduce the time of data synchronization and start getting rewards early.

Run the following command in the SSH terminal:

topio db download https://top-mainnet-space.nyc3.digitaloceanspaces.com/db_20211231_v3_1ab9d50b07e651544a607161e6485955.tar.gz

In the returned message, if the download progress is 100% and the following content is included, the database is downloaded.

download database ok.

md5sum check ok.

# 3. Configure Environment Variables (optional)

After TOPIO is installed, configure environment variables with the following command, to set "/opt/topnetwork" to your authority directory.

echo "export TOPIO_HOME=/opt/topnetwork" >> ~/.bashrc && source ~/.bashrc

If you do not configure environment variables, you will use the system default directory as the working directory of TOPIO:

root user: the default directory is "/root/topnetwork";

For non-root users: the default directory is "/home/user/topnetwork", where "user" is your user name to log in to the server.