API Docs
LUXMiner commands
netset

netset

Description

Changes the miner network configuration. By default, the miner starts with an automatic setup (DHCP), but you can change it to static IPs using this command.

The configuration values are provided using the following key-value pairs:

  • dhcp: If true, uses DHCP configuration.
  • hostname: The miner hostname.
  • ipaddress: The (static) IP address.
  • netmask: The network mask, when using static configuration.
  • gateway: The gateway for static configuration.
  • dnsservers: A list of DNS servers, separated by ;.

If you set an invalid configuration (for example, dhcp=false without an static IP), the network will revert back to DHCP after a few moments. Please note that when the configuration is updated, you will get the usual API result and the network stack will restart in ~5s after the command is executed. Keep this mind when automating network changes.

Command

$ echo '{"command": "netset", "parameter":"MBqfyUMo,dhcp=false,hostname=myminer,ipaddress=192.168.0.50,netmask=255.255.255.0,gateway=192.168.0.1,dnsservers=9.9.9.9;6.6.6.6"}' | nc $MINER_IP 4028 | jq

Examples

The example below sets the network to a static IP address:

$ echo '{"command": "netset", "parameter":"MBqfyUMo,dhcp=false,hostname=myminer,ipaddress=192.168.0.50,netmask=255.255.255.0,gateway=192.168.0.1,dnsservers=9.9.9.9;6.6.6.6"}' | nc $MINER_IP 4028 | jq
{
  "STATUS": [
    {
      "Code": 336,
      "Description": "LUXminer 2023.9.17.171857-78293fd",
      "Msg": "Network change scheduled",
      "STATUS": "S",
      "When": 1695156080
    }
  ],
  "id": 1
}

The example below changes the network stack to use DHCP:

$ echo '{"command": "netset", "parameter":"MBqfyUMo,dhcp=true"}' | nc $MINER_IP 4028 | jq
{
  "STATUS": [
    {
      "Code": 336,
      "Description": "LUXminer 0.1.0-15436f7140",
      "Msg": "Network change scheduled",
      "STATUS": "S",
      "When": 1667917312
    }
  ],
  "id": 1
}

To force a restart of the network without changing the configuration, you can just use restart:

$ echo '{"command": "netset", "parameter":"6EnwsDg2,restart"}' | nc $MINER_IP 4028 | jq
{
  "STATUS": [
    {
      "Code": 336,
      "Description": "LUXminer 2023.8.24.185352-5cd922b",
      "Msg": "Network restart scheduled",
      "STATUS": "S",
      "When": 1692904315
    }
  ],
  "id": 1
}

Parameters

ParameterNotes
session_idA valid session ID. See Session Management for details.
paramsList of key-value parameters to change.