Miner Guide

Configuration — Miners

Customize your mining setup to match your hardware, goals, and constraints.

Basic Configuration

When you start the daemon, you can pass configuration flags:

swarmient-daemon start \
  --keyfile ~/.swarmient/miner.json \
  --control-plane https://api.swarmient.com \
  --cpu-cores 6 \
  --memory-gb 12 \
  --disk-gb 80

Or use a configuration file:

swarmient-daemon start --config ~/.swarmient/config.json

Configuration File

Create ~/.swarmient/config.json:

{
  "miner": {
    "keyfile": "~/.swarmient/miner.json",
    "id": "miner_abc123"
  },
  "network": {
    "control_plane": "https://api.swarmient.com",
    "poll_interval_ms": 5000
  },
  "hardware": {
    "cpu_cores": 6,
    "memory_gb": 12,
    "disk_gb": 80,
    "gpu": {
      "available": false,
      "type": null
    }
  },
  "execution": {
    "max_concurrent_tasks": 2,
    "sandbox_type": "native",
    "timeout_multiplier": 1.2
  },
  "storage": {
    "data_dir": "~/.swarmient/data",
    "cache_dir": "~/.swarmient/cache",
    "max_result_size_mb": 1000
  },
  "logging": {
    "level": "info",
    "format": "json"
  }
}

Hardware Configuration

Tell Swarmient what resources you can offer:

CPU Cores

Default: Auto-detect available cores

Set manually:

swarmient-daemon start --cpu-cores 6

Guidance:

  • Leave 1–2 cores for OS and other applications
  • If you have 8 cores, advertise 6–7
  • More cores = more jobs you can accept

Memory

Default: 75% of available RAM

Set manually:

swarmient-daemon start --memory-gb 12

Guidance:

  • Leave at least 4GB for OS
  • If you have 16GB total, advertise 12GB
  • Conservative estimates avoid out-of-memory failures

Disk Space

Default: 80% of available disk

Set manually:

swarmient-daemon start --disk-gb 80

Guidance:

  • Keep at least 20GB free for OS
  • Jobs cache intermediate results (uses disk temporarily)
  • Larger disk = longer job execution, higher throughput

GPU Configuration

If you have an NVIDIA GPU:

swarmient-daemon start --gpu nvidia --gpu-memory-gb 8

Supported GPUs:

  • NVIDIA (CUDA compatible)
  • AMD (ROCm compatible, limited support)

GPU memory:

  • Auto-detect recommended
  • Specify if auto-detection fails

Enable GPU jobs (higher earnings):

{
  "hardware": {
    "gpu": {
      "available": true,
      "type": "nvidia",
      "memory_gb": 8
    }
  }
}

GPU jobs pay 3–5x more than CPU jobs. If you have GPU, enable it!

Execution Configuration

Concurrent Tasks

How many tasks can run simultaneously:

swarmient-daemon start --max-concurrent 2

Guidance:

  • 1 per 2–4 CPU cores (conservative)
  • If 8 cores, use 2–3 concurrent tasks
  • More concurrency = more earnings, but higher resource contention

Default: CPU cores ÷ 4 (conservative)

Sandbox Type

How jobs are isolated:

native (default) — Linux containers/sandboxing

docker — Run jobs in Docker containers (more isolation)

wasm — WASM sandbox (limited use cases)

swarmient-daemon start --sandbox docker

native is fastest. docker is most secure.

Timeout Multiplier

Allow extra time for job execution:

swarmient-daemon start --timeout-multiplier 1.2

Value of 1.2 means jobs get 20% extra time beyond timeout. Useful if:

  • Your hardware is slow
  • You want to avoid timeouts
  • You’re resource-constrained

Default: 1.0 (no extra time)

Storage Configuration

Data Directory

Where job results and cache are stored:

swarmient-daemon start --data-dir /mnt/large-disk/swarmient

Use a separate disk if your main disk is small.

Default: ~/.swarmient/data

Cache Directory

Temporary files during execution:

swarmient-daemon start --cache-dir /tmp/swarmient-cache

Use a fast SSD for cache to speed up job execution.

Default: ~/.swarmient/cache

Max Result Size

Maximum size of job results (in MB):

{
  "storage": {
    "max_result_size_mb": 1000
  }
}

Jobs that exceed this size are rejected. Set based on your disk space.

Default: 1000 MB (1GB)

Network Configuration

Poll Interval

How often to check for new jobs:

{
  "network": {
    "poll_interval_ms": 5000
  }
}

Lower interval (1000ms): Get jobs faster, use more bandwidth

Higher interval (10000ms): Use less bandwidth, slower job pickup

Default: 5000ms (5 seconds)

Retry Configuration

Retry failed network calls:

{
  "network": {
    "max_retries": 3,
    "retry_delay_ms": 1000
  }
}

Default: 3 retries, 1 second delay

Logging Configuration

Log Level

Control verbosity:

swarmient-daemon start --log-level debug

Values: debug, info, warn, error

debug — Verbose output, good for troubleshooting

info — Normal operation, recommended

warn — Only warnings and errors

error — Only errors

Default: info

Log Format

Output format:

{
  "logging": {
    "format": "json"
  }
}

json — Machine-readable (good for logs aggregation)

text — Human-readable (good for troubleshooting)

Example Configurations

Aggressive Mining (Maximize Earnings)

For users who want to earn the most:

{
  "hardware": {
    "cpu_cores": 7,
    "memory_gb": 14,
    "disk_gb": 150,
    "gpu": {
      "available": true,
      "type": "nvidia",
      "memory_gb": 8
    }
  },
  "execution": {
    "max_concurrent_tasks": 4,
    "sandbox_type": "native",
    "timeout_multiplier": 1.0
  }
}

Conservative Mining (Stability First)

For users who want reliability over earnings:

{
  "hardware": {
    "cpu_cores": 4,
    "memory_gb": 8,
    "disk_gb": 50,
    "gpu": {
      "available": false
    }
  },
  "execution": {
    "max_concurrent_tasks": 1,
    "sandbox_type": "docker",
    "timeout_multiplier": 1.5
  }
}

Hybrid (Balanced)

For typical users:

{
  "hardware": {
    "cpu_cores": 6,
    "memory_gb": 12,
    "disk_gb": 100,
    "gpu": {
      "available": false
    }
  },
  "execution": {
    "max_concurrent_tasks": 2,
    "sandbox_type": "native",
    "timeout_multiplier": 1.1
  }
}

Hot Reload

Change configuration without restarting:

swarmient-daemon reload-config --config ~/.swarmient/config.json

Some settings (like hardware specs) take effect immediately. Others (like sandbox type) require a restart.

Monitor Configuration

Check your active configuration:

swarmient-daemon config show

Output:

{
  "hardware": {
    "cpu_cores": 6,
    "memory_gb": 12,
    "disk_gb": 100
  },
  "execution": {
    "max_concurrent_tasks": 2
  }
}

Next Steps