Bitcoin Forum
December 16, 2018, 12:32:47 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: API for CGMiner  (Read 13067 times)
tuckertz1992
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:07:29 PM
 #1

Struggling to get it to work, anyone got an example .bat file or .conf file with API enabled? Cry

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
1544920367
Hero Member
*
Offline Offline

Posts: 1544920367

View Profile Personal Message (Offline)

Ignore
1544920367
Reply with quote  #2

1544920367
Report to moderator
1544920367
Hero Member
*
Offline Offline

Posts: 1544920367

View Profile Personal Message (Offline)

Ignore
1544920367
Reply with quote  #2

1544920367
Report to moderator
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1544920367
Hero Member
*
Offline Offline

Posts: 1544920367

View Profile Personal Message (Offline)

Ignore
1544920367
Reply with quote  #2

1544920367
Report to moderator
milone
Sr. Member
****
Offline Offline

Activity: 434
Merit: 251


CGWatcher & CGRemote


View Profile WWW
July 22, 2013, 07:24:46 PM
 #2

Assuming you're trying to access the miner from the same computer and want full API privileges, the command line arguments would be:

Code:
--api-listen --api-allow W:127.0.0.1

If using a config file, add these two lines:

Code:
"api-listen" : true,
"api-allow" : "W:127.0.0.1"

You may need to add a comma at the end depending on where in your config file you place it.

If you're trying to access the miner from a different computer, give more info and I'll try to help.

CGWatcher, a GUI/monitor for CGMiner & BFGMiner: http://www.cgwatcher.com
CGRemote, a remote mining dashboard for all of your miners: http://www.minerremote.com
BTC: 12TAYjmSrdDHLNpmix2MG6y3R868SMM7Fx    LTC: LM6Un6hZvPzLBggJWiAVG6E6w2GfaHukXY
tuckertz1992
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:27:35 PM
 #3

Assuming you're trying to access the miner from the same computer and want full API privileges, the command line arguments would be:

Code:
--api-listen --api-allow W:127.0.0.1

If using a config file, add these two lines:

Code:
"api-listen" : true,
"api-allow" : "W:127.0.0.1"

You may need to add a comma at the end depending on where in your config file you place it.

If you're trying to access the miner from a different computer, give more info and I'll try to help.

Please see:   https://bitcointalk.org/index.php?topic=222632.0

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
milone
Sr. Member
****
Offline Offline

Activity: 434
Merit: 251


CGWatcher & CGRemote


View Profile WWW
July 22, 2013, 07:41:27 PM
 #4

If you're trying to host that page on a web server (that isn't the computer cgminer is running on), you'll need to

1.) Enable the API in cgminer and set it to allow connections from your web server's IP address.

2.) If you're mining computer is connected to a router, forward the port cgminer's API is using (default is 4028) to your mining computer. http://portforward.com has a lot of helpful information on how to do this and a free utility to check if the port is forwarded correctly.

3.) Set your mining computer's public IP address in that monitor page's PHP. I don't use that monitor but I'd imagine the IP is either hard-coded or is displayed in a textbox.

That page on your web server is what is connecting to cgminer, so you have to make sure it can connect to your mining computer and to cgminer. If your mining computer's public IP address changes, you'll need to update the PHP with the new IP address.


CGWatcher, a GUI/monitor for CGMiner & BFGMiner: http://www.cgwatcher.com
CGRemote, a remote mining dashboard for all of your miners: http://www.minerremote.com
BTC: 12TAYjmSrdDHLNpmix2MG6y3R868SMM7Fx    LTC: LM6Un6hZvPzLBggJWiAVG6E6w2GfaHukXY
tuckertz1992
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:47:16 PM
 #5

If you're trying to host that page on a web server (that isn't the computer cgminer is running on), you'll need to

1.) Enable the API in cgminer and set it to allow connections from your web server's IP address.

2.) If you're mining computer is connected to a router, forward the port cgminer's API is using (default is 4028) to your mining computer. http://portforward.com has a lot of helpful information on how to do this and a free utility to check if the port is forwarded correctly.

3.) Set your mining computer's public IP address in that monitor page's PHP. I don't use that monitor but I'd imagine the IP is either hard-coded or is displayed in a textbox.

That page on your web server is what is connecting to cgminer, so you have to make sure it can connect to your mining computer and to cgminer. If your mining computer's public IP address changes, you'll need to update the PHP with the new IP address.



I think it may be my ports, all IP's seem to be setup okay

BT Home Hubs...

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
tuckertz1992
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 08:06:04 PM
 #6

Deffo BT Home Hub Problems, Still cant get the bloody port open! Gutted! Sad

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!