MiningOS Logo
Install MiningOSMiners

AntMiner

AntMiner worker supports Bitmain AntMiner models - S19XP, S19XP Hydro, S21, and S21Pro.

Install the AntMiner Worker

1. Clone the Repository

Use the same working directory for all the workers.

Inside your working directory, run the following command to clone the (miningos-wrk-miner-antminer) repository:

git clone https://github.com/tetherto/miningos-wrk-miner-antminer.git

After cloning the repository, move into its directory:

cd miningos-wrk-miner-antminer

2. Install Dependencies

Inside the miningos-wrk-miner-antminer directory, run the following command to install dependencies using npm:

npm ci

3. Generate Configuration Files

Next, run the following script to scan the config/ directory, copy each .example file into an active configuration file by removing the .example suffix.

sh setup-config.sh

4. Enable Debugging and Start the Workers

You can now start the workers by running the following commands:

# S19 XP 
DEBUG="miningos:*" pm2 -s start worker.js --name 's19xp-1' -- --wtype wrk-miner-rack-s19xp --env development --rack rack-1

# S19 XP Hydro
DEBUG="miningos:*" pm2 -s start worker.js --name 's19xp_h-2' -- --wtype wrk-miner-rack-s19xp_h --env development --rack rack-2

# S21
DEBUG="miningos:*" pm2 -s start worker.js --name 's21-3' -- --wtype wrk-miner-rack-s21 --env development --rack rack-3

# S21 Pro
DEBUG="miningos:*" pm2 -s start worker.js --name 's21pro-4' -- --wtype wrk-miner-rack-s21pro --env development --rack rack-4

5. Start Mock Servers

You can use the following commands to start mock servers:

# Mock S19 XP
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-s19xp-1' -- --type S19xp --env development --port 4001

# Mock S19 XP Hydro
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-s19xp_h-2' -- --type S19xp_h --env development --port 4002

# Mock S21
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-s21-3' -- --type S21 --env development --port 4003

# Mock S21 Pro
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-s21pro-4' -- --type S21Pro --env development --port 4004

On this page