Skip to content

Instantly share code, notes, and snippets.

@Maxb0tbeep
Created September 23, 2023 21:12
Show Gist options
  • Save Maxb0tbeep/e9ff45da59a9ea85a742108d2b72a586 to your computer and use it in GitHub Desktop.
Save Maxb0tbeep/e9ff45da59a9ea85a742108d2b72a586 to your computer and use it in GitHub Desktop.
Easy CPU+GPU Monero Mining with MoneroOcean

Some common questions

What is Monero?

Monero is a cryptocurrency that emphasizes privacy more than most other coins. Usually, every transaction on the blockchain is public, and anyone can see who is sending money to who, and the balance of anyone's wallet. Monero keeps this private.

What is MoneroOcean?

MoneroOcean is a service that lets you mine other coins, and pays you in Monero.

Why does that matter?

The algorithm used to mine Monero is called RandomX, hence the abbrievation for Monero, XMR (RandomX MoneRo). RandomX is excellent for CPU mining, in fact, you almost definitely will use it for that, but when it comes to GPU mining... it's not at all profitable. This is not really a fault, and it was made specifically like this to not make GPU prices go insane like 2021, and to discourage people from buying dedicated mining devices. It also keeps Monero profitable to mine for normal computers unlike large coins like bitcoin. You can mine a different coin with a different algo like RVN with kawpow or ETC with etchash on your GPU, but get paid in Monero.

Why are we doing this?

It's fun. You won't make much money, but learning how this stuff works is very interesting (to me at least)

Why not use MetaMiner?

It's a lot more complicated than this, and you probably wont even need to switch algorithms often anyways.

The actual guide

Step 1. Create a monero wallet

you can find a better guide for this part if you aren't sure how.

Step 2. Download miners and folder structure

Download and extract the latest version of XMRig-MO for CPU mining here: https://github.com/MoneroOcean/xmrig/releases

image

Download and extract the latest version of GMiner for GPU mining here: https://github.com/develsoftware/GMinerRelease/releases

image

Create a new folder called "miners" and rename the two miner folders to just "xmrig-mo" and "gminer" and move them under "miners" like this, I also recommend you put it in your home folder on Linux or Mac:

miners
├── gminer
│   ├── mine_etc.sh
│   ├── miner
│   ├── mine_ravencoin.sh
│   ├── readme.txt
│   └── sample_config.txt
└── xmrig-mo
    ├── config.json
    └── xmrig

(you can delete all the .sh/.bat files other than mine_etc and mine_ravencoin if you want, as we will not need them)

Step 3. XMRig (CPU) Config

open miners/xmrig-mo/config.json

The default donate % for xmrig is 1%, and but you can disable it if you want by changing "donate-level": 1, to "donate-level": 0, on line 61

Change "user": "YOUR_WALLET_ADDRESS", to your actual wallet address, for example, "user": "4BKSrAJq6W5jF5LbCpktjjNevBXi4ocW9Ns9UitmokrhNMQdArdAtUUM5o7kDnLapw6kTREKcSTSXcfmzmiYGs1aM7hTqt9", for my wallet

Change "pass": "x", to whatever alias you want MoneroOcean to use for this miner, for example, "pass": "PC-CPU",

Now we will benchmark each algo for CPU mining performance, it will most likely just be RandomX, but it doesn't hurt to test them all.


Linux/Mac

Open a terminal in miners/xmrig-mo and run sudo ./xmrig

Windows

Right-click xmrig.exe and run it as administrator, a terminal should appear


This will now start testing each algorithm.

After a few minutes, you will see "ALGO PERFORMANCE CALIBRATION COMPLETE", press Ctrl+C to terminate XMRig.

Step 4. Gminer (GPU) Config

If you don't have a dedicated GPU, you should skip this.

Gminer doesn't need a config file like XMRig, instead we can pass in our configuration with command line arguments.


Linux

sudo ./miners/gminer/miner --server gulf.moneroocean.stream:10128 --user YOUR_WALLET_ADDRESS --pass PC-GPU~kawpow --algo kawpow --proto stratum

Windows

(In an administrator powershell window in the gminer folder)

miner.exe --server gulf.moneroocean.stream:10128 --user YOUR_WALLET_ADDRESS --pass PC-GPU~kawpow --algo kawpow --proto stratum


You can also mine with etchash if you want by replacing ~kawpow with ~etchash in --pass and --algo kawpow with --algo etchash, but it's about the same performance

Step 5. Profit.

Now just do the instructions again for running both miners whenever you want to mine.

But I'm lazy and I dont want to run these commands each time

If you're on linux, you can make a bash script that runs both miners for you.

Here's mine:

#!/bin/bash

sudo ./miners/xmrig-mo/xmrig &
xmrig_pid=$!

sudo ./miners/gminer/miner --server gulf.moneroocean.stream:10128 --user 4BKSrAJq6W5jF5LbCpktjjNevBXi4ocW9Ns9UitmokrhNMQdArdAtUUM5o7kDnLapw6kTREKcSTSXcfmzmiYGs1aM7hTqt9 --pass PC-GPU~kawpow --algo kawpow --proto stratum &
gminer_pid=$!

wait $xmrig_pid
wait $gminer_pid

If you place this in your home folder you can just run ./monero.sh (or whatever you named the file)

Step 6. Monitoring performance and payouts

Go to https://moneroocean.stream/ and enter your monero wallet address.

You will see statistics on this page

image


image

If you click this button

image

It will open this menu, where you can adjust the automatic payout amount. There is a fee, but the more monero you payout at a time, the less it is. For example, I have it set to payout once 0.1 XMR is mined, and theres only a 0.39% fee.

Ending

Thanks for reading! If you spotted an error or something I could improve, feel free to leave a comment :)

Donate XMR to me: 4BKSrAJq6W5jF5LbCpktjjNevBXi4ocW9Ns9UitmokrhNMQdArdAtUUM5o7kDnLapw6kTREKcSTSXcfmzmiYGs1aM7hTqt9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment