Welcome to AtomMiner Blog

News, updates and useful how-to guides for our miners

Setting up mining pool with CoiniumServ

It has been very popular question how to setup your own mining pool… It doesn’t matter if you want your private, solo or public pool set up, you have to have some server software running pool operations, talking to your wallet, signing transactions and do all that invisible tasks. I could probably mention 2 possible pool server software I used in the past couple of years: eloipool, stratum-pool, CoiniumServ.

eloipool is a basic Python server script with support of Bitcoin, Litecoin, BlakeCoin and couple other algos. The code is pretty much self-explanatory and runs right out of the box. The problems are coming when you need to add new algorithm/coin to the pool. That’s where you should be Python zealot to modify and test another mining algorithm. This is a good start point if you want your pool to mine any of the coins that eloipool supports.

stratum-pool and all its forks like node-pool, node-open-mining-portal and so on are running on the NodeJS and supports (supposedly) many algorithms in zero time after install. I’ve had some hard time setting it up every time I had to use it so ‘zero’ was close to 12-20 hours of googling, updating npm, nvm, playing with settings etc. Once you managed to start it, it will work…until the next update. The fact that NodeJS has security vulnerabilities like destroying filesystem and spaghetti like code forces me to choose something else as a mining pool server software. As a side note, which completely my humble opinion, I gonna say that JavaScript, the language that in place doesn’t have standardized Type checking and supports use of undeclared vars,  – is evil if you run your server with it on the backend. Again, that’s just my personal opinion…

CoiniumServ is the .NET/Mono server with support of numerous coins, and is probably the best choice of mining pool software since it is real easy to add support of new algos, test and deploy compiled binary of the server. On the plus side here is that the server logic won’t change because of random update since it has been compiled and deployed in binary form to the production server. Here’s the guide on how to compile and setup CoiniumServer on Ubuntu 17.10

First we need Mono framework and MonoDevelop installed:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
audo apt install monodevelop nuget

Next thing we need is to update nuget package to make sure it can resolve and download required packages:

sudo nuget update -self

Now it is time to get CoiniumServ sources:

cd ~/projects/stratum
git clone https://github.com/bonesoul/CoiniumServ.git coinium

It seems like right now they have some kind of bug in MonoDevelop so it won’t resolve package dependencies correctly thus wont install required packages automatically. Let’s do it manually:

cd ~/projects/stratum/coinium$
nuget restore

It is time to start MonoDevelop and open the project. It is required to change Tools version in .csproj file in order to be able to compile it with MonoDevelop. Navigate to src/CoiniumServ in coinium folder and modify CoiniumServ.csproj by changing ToolsVersion=”15.0″ to ToolsVersion=”14.0″. Now you can open CoiniumServ solution in MonoDevelop and verify packages are up to date. You should need to change ToolsVersion for the Tests project as well if you want to compile tests. I didn’t care much about tests so I just ignored error saying can’t open project.

Some project references seems to be broken due to the fact that original project was created with Visual Studio and .NET 4.7 which is not yet available on Mono. Just hop into the project settings and change framework to the latest one you have. In my case it is 4.6.1

Now hit Build, kick back and wait till the build is done

The build was successful so it is perfect time to go ahead and start our pool server. The compiled binary will be located in build/bid/Debug or build/bid/Release folder depending on active project configuration in MonoDevelop.

Now you can follow coinium’s configuration guide and launch it  with following cmd

mono CoiniumServ.exe

You might have to add sudo if you want your coinium frontend available on port 80 though.

Enjoy your very own mining pool and good luck mining new blocks! 😉