Starting a thread. Made a few edits today based on feedback from the beta testers on the new proxy. Once the new version is tested this will be the thread.
Why the proxy:
This is going to be a super-easy to use image, but it is made for larger-scale operations (given it is a proxy.) It has been tested with the servethehome/universal_cryptonight image.
There are three main components:
1. Docker image
Note: x86 only now. May make an ARM version later if people use this. The proxy now can re-launch in 2-3 seconds on most x86 systems.
It is based on Ubuntu 16.04 (18.04 was having issues with the proxy.) The benefit here is that you can pull this once and re-launch super fast.
2. Configuration json file
The xmrig-proxy configuration file is really useful since it allows you to set difficulty, it allows you to change pools. You can also have a configuration file for each pool you want to use. The wallet used in the user ID will override what is on the workers. It will direct the hashing power to the pool / port input in the config.
Note, the below is for Aeon, if you want to do any cryptonight currency, use "coin": "xmr", instead.
Sample config.json for the STH Aeon Pool (change walletID to your ID):
3. Hosting the config.json
The default name for the file is config.json. These json files tell xmrig-proxy where to connect. When you launch the Docker container, you need to specify a file name and a full URL for the file. Put them on a http(s) server internally and they are pulled via wget.
In the launch command, you use the full url to where the file is. Note, this only needs to be available to the Docker host, not the general public. You can run a local nginx container on the same Docker host and make a directory to host the static files if you want. Many options, you just need to have a URL that the proxy can reach. This can even be a s3 bucket or owncloud hosted config.
Something like:
4. Docker run and port publishing
Here there are two things one needs to do. First, you need to specify the config file. Second, you need to publish the service with the appropriate port.
The two environment variables are:
-e filename= This is there so you can specify the file name in the event you have grape.json for example. The image will default to expect config.json so you do not need to do this unless you are using a different file name.
-e confurl= This is where the image will pull the configuration file from.
As you can see, the port we are publishing is 4333, or the same as in the "bind" field of the config.json example. In theory we could publish to port 80 externally then 4333 in the Docker container. The docker -p flag is in the format -p ip:hostPort:containerPort but you do not need to specify an ip, albeit it can be useful if you have multiple IPs on a machine.
A quick note: the first time you run this, try -it instead of -itd. This allows you to verify it is working.
The impact of this image is twofold:
First, if you are mining Aeon and have 100 servers in a location, you can point them directly to the (hopefully STH) Aeon pool. You can then change wallet IDs, set custom difficulties and etc all at the proxy level.
Second, if you are mining cryptonight, and want to algo/ pool hop, you can now:
Use servethehome/universal_cryptonight docker image on the workers and point to the proxy; and
Use the servethehome/xmrig-proxy to manage which pool they are mining on and the wallet address.
That means you can orchestrate the deployment of miners and leave them, only changing if you swap to Aeon. You can then just re-launch the container to a different config file, altering the URL, and you are set.
Why the proxy:
- Ability to quickly and easily switch wallets/ coins/ pools
- Minimizes external connections for easier NAT/ firewall management
- Allegedly better performance (have not actually seen this)
- This will work with cryptonight and/or cryptonight-lite
- Per worker and aggregate stats available
This is going to be a super-easy to use image, but it is made for larger-scale operations (given it is a proxy.) It has been tested with the servethehome/universal_cryptonight image.
There are three main components:
- Docker image
- Configuration json file
- Hosting the config json
- Docker run and port publishing.
1. Docker image
Note: x86 only now. May make an ARM version later if people use this. The proxy now can re-launch in 2-3 seconds on most x86 systems.
Code:
servethehome/xmrig-proxy:latest
2. Configuration json file
The xmrig-proxy configuration file is really useful since it allows you to set difficulty, it allows you to change pools. You can also have a configuration file for each pool you want to use. The wallet used in the user ID will override what is on the workers. It will direct the hashing power to the pool / port input in the config.
Note, the below is for Aeon, if you want to do any cryptonight currency, use "coin": "xmr", instead.
Sample config.json for the STH Aeon Pool (change walletID to your ID):
Code:
{
"background": false,
"log-file": null,
"access-log-file": null,
"retries": 5,
"retry-pause": 5,
"coin": "aeon",
"custom-diff": 20000,
"syslog": false,
"verbose": false,
"colors": true,
"workers": true,
"pools": [
{
"url": "a.mwork.io:4334",
"user": "<walletID>",
"pass": "x"
}
],
"bind": [
"0.0.0.0:4333"
],
"api": {
"port": 0,
"access-token": null,
"worker-id": null
}
}
The default name for the file is config.json. These json files tell xmrig-proxy where to connect. When you launch the Docker container, you need to specify a file name and a full URL for the file. Put them on a http(s) server internally and they are pulled via wget.
In the launch command, you use the full url to where the file is. Note, this only needs to be available to the Docker host, not the general public. You can run a local nginx container on the same Docker host and make a directory to host the static files if you want. Many options, you just need to have a URL that the proxy can reach. This can even be a s3 bucket or owncloud hosted config.
Something like:
Code:
https://192.168.2.2/config.json
Here there are two things one needs to do. First, you need to specify the config file. Second, you need to publish the service with the appropriate port.
Code:
docker run -itd -p 4333:4333 -e filename=config.json -e confurl=https://192.168.2.2/config.json servethehome/xmrig-proxy
-e filename= This is there so you can specify the file name in the event you have grape.json for example. The image will default to expect config.json so you do not need to do this unless you are using a different file name.
-e confurl= This is where the image will pull the configuration file from.
As you can see, the port we are publishing is 4333, or the same as in the "bind" field of the config.json example. In theory we could publish to port 80 externally then 4333 in the Docker container. The docker -p flag is in the format -p ip:hostPort:containerPort but you do not need to specify an ip, albeit it can be useful if you have multiple IPs on a machine.
A quick note: the first time you run this, try -it instead of -itd. This allows you to verify it is working.
The impact of this image is twofold:
First, if you are mining Aeon and have 100 servers in a location, you can point them directly to the (hopefully STH) Aeon pool. You can then change wallet IDs, set custom difficulties and etc all at the proxy level.
Second, if you are mining cryptonight, and want to algo/ pool hop, you can now:
Use servethehome/universal_cryptonight docker image on the workers and point to the proxy; and
Use the servethehome/xmrig-proxy to manage which pool they are mining on and the wallet address.
That means you can orchestrate the deployment of miners and leave them, only changing if you swap to Aeon. You can then just re-launch the container to a different config file, altering the URL, and you are set.
Last edited: