mludvig / aws-ethereum-miner

CloudFormation template for mining Ethereum crypto currency on AWS
270 stars 152 forks source link

Can't enter desired VPC using template-eth.yml #20

Closed hermitico closed 2 years ago

hermitico commented 2 years ago

Hi all,

The form won't let me put in another server, like for example

us-eth.2miners.com:2020

How can I modify the yml?

Thanks

mludvig commented 2 years ago

Yeah the template has ethermine.org hardcoded - I've had the best results with that when I tried different pools.

If you still want to change it to 2miners you'll have to download template-eth-default-vpc.yml, and at around line 169 change the while (true) loop to 2miners. Also I suggest you use TLS for better security, i.e. port 12020.

Something like this should do:

                while (true); do
                  ./ethminer -P stratums://${EthWallet}@us-eth.2miners.com:12020 >> /tmp/ethminer.log 2>&1
                  sleep 1
                done

Or just stick with Ethermine and keep it simple ;)

TheClone77 commented 2 years ago

I am using it with 2miners, here is the exact way to get it running (it is around lines 165-170):

SERVERS=(eth us-eth)
                while (true); do
                  PREFERRED_SERVER=\${!SERVERS[\${!RANDOM} % \${!#SERVERS[@]}]}
                  ./ethminer \
                    -P stratum1+tcp://${EthWallet}@\${!PREFERRED_SERVER}.2miners.com:2020 \
                    -P stratum1+tcp://${EthWallet}@eth.2miners.com:2020 \
                    -P stratum1+tcp://${EthWallet}@us-eth.2miners.com:2020 \

Cool thing with 2miners is that you can get the paid in BTC and avoid the crazy ETH fees!

mludvig commented 2 years ago

Yeah that looks about right. I would do startums://...2miners.com:12020 for SSL but either way it should work.

I heard about the BTC payouts on 2miners, pretty cool. Ethermine can pay out over Polygon - that's free as well.

TheClone77 commented 2 years ago

Yes, SSL is better, changed it to:

                SERVERS=(eth us-eth)
                while (true); do
                  PREFERRED_SERVER=\${!SERVERS[\${!RANDOM} % \${!#SERVERS[@]}]}
                  ./ethminer \
                    -P stratums://${EthWallet}@\${!PREFERRED_SERVER}.2miners.com:12020 \
                    -P stratums://${EthWallet}@eth.2miners.com:12020 \
                    -P stratums://${EthWallet}@us-eth.2miners.com:12020 \
                  >> /tmp/ethminer.log 2>&1