Skip to content

Workers

Guy Davis edited this page Nov 9, 2021 · 59 revisions

Start a Discussion or join our Discord for support and to help out.

While the default installation of Machinaris is standalone, management of multiple Machinaris workers on your local-area network (LAN) is also supported. Machinaris offers a single WebUI to control all the workers (plotters, harvesters, farmers) on your LAN. Here's an example network layout:

Workers

NOTE: This is NOT intended for management of multiple instances at different geographic sites over a wide area network (WAN). Please investigate usage of VPN tunneling and/or secured web-proxy in that case. DO NOT simply port-forward ports 8447, 8926 or 8927 at your router. Ports 8447, 8926 and 8927 should NOT be available to the public Internet!

Launching

First, you'll need a Machinaris controller/fullnode running. Then you can launch workers such as 'harvester', 'plotter', 'harvester+plotter'.

Controller

As with standalone, one full-node instance of Machinaris should be running as controller for your network. Use the Launch Wizard to create a Docker Run or Docker Compose command for your system.

Plotter

There may be multiple plotters running on the LAN. Visit the Workers page of your Machinaris controller (above), and click the New Worker button to generate a Docker Run or Compose for your system.

Plotter

Harvester

There may be multiple harvesters running on the LAN. Visit the Workers page of your Machinaris controller (above), and click the New Worker button to generate a Docker Run or Compose for your system.

Harvester

Harvester+Plotter

It's also possible to combine both harvesting and plotting duties in a single Machinaris container launch. Visit the Workers page of your Machinaris controller (above), and click the New Worker button to generate a Docker Run or Compose for your system. You can check both the 'Harvester' and 'Plotter' mode buttons at the same time.

HarvesterPlotter

Monitoring

When running, browsing to Machinaris on your Controller instance will show status for all connected workers:

Status

The communication between controller and worker is bi-directional via REST API on port 8927. Please ensure you have opened the required ports (8926 & 8927) in the firewalls on each computer running Machinaris. In example above, the worker (gimli) is sending its status to the controller (aragorn), but due to firewall on the worker, the controller shows it as Connection Refused.

Control

With multiple Machinaris plotters on your LAN, you can configure and control them from the Plotting page on your Controller instance:

Plotting

FAQ

My network has no local DNS, can I use IPs to connect workers?

While the Workers design was primarily for a home LAN with a shared local DNS resolving all local machine hostnames, I discovered that most don't have a functional DNS on their LAN. As such, please ensure you use the IP addresses for environment variables (farmer_address, controller_host and worker_address) when you create your worker's docker-compose.yml on the Workers page of the WebUI.

What communication happens between controller and workers?

All controllers and workers are running a REST-API server on port tcp/8927. To allow multiple fork containers on a single worker, this default port in incremented for each container. Flax is 8928, N-Chain is 8929, etc. All of this is generated for you on the Workers page when you click the New Worker button.

In general, workers submit their own status (farm/plotting/plots/etc) to their controller's API endpoint. As well, the controller can send commands to a worker at their API endpoint, to start/stop plotting, view logs, etc. Currently, there is no authentication of these endpoints as it is intended for ease-of-use on a home LAN. As such, you mustn't expose these ports outside your LAN or VLAN, particularly not to the public Internet.

Clone this wiki locally