MiningOS Logo
Install MiningOSContainers

Bitdeer Containers

Bitdeer worker supports Bitdeer D40 series containers for A1346, M30, M56 and S19XP models.

Install the Bitdeer 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-container-bitdeer) repository:

git clone https://github.com/tetherto/miningos-wrk-container-bitdeer.git

After cloning the repository, move into its directory:

cd miningos-wrk-container-bitdeer

2. Install Dependencies

Inside the miningos-wrk-container-bitdeer 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:

# D40-A1346
DEBUG="miningos:*" pm2 -s start worker.js --name 'd40-a1346-1' -- --wtype wrk-container-rack-d40-a1346 --env development --rack rack-1

# D40-M30
DEBUG="miningos:*" pm2 -s start worker.js --name 'd40-m30-2' -- --wtype wrk-container-rack-d40-m30 --env development --rack rack-2

# D40-M56
DEBUG="miningos:*" pm2 -s start worker.js --name 'd40-m56-3' -- --wtype wrk-container-rack-d40-m56 --env development --rack rack-3

# D40-S19XP
DEBUG="miningos:*" pm2 -s start worker.js --name 'd40-s19xp-4' -- --wtype wrk-container-rack-d40-s19xp --env development --rack rack-4

5. Start Mock Servers

You can use the following commands to start a mock server:

# D40-A1346 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-d40-a1346-1' -- --type d40_a1346 --env development --port 4014

# D40-M30 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-d40-m30-2' -- --type d40_m30 --env development --port 4015

# D40-M56 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-d40-m56-3' -- --type d40_m56 --env development --port 4016

# D40-S19XP mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-d40-s19xp-4' -- --type d40_s19xp --env development --port 4017

On this page