Pos Mining In Azure Or Aws

Discussion in 'Solo Mining' started by sw1, Feb 10, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    Anyone tried this yet?

    I have some power issues where I live and want to setup something I can leave running without fear of the grid cutting out.

    I might just give it a try with the free trial and see how I go.

    If anyone else has done it, let me know.

    Cheers,
    sw1
     
  2. cred

    cred New Member

    Feb 9, 2016
    5
    2
    Male
    Sys Admin
    Houston
    Let me know how it goes. I have not tried Amazon. I've heard great things about them although they can get expensive. I have done nodes and staking for other cryptos on digital ocean vps before with no issue.
     
  3. Fsig

    Fsig Member
    Developer

    Dec 28, 2015
    71
    77
    Male
    Australia
    Started writing a guide for AWS.


    Launch Ubuntu 14.04 instance (Make sure you open port 22 to your IP)
    Create key pair
    Download key pair

    Move .pem file somewhere safe and change permissions
    Code:
    sudo chmod 600 YOURKEY.pem
    
    Connect to instance
    Code:
    ssh -i YOURKEY.pem ubuntu@publicip
    
    Download decred
    Code:
    wget https://github.com/decred/dcrd/releases/download/v0.0.2/linux-amd64-20160208-01.tar.gz
    
    Extract decred
    Code:
    - tar -zxvf linux-amd64-20160208-01.tar.gz
    
    Rename
    Code:
    mv linux-amd64 decred
    
    Cleanup
    Code:
    rm linux-amd64-20160208-01.tar.gz
    
    Move into dir
    Code:
    cd decred
    
    Create daemon start script
    Code:
    nano 01-startdaemon.sh
    
    Copy this into file, replace user and pass
    Code:
    #! /bin/bash
    ./dcrd -u username -P 'password'
    
    Press ctrl + x than y than enter to save file

    Create wallet start script
    Code:
    nano 02-startwallet.sh
    
    Copy this into file, replace user and pass
    Code:
    #! /bin/bash
    ./dcrwallet -u username -P 'password' --walletpass publicpassphrase
    
    Press ctrl + x than y than enter to save file

    Set permissions for scripts
    Code:
    chmod +x *.sh
    
    Create wallet
    Code:
    ./dcrwallet --create
    
    COPY THE SEED SOMEWHERE SAFE!!!

    Start new screen for daemon
    Code:
    screen -S daemon
    
    Press enter

    Start daemon
    Code:
    ./01-startdaemon.sh
    
    Exit screen, ctrl a than d

    Start second screen for wallet
    Code:
    screen -S wallet
    
    Press enter

    Start wallet
    Code:
    ./02-startwallet.sh
    
    Exit screen, ctrl a than d

    Get new address
    Code:
    ./dcrctl -u username -P 'password' --wallet getnewaddress
    
    COPY ADDRESS

    Unlock wallet permanently
    Code:
    ./dcrctl -u username -P 'password' --wallet walletpassphrase privatepassphrase 0
    
    Transfer coins to this address from your existing wallet
    Should know how to do this already??

    Go back and fix wallet script
    Code:
    screen -ls
    
    Note the screen number for wallet: e.g. 1400.wallet-* only the 1400 is important
    Code:
    screen -r YOURNUMBER
    
    ctrl + c to stop the wallet

    Nano into 02-startwallet.sh
    Code:
    nano 02-startwallet.sh
    
    Change command to the following, replacing 100 and 50 with your own values
    Code:
    #! /bin/bash
    ./dcrwallet -u username -P 'password' --walletpass publicpassphrase --enablestakemining --balancetomaintain=100 --ticketmaxprice=50
    

    Next steps:
    -setup the scripts to run on startup
    -create AMI of the instance
    -assign elastic ip
    -open ports
    -start wallet
     
    joaoharter, sw1, Noah and 2 others like this.
  4. Lee Sharp

    Lee Sharp Sr. Member

    Dec 28, 2015
    308
    217
    Male
    Independent Consultant
    Houston, Texas
    Digital Ocean would probably be cheaper, and they are easier to work with when you are outside the box. And you can get $10 free credit from many placed. I used the code from freebsdnow.tv for mine.
     
  5. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    AWS was running a free 1 year trial of a mini instance. Should be plenty to PoS from.
     
  6. Lee Sharp

    Lee Sharp Sr. Member

    Dec 28, 2015
    308
    217
    Male
    Independent Consultant
    Houston, Texas
    I avoid crackware as a rule... (Try it for free...) :)
     
  7. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    Meh. It was truly free for 12 months. I ran the shit out of that little host for over a month straight and it was zero charge. Turned it off for several weeks, came back turned it on for several months. No issues. Even if I would have kept it it would have only been $2-4/mo.
     
  8. kkmk

    kkmk New Member

    Feb 11, 2016
    9
    1
    Male
    Hi. It^s not cost efective. By using an AWS GPU g2.8xlarge instance you get aprox. 1.4-1.5 GHs on 8 Nvidia GRID K520. and that by a aprox cost of 3 EUro an hour. With that hash power zou get aprox 3 DCR in 24 Hours when you get lucky. The same power has a Radeon R9 280 X. You can buy that use is a half year and than sell it for 60-70 % of the price.

    Only for references... : https://github.com/angelomilan/ethereum-guides/blob/master/GPU-cloud_mining.md
     
  9. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    I think you are confused. This is about PoS not PoW. You dont even need a GPU to PoS.
     
  10. kkmk

    kkmk New Member

    Feb 11, 2016
    9
    1
    Male
    You are right. My bad. Didn't read that good.
     
  11. kingscrown

    kingscrown New Member

    Jan 12, 2016
    58
    6
    Male
    If you want free 10 usd of digitalocean use this link
    after your 1 month of free mining runs you can use it again or deposit some money and it think it doubles [up to 25 usd]
     
  12. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    Sorry for late reply folks. Been pretty busy last week.

    Ok, so Azure and AWS tested and working using Ubuntu 14.04 and Centos 6.7.

    Issues: none really, apart from the basic packages from both Azure and AWS run out of memory with daemon and wallet running together, so needed to upgrade to next level above basic resources. Not really worth it for the price but free trials are fine.

    I'll try digital ocean at some point in next few days as well.

    Moral of the story: buy a raspberry pi and use that if you have reliable power. Public cloud way to expensive as a long term PoS mining strategy.
     
    drunkenmugsy likes this.
  13. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    @Fsig great guide mate, worked with no issues, i used vi instead of nano.

    I noticed that the .sh had group read permissions (the .sh contains passwords). Any reason for that or can they be removed? In the guide you just added execute to the chmod.

    Cheers,
    sw1
     
  14. Fsig

    Fsig Member
    Developer

    Dec 28, 2015
    71
    77
    Male
    Australia
    You can lock down the permissions more, could create a new user with limited permissions etc.

    With Aws I have the ports locked down so only 9108 is open for incoming connections. Do keep in mind the username and passwords don't actually mean anything except access to the daemon, which also requires the certificate file.
     
    sw1 likes this.
  15. rohit pawar

    rohit pawar Member
    Advocate (Reddit)

    Dec 26, 2015
    166
    87
    Male
    India
    Using aws with windows server instance works like charm !
     
  16. kkmk

    kkmk New Member

    Feb 11, 2016
    9
    1
    Male
    Hi. Can you reply to me in a PM all the steps you made to make that work. I also have a free trial AWS and want to use for POS :)
    Thank you .
     
  17. rohit pawar

    rohit pawar Member
    Advocate (Reddit)

    Dec 26, 2015
    166
    87
    Male
    India
    Sure . PMed u already .
     
  18. dave

    dave New Member

    Jan 11, 2016
    27
    10
    ...and also post here?
     
  19. rohit pawar

    rohit pawar Member
    Advocate (Reddit)

    Dec 26, 2015
    166
    87
    Male
    India
  20. Fsig

    Fsig Member
    Developer

    Dec 28, 2015
    71
    77
    Male
    Australia
    Keep in mind, AWS charges more for Windows servers because you are paying a licensing fee as well.
    Other important things to note about Windows for Decred node:
    • Windows uses more resources which means you may go over your free limits
    • Windows can't update without restarting
    • Windows is more vulnerable to attacks
    If this server is only being used for a Decred node only, seriously consider switching to Linux.
     
    drunkenmugsy and sw1 like this.

Share This Page