<p>Here are the instructions for setting a mining proxy which allows all your miners to connect via the proxy instead of via their own config.  This way you only have to stop then start a single process on the proxy to change pools instead of messing with each miner to do the switch.</p>

<ol>
<li>Setup mining_proxy.py on a linux machine
<ol>
<li>pont slush's mining_proxy.py at a pool of your choosing using a bash script file (remember to chmod 755  so you can run the bash script with ./)</li>
<li>setup each pool you want to mine with it's own script (same -sp (port)  for each )</li>
<li>point all your miners at the proxy server with the port you are using</li>
<li>make sure all pools use the same worker names and passwords (since this is setup on the miners)</li>
<li>start your chosen bash script (best to use screen so you can exit the session and leave it running)</li>
<li>miners can be switched by ssh via screen -d -r , then ctrl-c (to kill the proxy), now just run the correct bash script to switch to the next pool.</li>
</ol></li>
</ol>

CC BY-SA 3.0
2014-02-24T15:32:55.760Z
This worked great - a few caveats to others, I had to set my server to static IP on the ubuntu machine so a power outage or router reboot wouldn't force me to have to mess with the miner's themselves. –

However a few hours later and checking my pool stats, this DIDNT work it just caused a ton of invalid shares.  I thought this could happen beforehand as you are trying to run stratum through stratum (Antminer has a stratum proxy built into cgminer.  Basically my output on the pool was the equivalent of 300 GH for those 8 units so back to the drawing board for me
Frankenmint
CC BY-SA 3.0
2014-02-24T19:51:59.620Z
When configuring stratum mining proxy, did you setup a stratum port (-sp).  The proxy allows for both getwork and stratum ports to be used.  Failing that, I wonder if you can set the ant miners to use getwork instead?
mcstar
CC BY-SA 3.0
2014-02-24T19:58:58.367Z
Found a thread at https://bitcointalk.org/index.php?topic=405889.0 regarding this exact issue.  Seems there are some limitations in the cgminer instance antminer's using (or breaking changes, not sure which).  Either way, the only suggested fix is to use the cgminer api and some custom scripts to make the changes as needed.   This is unfortunately because I recently ordered a couple of the antminers to supplement my other rigs, for which, this technique has worked flawlessly for some time.
mcstar
CC BY-SA 3.0
2014-02-22T23:26:18.980Z
2014-02-22T23:26:18.980Z
mcstar
<p>Along with starting a proxy to control which pool you mine at, you can force the proxy to control the username and password for each pool, allowing different worker names at different pools and mining towards BTC addresses, Dwolla accounts, etc.</p>

<p>To do this, start the proxy using the -cu and -cp commands for the worker name and password, respectively. </p>

<p>For example, using "-cu worker1 -cp x" will force any work through the proxy to submit it under the username worker1 pw x, even if cgminer or other mining program uses other names). </p>

<p>Also, it helps to add the -nm option if your connection is poor or the pool is giving really low difficulty shares to fast miners. This can cause huge network lag from TONs of low diff shares being submitted. Just a problem I ran into on a pool giving me diff1 shares at 1.4TH, so thought I'd share the info if your moving around pools a lot.</p>

CC BY-SA 3.0
2014-04-12T12:42:27.503Z
I forgot about this thread and ended up donating to and getting access of CG Remote which has been working well to manage everything together
Frankenmint
CC BY-SA 3.0
2014-04-12T13:16:19.350Z
Ok, great to know; I just learned how to control my 8 Antminer S1s myself so thought I'd share my results. I was also looking at CG Remote, but was unsure how many units I could monitor and control with it, so have held off on trying it.
vnhyp0
CC BY-SA 3.0
2014-04-12T07:54:32.620Z
2014-04-12T07:59:37.853Z
2014-04-12T07:59:37.853Z
vnhyp0
<p>I would suggest creating a bash script for this. You could write a bash script that, when executed, asks what pool you would like to switch to. It then kills all of your miners and restarts them using the new pool.</p>

CC BY-SA 3.0
2014-02-20T23:44:59.090Z
2014-02-20T23:44:59.090Z
Andrew Koroluk
<p>As title says, I have 8 identical mining machines I just want to be able to point them at the same pool all at once, is this possible with a combination of python and ssh?  If someone else already invented something could you point me to that?  If not, could you give me a basic idea on how I would tackle this myself?</p>

<mining-pools><miner-configuration>
I have 8 Antminers, is there a way I could change their pool credentials all at the same time like through ssh with a script
Frankenmint
# I have 8 Antminers, is there a way I could change their pool credentials all at the same time like through ssh with a script

(Asked by: username_0 on 2014-02-20)

As title says, I have 8 identical mining machines I just want to be able to point them at the same pool all at once, is this possible with a combination of python and ssh? If someone else already invented something could you point me to that? If not, could you give me a basic idea on how I would tackle this myself?

**Tags:** mining-pools, miner-configuration


---

## 3 answers

### Answer by username_1 on 2014-02-22. Score: 2 | Accepted answer

Here are the instructions for setting a mining proxy which allows all your miners to connect via the proxy instead of via their own config. This way you only have to stop then start a single process on the proxy to change pools instead of messing with each miner to do the switch.

1. Setup mining\_proxy.py on a linux machine
   1. pont slush's mining\_proxy.py at a pool of your choosing using a bash script file (remember to chmod 755 so you can run the bash script with ./)
   2. setup each pool you want to mine with it's own script (same -sp (port) for each )
   3. point all your miners at the proxy server with the port you are using
   4. make sure all pools use the same worker names and passwords (since this is setup on the miners)
   5. start your chosen bash script (best to use screen so you can exit the session and leave it running)
   6. miners can be switched by ssh via screen -d -r , then ctrl-c (to kill the proxy), now just run the correct bash script to switch to the next pool.

> **Comments:**
> **username_0**: This worked great - a few caveats to others, I had to set my server to static IP on the ubuntu machine so a power outage or router reboot wouldn't force me to have to mess with the miner's themselves. –  However a few hours later and checking my pool stats, this DIDNT work it just caused a ton of invalid shares.  I thought this could happen beforehand as you are trying to run stratum through stratum (Antminer has a stratum proxy built into cgminer.  Basically my output on the pool was the equivalent of 300 GH for those 8 units so back to the drawing board for me  
> **username_1**: When configuring stratum mining proxy, did you setup a stratum port (-sp).  The proxy allows for both getwork and stratum ports to be used.  Failing that, I wonder if you can set the ant miners to use getwork instead?  
> **username_1**: Found a thread at https://bitcointalk.org/index.php?topic=405889.0 regarding this exact issue.  Seems there are some limitations in the cgminer instance antminer's using (or breaking changes, not sure which).  Either way, the only suggested fix is to use the cgminer api and some custom scripts to make the changes as needed.   This is unfortunately because I recently ordered a couple of the antminers to supplement my other rigs, for which, this technique has worked flawlessly for some time.  

---

### Answer by username_2 on 2014-04-12. Score: 1

Along with starting a proxy to control which pool you mine at, you can force the proxy to control the username and password for each pool, allowing different worker names at different pools and mining towards BTC addresses, Dwolla accounts, etc.

To do this, start the proxy using the -cu and -cp commands for the worker name and password, respectively.

For example, using "-cu worker1 -cp x" will force any work through the proxy to submit it under the username worker1 pw x, even if cgminer or other mining program uses other names).

Also, it helps to add the -nm option if your connection is poor or the pool is giving really low difficulty shares to fast miners. This can cause huge network lag from TONs of low diff shares being submitted. Just a problem I ran into on a pool giving me diff1 shares at 1.4TH, so thought I'd share the info if your moving around pools a lot.

> **Comments:**
> **username_0**: I forgot about this thread and ended up donating to and getting access of CG Remote which has been working well to manage everything together  
> **username_2**: Ok, great to know; I just learned how to control my 8 Antminer S1s myself so thought I'd share my results. I was also looking at CG Remote, but was unsure how many units I could monitor and control with it, so have held off on trying it.  

---

### Answer by username_3 on 2014-02-20. Score: 1

I would suggest creating a bash script for this. You could write a bash script that, when executed, asks what pool you would like to switch to. It then kills all of your miners and restarts them using the new pool.


---

