Skip to content

Create a Custom Project ​

This guide focuses on which parts of a project script you should change and which parts form the BLSFlow switching contract and must remain unchanged.

If you want Codex to collect project information and create the project for you, see Create a Custom Project with MCP.

Important

Only change the project configuration, launch command, and hashrate parser. Do not rewrite the BLSFlow switching flow at the end of the script.

Create the project and pool ​

In the BLSFlow console, open Projects, select New Custom Project, and enter the project name, symbol, algorithm, and supported systems.

Add a pool and define at least one required string parameter for the wallet. Use wallet as its parameter key. The script can then use these template values:

  • pool_url: pool address supplied by BLSFlow.
  • wallet: wallet supplied in the user's runtime configuration.
  • mineral_coin: project symbol.
  • mineral_name: project name.

Parts you must change ​

1. Project symbol ​

Set coin to the symbol used in the console. Lowercase letters, digits, and hyphens are recommended.

bash
readonly coin="xmr"

Keep service_name, work_dir, launch_script_path, and hashrate_script_path derived from coin.

2. Project software ​

Set the executable path and the installer package to matching values:

bash
readonly miner_bin="${install_dir}/SRBMiner-MULTI"

curl -sSfL "$remote_shell_url/install_software.sh" | bash -s -- srbminer-multi

BLSFlow checks that miner_bin exists and is executable before switching.

3. Launch command ​

Change the exec command inside generate_start_script to match the miner's documented algorithm and arguments:

bash
exec ${miner_bin} \
  --algorithm neuromorph \
  --pool ${pool} \
  --wallet ${wallet} \
  --worker "\${worker}" \
  --cpu-threads -1 \
  --password x \
  --disable-gpu

Do not hard-code a pool or wallet. Keep ${pool} and ${wallet} so each runtime configuration can supply its own values.

4. Hashrate parser ​

Update match_pattern and the associated awk rules to match the miner's actual log format.

bash
readonly match_pattern='CPU[[:space:]]*:|Avg\. 1 min\.'

hashrate.sh must print only one numeric value to stdout, use kH/s as the unit, and print 0 when the service is stopped or no hashrate is available.

Parts you must not change ​

Do not rename or remove these hook functions:

bash
blsflow_coin_ensure_installed() {
  return 0
}

blsflow_coin_miner_executable() {
  printf '%s\n' "$miner_bin"
}

Do not remove the switching environment variables:

bash
export COIN="$coin"
export SERVICE_NAME="$service_name"
export MINER_CONFIG_FINGERPRINT="$fingerprint"
export INSTALL_DIR="$install_dir"
export WORK_DIR="$work_dir"
export LAUNCH_SCRIPT_PATH="$launch_script_path"

Keep the common switch script sourced in the current shell:

bash
set +u
# shellcheck disable=SC1090
source <(curl -sSfL "${remote_shell_url%/}/miner-switch.sh")
blsflow_miner_switch_main
set -u

Do not copy or rewrite the internals of miner-switch.sh. It owns locking, systemd unit updates, the single-project-per-machine rule, target service startup, and rollback after a failed switch.

Preflight checklist ​

  • [ ] coin matches the project symbol.
  • [ ] The installer package matches miner_bin.
  • [ ] The launch command uses the correct algorithm and arguments.
  • [ ] Pool and wallet values are not hard-coded.
  • [ ] hashrate.sh parses the miner log and returns kH/s.
  • [ ] Hooks, exports, source, and blsflow_miner_switch_main are unchanged.

Test on one device first:

bash
systemctl status blsflow-miner-xmr.service --no-pager
journalctl -u blsflow-miner-xmr.service -n 100 --no-pager
bash /opt/blsflow/run/xmr/hashrate.sh