---
# System prepended metadata

title: Solana Ore Mining script

---

**Ore** is a digital currency you can **mine** from anywhere, at home or on your phone.
Proof of work.
On Solana.

Setup preparation by **[ShineCryptic](https://twitter.com/ShineCryptic)**

## Get a VPS
Get beginner tier Linux VPS from [**VPSDime**](https://vpsdime.com/a/4115/linux-vps)
VPSDime accepts cryptocurrency as payment.

## Setup ore-cli
#### Install rust
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

. "$HOME/.cargo/env"
```
![image](https://hackmd.io/_uploads/rkXf8mWl0.png)

#### Install ore-cli
`sudo apt-get update`
`sudo apt install build-essential
`
`cargo install ore-cli`
![image](https://hackmd.io/_uploads/r1prLQZeC.png)

#### Install solana cli

`sh -c "$(curl -sSfL https://release.solana.com/v1.18.5/install)"`

![image](https://hackmd.io/_uploads/B1akYXbeC.png)


#### export PATH
```
export PATH="$HOME/.local/share/solana/install/releases/1.18.5/solana-release/bin:$PATH""
```

![image](https://hackmd.io/_uploads/H1O7YXZe0.png)


#### Install generate solana wallet

`solana-keygen new --no-bip39-passphrase`

![image](https://hackmd.io/_uploads/SycYKQWgR.png)

#### NOTE: Fund this pubkey generated wallet with a minimum of 0.02 SOL to start mining.

#
## ORE mining setup commands


### Install nvm
```
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
```
![image](https://hackmd.io/_uploads/Hk5TtmbgA.png)


Install npm
`nvm install v20`

Install pm2
`npm install pm2 -g`


### Prepare mine script
Create file as `mine.sh`
```
nano mine.sh
```
```
#!/bin/bash
ore --rpc https://api.mainnet-beta.solana.com/ --keypair ~/.config/solana/id.json --priority-fee 5000000 mine --threads 4
sleep 1
```
Save and exit
```
ctrl +X

Y

Enter
```
Guide Prepared by **[ShineCryptic](https://twitter.com/ShineCryptic)**

## Run as pm2 service

### Start service

```
pm2 start -f mine.sh
```
![image](https://hackmd.io/_uploads/rymR97-lC.png)


To check ore mining logs 

`pm2 logs`

### Check Ore Rewards
`ore --rpc https://api.mainnet-beta.solana.com/ --keypair ~/.config/solana/id.json rewards`

### Claim $ORE
`ore --rpc https://api.mainnet-beta.solana.com/ --keypair ~/.config/solana/id.json claim`

![image](https://hackmd.io/_uploads/Bkbdo7Wg0.png)


### Check solana balance
```
solana config set -k  ~/.config/solana/id.json

solana balance
```

### Check $ORE balance in wallet
```
spl-token balance oreoN2tQbHXVaZsr3pf66A48miqcBXCDJozganhEJgz --url https://api.mainnet-beta.solana.com/
```

### Transfer $ORE from cli wallet to Phantom wallet
```
spl-token transfer oreoN2tQbHXVaZsr3pf66A48miqcBXCDJozganhEJgz 0.001 5c49bfpEAx2XK1BBFE7A9Kq7je2GDAPiMcVndbud6c2f  --fund-recipient --url https://api.mainnet-beta.solana.com/
```

Guide Prepared by **[ShineCryptic](https://twitter.com/ShineCryptic)**


### Import solana keygen wallet in Phantom
Run this command to copy the private key
```
cp ~/.local/solana/id.json
```
Import the content of this file as private key in Phantom