Installation & Setup

DRAFT

NOTE: We are currently in the closed alpha phase for precursor miner testing. To set up and run the process below, you’ll need test ETH on Arbitrum Sepolia for your miner’s address. After generating the key from cortensord, you can obtain test ETH from a public faucet or contact us, and we’ll send some test ETH on Arbitrum Sepolia.

1. Download

Download Installer

$ curl -L https://github.com/cortensor/installer/archive/main.tar.gz -o cortensor-installer-latest.tar.gz
$ tar xzfv cortensor-installer-latest.tar.gz
$ cd installer

Clone Installer

$ git clone https://github.com/cortensor/installer
$ cd installer

Git for Windows User

Download Git for Windows Standalone Installer from official website
https://git-scm.com/downloads/win

2. Installation & Setup

Linux - Ubuntu 22.04 & Debian 12

Install - Docker, IPFS & Cortensord

# Run it as 'root'
$ cd installer

# Install Docker for ubuntu 22.04
$ ./install-docker-ubuntu.sh

# Install Docker for debian
$ ./install-docker-debian.sh

# Install IPFS
$ ./install-ipfs-linux.sh

# Install Cortensord
$ ./install-linux.sh

# Copy installer folder to deploy home
$ cp -Rf ./installer /home/deploy/installer
$ chown -R deploy.deploy /home/deploy/installer

# Logoff or start another shell
$ sudo su deploy
$ cd ~/

# Verify installation
$ ls -al /usr/local/bin/cortensord
$ ls -al $HOME/.cortensor/bin/cortensord
$ ls -al /etc/systemd/system/cortensor.service
$ ls -al $HOME/.cortensor/bin/start-cortensor.sh
$ ls -al $HOME/.cortensor/bin/stop-cortensor.sh
$ docker version
$ ipfs version

Setup - Your address needs to be whitelisted in advance by Cortensor Admin

# switch account to 'deploy' which was created from previous install step
$ sudo su deploy
$ cd ~/

# Geenerate Key for the ndoe
$ /usr/local/bin/cortensord ~/.cortensor/.env tool gen_key

# Please contact Cortensor support or mod to whitelist your address
$ /usr/local/bin/cortensord ~/.cortensor/.env tool register
$ /usr/local/bin/cortensord ~/.cortensor/.env tool verify

Start & Stop through SystemD

$ sudo su deploy
$ sudo systemctl start cortensor
$ sudo systemctl stop cortensor

Start MinerV1 Manually (With LLM engine docker)

$ sudo su deploy
$ export PATH=$PATH:~/.cortensor/bin
$ cd ~/.cortensor && cortensord ~/.cortensor/.env minerv1 1 docker

# or use script to start & stop
$ sudo su deploy
$ cd ~/.cortensor && ~/.cortensor/bin/start-cortensor.sh
$ cd ~/.cortensor && ~/.cortensor/bin/stop-cortensor.sh

Start MinerV1 Manually (With LLM engine as subprocess)

$ sudo su deploy
$ export PATH=$PATH:~/.cortensor/bin
$ cd ~/.cortensor && cortensord ~/.cortensor/.env minerv1

OSX/Darwin - ARM64

Install - IPFS & Cortensord

$ cd installer

# Install IPFS
$ ./install-ipfs-osx.sh

# Install Cortensord
$ ./install-osx.sh

# Logoff or start another shell

# Verify installation
$ ls -al $HOME/.cortensor/bin/cortensord
$ ls -al $HOME/.cortensor/bin/start-cortensor.sh
$ ls -al $HOME/.cortensor/bin/stop-cortensor.sh
$ $HOME/.cortensor/bin/ipfs version

Setup - Your address needs to be whitelisted in advance by Cortensor Admin

$ cd ~/

# Geenerate Key for the node
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool gen_key

# Please contact Cortensor support or mod to whitelist your address
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool register
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool verify

Start & Stop through start & stop scripts

$ $HOME/bin/start-cortensor.sh
$ $HOME/bin/stop-cortensor.sh

Start MinerV1 Manually

$ cd ~/.cortensor && $HOME/bin/cortensord ~/.cortensor/.env minerv1

Windows Cygwin - AMD64

Install - Cygwin & Python

1a. Follow the instruction on https://cygwin.com/install.html to install Cygwin
- Git
- Unzip

Or 

1b. Simply install Git for Windows which will install Cygwin

Download Git for Windows Standalone Installer from official website
https://git-scm.com/downloads/win

2. Install Python 3.13

Install - IPFS & Cortensord

$ cd installer

# Install IPFS
$ ./install-ipfs-win-cygwin.sh

# Install Cortensord
$ ./install-win-cygwin.sh

# Logoff or start another cygwin shell

# Verify installation
$ ls -al $HOME/.cortensor/bin/cortensord
$ ls -al $HOME/.cortensor/start-cortensor.sh
$ ls -al $HOME/.cortensor/stop-cortensor.sh
$ $HOME/.cortensor/bin/ipfs version

Setup - Your address needs to be whitelisted in advance by Cortensor Admin

$ cd ~/

# Geenerate Key for the node
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool gen_key

# Please contact Cortensor support or mod to whitelist your address
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool register
$ $HOME/.cortensor/bin/cortensord ~/.cortensor/.env tool verify

Start & Stop through start & stop scripts

$ $HOME/.cortensor/start-cortensor.sh
$ $HOME/.cortensor/stop-cortensor.sh

Start MinerV1 Manually - Run under deploy user account

$ sudo su deploy
$ cd ~/.cortensor && $HOME/.cortensor/bin/cortensord ~/.cortensor/.env minerv1

Enable GPU support

Update .env file to enable GPU support

# Update .env file to enable GPU support

# Update to 1
LLM_OPTION_GPU=1

# Leave to -1 as automatic mode or you can configure your threshold
# number of LLM layers to be offload to GPU
LLM_OPTION_GPU_THRESHOLD=-1

# To start with GPU support, you need to use subprocess for LLM engine
$ cortensord ~/.cortensor/.env minerv1

3. Upgrade

Linux - Ubuntu 22.04 & Debian

$ sudo su deploy
$ cd installer
$ git pull
$ ./upgrade-linux.sh

OSX/Darwin - ARM64

$ cd installer
$ git pull
$ ./upgrade-osx.sh

Windows Cygwin - AMD64

$ cd installer
$ git pull
$ ./upgrade-win-cygwin.sh

Debugging & Troubleshoot

Kill IPFS process - Windows, OSX, Linux

$ sudo su deploy
$ cd ./installer
$ ./utils/kill-ipfs.sh

Debugging & Troubleshoot (Linux)

Check Log

$ ls -alh /var/log/cortensord.log
$ tail -f /var/log/cortensord.log

Check Node Address & ID

$ /usr/local/bin/cortensord ~/.cortensor/.env tool id

Check NodeStats

$ /usr/local/bin/cortensord ~/.cortensor/.env tool stats

Kill IPFS process - Linux & OSX

$ pkill ipfs

Disclaimer: This page and the associated documents are currently a work in progress. The information provided may not be up to date and is subject to change at any time.

Last updated