Step By Step: How To Install Cortensor Mining AI
Learn how to run the Cortensor mining node and join the incentivized testnet and earn benefits.
Overview
Cortensor aims to democratize AI by leveraging the power of decentralized networks and open-source models. By eliminating the constraints of centralized services, Cortensor provides a scalable, cost-effective solution for AI inference and development.
Key Features
- Decentralized AI Inference: Harness the collective power of distributed computing for efficient and scalable AI processing.
- Open-Source Models: Utilize a variety of models for flexible and unrestricted AI applications.
- Blockchain Integration: Ensure secure, transparent transactions and incentivized collaborations.
- Scalability and Efficiency: Optimize resource usage and reduce operational costs.
Part 01: Order And Configure A VPS
You need to rent a VPS server at first , VPS servers have some advantages:
- High Availability
- High Scalability
- Multi Locations
- Easy to Config
- Cheap
Note: We need CPU with supported AVX512 and I recommend using Contabo.
Minimum Hardware Requirements
CPU: 6vCore, RAM: 16GB, SDD: 100GB, OS: Ubuntu 22.04
1.If you don’t have an account in a server provider, use this link to sign up.
2. In the Contabo website click on sign up button & Register new account.
3. Choose Cloud VPS 6C or Cloud VPS 8C, should be okay for 1 node.
4. Choose your location, OS and other addons based on your need then write your VPS name and click on <Order and Pay> button.
Note: An email will be sent about your VPS server like: IP and Password, check your mail box and use the information to connect to VPS
Part 02: How to Connect
MacOs: To connect via SSH from this operating system, first open the Terminal window. You can find this tool by going to “Application->Utilities->Terminal”.
Windows: you can use many tools like putty and termius.
- Download and install on your computer.
- Use specific information based on your login data was sent on email.
- Press Connect after fill the IP address, Project Name , Username and Password.
Note: To paste any command that you have already copied just right-click where you want to paste the command
Finally you are on server, now you have permission to write or paste commands.
You should paste or type step by step the following commands that I have written.
Part 03: Preparation
1. Staking $COR (Need 2k $COR per node)
a. Buy $COR on Uniswap (ETH Mainnet) -> Link
b. Stake 2000 $COR on Pool 3 to run 1 Node (Maks. 10 Node per user) -> Link
c. Request on Cortensor Discord for WL the miner address on #testing-ground channel and provide Staking Address, Miner Address, DC and TG.
2. Get ETH on ARB Sepolia
a. Firstly you need to bridge ETH Mainnet -> ETH Sepolia. here
b. Then, you should bridge ETH Testnet from Sepolia -> ARB Sepolia. here
c. Send your ETH on ARB Sepolia to your Miner Address.
3. Setup your own RPC
a. Create account and Login, we recomend using drpc.org because they didn’t limit for free user. here
b. To create API Key : Add key -> Rename key -> Create
c. Click on your key and found Endpoint (RPC) for Arbitrum One and Switch Mainnet -> Sepolia. Save and later you will use it to change your own Miner RPC.
Part 04: Prerequisite
- Update system and install dependencies
sudo apt -q update
sudo apt -qy install curl git jq lz4
sudo apt -qy upgrade
2. Clone Installation
git clone https://github.com/cortensor/installer
cd installer
3. Install Docker (based on your OS)
./install-docker-ubuntu.sh
#For Ubuntu 22.04
./install-docker-debian.sh
#For Debian
4. Install IPFS
./install-ipfs-linux.sh
5. Install Cortensord
./install-linux.sh
#this command will generate new user "deploy"
6. Copy installer folder to deploy home
cd ~/
cp -Rf ./installer /home/deploy/installer
chown -R deploy.deploy /home/deploy/installer
7. Switch to user “deploy” and Verify the installation
sudo su deploy
cd ~/
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
Note : If the output similiar this and no error found your installation is success
Note : Congrats!! This is the final step in the prerequisite phase.
Next, we move on to node management, key handling, and troubleshooting!
Part 05: Node Management
- Need switch to user “deploy”
sudo su deploy
cd ~/installer
2. Generating key
/usr/local/bin/cortensord ~/.cortensor/.env tool gen_key
3. Register the node
/usr/local/bin/cortensord ~/.cortensor/.env tool register
4. Verify the node
/usr/local/bin/cortensord ~/.cortensor/.env tool verify
5. Start the node (input pass for user “deploy”)
sudo systemctl start cortensor
6. Check node logs
After 5–10 minutes you should check the node logs, if there was no error found so your node is fine.
tail -f /var/log/cortensord.log
Part 06: Troubleshooting
- Change your own RPC
a. Log in to “deploy” user and open .env file.
sudo su deploy
cd ~/ && nano ~/.cortensor/.env
b. Found #RPC section and change HOST with your own RPC from drpc.
c. Ctrl + x -> y -> Enter to Save and don’t forget to restart the system.
sudo systemctl restart cortensor
2. Check node address & ID
/usr/local/bin/cortensord ~/.cortensor/.env tool id
3. Check nodestats
/usr/local/bin/cortensord ~/.cortensor/.env tool stats
4. Kill IPFS process
pkill ipfs