Manage ‘x4x’ miners remotely with XMWorkers

FSOL
6 min readApr 25, 2023

--

Supervising your miners during their work is an absolute necessity. The task becomes more complicated when they are in different physical locations.

To remedy this, you should turn to the ‘XMRig-workers’ project which offers a simple and uncluttered web interface (also called dashboard) that will allow you to :

  • have information about the performance of each miner,
  • take control remotely to make supervision operations.

Thus XDAG mining will be as efficient as possible, without the need to turn to a solution like XMRigCC which imposes fees but also to have to do without x4x.

Here are the steps to follow.

0°/ Requirements

  • A Firefox browser : because Chrome/Edge type browsers block mixed content (HTTP access from HTTPS) and miners are normally configured without HTTPS/SSL, the use of Firefox (or derived browsers) is essential. Indeed, the dashboard we are going to use is only accessible without HTTPS/SSL. Nota Bene : Private browsing or TOR onion mode will not work.
  • Knowing how to open and redirect the ports of your router or internet box : given the multitude of existing routers and boxes, each of which has its own operating mode, no explanation on this subject will be given here. We will assume that you know how to do it.

On this last point, my advice is to make a table to manage all the work of modification of your router that you will have to do and thus facilitate the task when it will be necessary to configure each of them.

In my example here, I have the first 3 miners that are in the same location, and another DESK-2 miner that is in a different location. I have opened the relevant ports on the routers and redirected them correctly.

Now let’s get to the heart of the matter.

1°/ Setting up your x4x miners

For each of the miners you want to supervise, you will have to set the following parameters in your x4x config.json :

  • Green frame : allows you to supervise the miner via the web. You have to set the value "enabled"to true.
  • Pink frame : define the IP that can access the miner. By setting the "host"parameter to 0.0.0.0 you will allow all IPs, which can be useful if you supervise your miner from different places.
  • Orange frame : setting the "port"to 44442 will allow the supervision dashboard to communicate with your miner on that port. Obviously, you will put the port number that suits you, here 44442 is given as an example.
  • Blue frame : the "access-token" parameter allows you to define a password to access your miner. In the example above, I have defined the password "xdag". If you don’t want to set a password, you have to set the value nullbut in this case, note that you won’t be able to take control of your miner (stop, restart, etc…) but you will only be able to consult the supervision information that it will send.
  • Yellow frame : this last parameter allows you to authorize to take control of the miner by authorizing the most sensitive functions of this one as the stop or the start for example. In my example, I don’t want to authorize these functions but only do monitoring without control. So I set the "restricted"parameter totrue. On the other hand, if I wanted to allow sensitive monitoring functions, I would have set the value false. I remind you that the use of advanced monitoring functions makes the definition of a password mandatory (see the blue box above).

All the official information for the settings of these parameters can be found on the official website of API & HTTP functions inside XMRig official documentation.

2°/ Access to the ‘ludufre’ dashboard

To supervise our miners, we are not going to use the official‘XMRig-workers’ project, but a fork with more advanced features called ‘ludufre/wmworkers’. It has some advanced features that will be very useful for us.

The dashboard is accessible at the address http://xmworkers.ludufre.com that you will enter in your firefox, making sure to put ‘http’ and not ‘https’. And this is what you should get:

Although you are using Firefox, you may see the following screen even though you have entered the address as ‘http’:

In this case, you will find the procedure to purge the HSTS settings on this website . Here is an extract that might interest you:

3°/ Add a worker

Here is the procedure in pictures:

  • Click on the green button on the top right.
  • Enter the information of your miner. At least the URL if you have not defined a protection token. Otherwise, specify the token you have defined in the config.json.
  • Repeat the operation as many times as you have miners to supervise, and finally, you will get the following screen.

Note that the access information to your miners that you have just defined are stored in cookies. So you won’t have to re-enter them the next time you access the dashboard, unless your browser’s security settings clear the cache or you’ve done it yourself.

Let’s now move on to the possibilities offered by this supervisor.

4°/ Supervisor information

In the dashboard, click on the name of one of your miners, the following screen appears:

The first tab “Summary” gives you all the classic information of your miner:

  • The version of x4x you are using,
  • The processor on which you are mining,
  • The duration of the current mining session,
  • The fee rate (with x4x it will always be zero),
  • The mining power information,
  • The connection information with the mining pool and the algo used (here the rx/xdag).

The second tab “Connection” allows you to modify your miner connection options.

The “Backends” tab will give you access to the statistics of your miner like for example the number of active threads, their hash power, the assembly language optimization used, etc…

The last tab called “Configuration” allows you to access the config.json of your x4x miner.

If you have activated the restriction of advanced functions in the config.json, you will have on the screen an error “403 / Forbidden” as above in the red frame.

5°/ Conclusion

You are now in possession of a simple, practical and free supervision solution for your x4x miners. You will be able to monitor efficiently your remote miners, which will improve your mining and your earnings in XDAG.

I hope you’ve enjoyed reading this. If it is the case, please send me some XDAG, it’s always a pleasure : 53r2nH7y81CePxqe73mpoZdEjs66j178K

See you soon!

--

--