cazala / coin-hive

CoinHive cryptocurrency miner for node.js
https://www.npmjs.com/package/coin-hive
MIT License
1.99k stars 399 forks source link

Run Coin-hive on Linux Debian VPS-Dedicated #65

Closed Zelecktor closed 6 years ago

Zelecktor commented 6 years ago

Hello! Im new on this and i would like to run this miner on a linux VPS. Long time ago i got some linux VPS with unlimited time hosting and now im not using them, just personal webpages and some game hosting but i would like to mine with them.

Already i created an account on coinhive but im unable to run the javascript mining on the linux terminal. If someone could help me with some magic commands to make an easy and fast setup to mine i will apreciate a lot :)

fogoat commented 6 years ago

You shouldn't mine on a shared server (virtual private server = shared). I doubt your host will appreciate you using up all the cores for mining. They will likely kill your account. If you have access to a dedicated server, you should be mining with xmr-stak-cpu instead of javascript based miner for higher hash rates. You want to use coin-hive if you have a popular website and your visitors help you mine.

Zelecktor commented 6 years ago

Yeah but i would like to use like 10% of CPU of my VPS, not all, otherwise i know that admin will kill my account, but first time, i think they only will warn.

Also have a dedicated server (linux debian), but i would like to learn how to mine from the terminal linked to my coinhive account (just to educational purposes).

Also have my raspberry pi3 at home hosting a little webpage and db but also i would like to put it to mine (but not on the web-browser on desktop) also 10% cpu, i dont want to burn it.

sincerely i dont know too much about mining programs, but at the moment i see that coin-hive is the most easy to use (for browser) but i would like to learn in how to use on a Linux terminal. In the past i used cgminer and bfgminer to mine bitcoins on many hardwares but i forgot all.

Zelecktor commented 6 years ago

root@openkore:~# sudo coin-hive 4uqxBZzQhq2kLdyXeGhWbKaG49YCd7k7

Site key: 4uqxBZzQhq2kLdyXeGhWbKaG49YCd7k7

âââââââââââââââââââââ¬ââââââââââââââââââââ¬ââââââââââââââââââââ â Hashes/s â Total â Accepted â âââââââââââââââââââââ¼ââââââââââââââââââââ¼âââââââââââââââââââ⤠â 0.0 â 0 â 0 â âââââââââââââââââââââ´ââââââââââââââââââââ´ââââââââââââââââââââ

â  | Listening on localhost:3002 | 8 Threads

s: Start/Stop | +/-: Threads | a: Auto threads | q/Ctrl-C: Quit

An error occured Page crashed!

Got this

cazala commented 6 years ago

have you tried this? https://github.com/cazala/coin-hive#im-having-errors-on-ubuntudebian

Zelecktor commented 6 years ago

@cazala Yes already i tried that. Starting from a clean pre-configured basic linux server. I did this in this order:

sudo apt-get update sudo apt-get upgrade curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - sudo apt-get install -y nodejs sudo apt-get install nodejs npm

sudo apt-get -y install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libxext6

sudo npm i -g coin-hive --unsafe-perm=true --allow-root

sudo coin-hive 4uqxBZzQhq2kLdyXeGhWbKaG49YCd7k7 --username test1

pana951 commented 6 years ago

I'm curious to see if you can get this going, I want to do the same thing with my VPS

Zelecktor commented 6 years ago

solved. In all case, i recomend to dont do it on VPS, do only if you have a dedicated.

cazala commented 6 years ago

what was it @Zelektor?

Zelecktor commented 6 years ago

something about readding java script. i just installed a web interpreter that got all java script libraries.

mrntidu commented 5 years ago

Hello Zelector , I would love to do the same , mining coinhive from linux terminal because using vps server , please could you tell me more about this web interpreter ?

Is this link related to it ? https://0x00sec.org/t/how-to-run-the-coinhive-miner-in-the-command-line-headles/3721

Did you know that coinimp is a copy of coinhive but they dont charge fees?