Mining/site-docs/getting-started/configuration.md
snider 69376b886f feat: Rebrand xmrig to miner and vendor XMRig ecosystem
Complete rebranding of all components:
- Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt)
- Proxy: xmrig-proxy -> miner-proxy
- CUDA plugin: xmrig-cuda -> miner-cuda
- Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap
- Go CLI wrapper: miner-cli -> miner-ctrl

Vendored XMRig ecosystem into miner/ directory:
- miner/core - XMRig CPU/GPU miner
- miner/proxy - Stratum proxy
- miner/cuda - NVIDIA CUDA plugin
- miner/heatmap - Nonce visualization tool
- miner/config - Configuration UI
- miner/deps - Pre-built dependencies

Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0)
Updated branding to Lethean (domain, copyright, version 0.1.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:43:02 +00:00

141 lines
3.4 KiB
Markdown

# Configuration
The Mining Dashboard uses XDG base directories for configuration and data storage.
## Directory Structure
```
~/.config/lethean-desktop/
├── miners.json # Autostart and general settings
├── mining_profiles.json # Saved mining profiles
├── node.json # P2P node identity
└── peers.json # P2P peer registry
~/.local/share/lethean-desktop/
├── miners/ # Installed miner binaries
│ ├── xmrig/
│ │ └── xmrig-6.25.0/
│ └── tt-miner/
├── mining.db # SQLite hashrate history
└── node/
└── private.key # P2P private key
```
## miners.json
Controls autostart and database settings:
```json
{
"miners": [
{
"minerType": "xmrig",
"autostart": true,
"config": {
"pool": "pool.supportxmr.com:3333",
"wallet": "4xxx...",
"tls": true
}
}
],
"database": {
"enabled": true,
"retentionDays": 30
}
}
```
### Options
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `miners[].minerType` | string | - | Miner type (xmrig, tt-miner) |
| `miners[].autostart` | bool | false | Start on server launch |
| `miners[].config` | object | - | Miner configuration |
| `database.enabled` | bool | true | Enable SQLite persistence |
| `database.retentionDays` | int | 30 | Days to keep history |
## mining_profiles.json
Stores saved mining profiles:
```json
[
{
"id": "abc123",
"name": "My XMR Pool",
"minerType": "xmrig",
"config": {
"pool": "pool.supportxmr.com:3333",
"wallet": "4xxx...",
"tls": true,
"hugePages": true,
"threads": 0
}
}
]
```
### Profile Config Options
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `pool` | string | - | Pool address (host:port) |
| `wallet` | string | - | Wallet address |
| `password` | string | "x" | Pool password |
| `tls` | bool | false | Enable TLS encryption |
| `hugePages` | bool | true | Enable huge pages (Linux) |
| `threads` | int | 0 | CPU threads (0=auto) |
| `devices` | string | "" | GPU devices (tt-miner) |
| `algo` | string | "" | Algorithm override |
| `intensity` | int | 0 | Mining intensity (GPU) |
| `cliArgs` | string | "" | Extra CLI arguments |
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `MINING_API_PORT` | 9090 | REST API port |
| `MINING_P2P_PORT` | 9091 | P2P WebSocket port |
| `XDG_CONFIG_HOME` | ~/.config | Config directory |
| `XDG_DATA_HOME` | ~/.local/share | Data directory |
## Command Line Flags
```bash
./miner-ctrl serve --help
Flags:
-p, --port int API port (default 9090)
-n, --namespace API namespace (default /api/v1/mining)
--no-autostart Disable autostart
```
## Database Settings
The SQLite database stores hashrate history for graphing:
- **Location**: `~/.local/share/lethean-desktop/mining.db`
- **Default retention**: 30 days
- **Polling interval**: 10 seconds (high-res), 1 minute (low-res)
To disable database persistence:
```json
{
"database": {
"enabled": false
}
}
```
## Node Identity (P2P)
The P2P node identity is auto-generated on first run:
```bash
# Initialize with custom name
./miner-ctrl node init --name "my-rig" --role worker
```
See [P2P Multi-Node](../features/p2p-multinode.md) for more details.