How to mine Primecoin (XPM) in the cloud

step-by-step guide on how to easily setup your cloud miner on Digital Ocean by Davide Di Cillo.


Create an account on Digital Ocean (this link has my referral code)
Create a Droplet. Select the 512MB / 1 CPU that only costs $5/mo (obviously bigger instances will mine faster but this is good for our experiment) and select Ubuntu 13.04 x64 as Image for the server.
Once it has been created, you’ll receive an email containing instructions on how to connect to the server. Open the Terminal app and SSH into the server following the instructions in the email.
Type the following commands in the Terminal (of course wait for them to be fully executed before typing the next one):

sudo apt-get update
sudo apt-get install yasm -y git make g++ build-essential libminiupnpc-dev
sudo apt-get install -y libboost-all-dev libdb++-dev libgmp-dev libssl-dev dos2unix
git clone
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
cd ~/primecoin/src
make -f makefile.unix

This last command is going to take a while to execute. Just be patient. Once done, you have the machine ready to mine.
Before starting to mine, I decided I wanted to have my miner to automatically start in case it crashes or the server is restarted for any reason. To do that you need to follow the following steps:

apt-get install supervisor
mkdir -p /var/log/supervisor
touch /etc/supervisor/conf.d/primecoin.conf
nano /etc/supervisor/conf.d/primecoin.conf

(this will open a terminal editor)
Paste the following text into the editor, making sure to add your actual Primecoin address (that you can get by registering on BTC-E, click on finances and click on deposit next to Primecoin) instead of XXXXXXXXXXXXXXXXXXX:


command=/root/primecoin/src/primeminer -pooluser=XXXXXXXXXXXXXXXXXXX -poolip= -poolport=1337 -genproclimit=1 -poolpassword=PASSWORD




Press Ctrl + X to exit and save

/etc/init.d/supervisor stop
/etc/init.d/supervisor start

Congrats, your are a miner now  You can see your miner in action with the command
tail -f /var/log/supervisor/primecoin.log

You can later check your earnings with the mining pool visiting

(make sure to replace XXXXXXXXXXXXXXXXXXX with your Primecoin address)

Read more: