Configuration¶
This page provides reference for leprechaun.yml - the configuration file Leprechaun uses.
This configuration file needs to be located in your home directory, such as C:\Users\User\leprechaun.yml.
- The global structure of the file consists of four optional entries:
theme, your color theme which can be eitherlight(default) ordark;addresses, which contains your wallet addresses for mining (see example);cpu-miners, which holds a miner stack of your CPU miners;gpu-miners, which holds a miner stack of your GPU miners.
The Miner Stack¶
Leprechaun uses a concept called a “miner stack”. When deciding which miner to use for CPU or GPU, it goes through a list of candidates, and picks the first one that is ready to work. This list, or stack, is what you specify in your config file:
cpu-miners: # This is a miner stack for your CPU
Miner1: # This miner is first in line
currency: XMR
enabled: false
Miner2: # This miner is second in line
currency: XMR
condition: when-idle
idle-time: 5m
Miner3: # This miner is third in line
currency: XMR
In this example, CPU miner stack contains three candidates - Miner1, Miner2, and Miner3. Miner1 is
disabled, and will never be picked to work. Miner2 is enabled, but has a condition that the user needs to be idle
for at least 5 minutes. If this condition is fulfilled, then Miner2 is picked and starts working. Otherwise, or when
the user stops being idle, Miner3 will be picked as the only available option.
If no miners are ready, nothing will be turned on, and the system tray menu will show a status of “No active miners”.
The same rules apply to the GPU stack, described in the gpu-miners entry. If your CPU or GPU stack does not have
any miners, you can simply delete the entry completely from your config file.
General Miner Properties¶
example-miner:
currency: XMR
enabled: false
address: "a0bcd1234efgh5678"
extra-backend-args: ["--argname", "-a", "12"]
A single miner, regardless of type, has the following properties:
Field |
Type |
Description |
|---|---|---|
|
string |
Currency that is being mined. Supported currencies include XMR for CPU, ETH for GPU. |
|
string (optional) |
Address for mining. If not specified, Leprechaun will look in the global |
|
bool (optional) |
Whether this miner is enabled. If omitted, equals to |
|
string or list of strings (optional) |
Extra CLI arguments to pass to the backend that is being used to mine. Useful if you know what backend this currency uses, and want to configure it beyond what Leprechaun offers. |
Specific Miner Properties¶
Miner types are identified by their currency. This section enumerates all custom properties that different miners add in addition to the general properties.
XMR¶
weak-miner:
currency: XMR
process-priority: 1
process-threads: max / 2
Field |
Type |
Description |
|---|---|---|
|
number or calculation (optional) |
Specifies process priority, which directly affects the performance of the miner. Process priority can vary from 0 (lowest), to 2 (default), to 5 (realtime). Recommended values are from 0 to 3. |
|
number or calculation (optional) |
Specifies the amount of CPU threads that this process will use. This option is more or less directly proportional
to the speed at which the miner will run. Use |
ETH¶
eth-miner:
currency: ETH
backend: ethminer
Field |
Type |
Description |
|---|---|---|
|
string (optional) |
Specifies the backend used for mining. Must be either “t-rex” (default) or “ethminer”. T-Rex is a closed source miner with active support and slightly higher hashrate, but it has a 1% developer fee (not collected by us). Ethminer is an open-source miner with a 0% fee, but it is not developed and may break in the future. |
Conditions¶
Additionally, every miner can have a condition that controls its behavior. To do this, add a condition field with
one of the following conditions:
When-Idle¶
example-miner:
currency: XMR
condition: when-idle
idle-time: 5m + 30s
The when-idle conditions is satisfied when the user is idle for the amount of time, specified in the idle-time
field. This time is expressed as milliseconds, seconds, minutes, hours or days. For example:
500ms- 500 milliseconds;30s- 30 seconds;10m- 10 minutes;12h- 12 hours;0.5d- half a day;2m + 30s- 2 minutes and 30 seconds.
Note
Not all systems can count idle time with less than 1 second precision.
On-Schedule¶
example-miner:
currency: XMR
condition: on-schedule
days: [mon, tue, wed, thu, fri]
from-time: "18:00"
until-time: "06:00"
Enables the miner based on the day of the week and/or time of day. This conditions requires one or more of these fields:
Field |
Type |
Description |
|---|---|---|
|
list of strings (optional) |
Specifies on which days the rule applies. On excluded days the condition is not satisfied. By default all days are allowed. |
|
string (optional) |
Time, from which the miner is allowed to run, in 24H format. Default is “00:00”. |
|
string (optional) |
Time, until which the miner is allowed to run, in 24H format. Default is “00:00”. If both |
Conditions-And¶
example-miner:
currency: XMR
conditions-and:
- condition: when-idle
idle-time: 5m
- condition: on-schedule
days: [sat, sun]
Allows you to combine several conditions at once. This meta-condition is satisfied only when all nested conditions are
satisfied. In the example above, example-miner will only run on weekends AND if the user is AFK for at least 5
minutes.
Tip
conditions-and can be shortened to just conditions.
Conditions-Or¶
example-miner:
currency: XMR
conditions-or:
- condition: on-schedule
days: [mon, tue, wed, thu, fri]
from-time: "22:00"
until-time: "06:00"
- condition: on-schedule
days: [sat, sun]
Allows you to combine several conditions at once with the “or” logic. This meta-condition is satisfied when at least
one of the nested conditions is satisfied. In the example above, example-miner will run on weekdays from 22:00 until
06:00, but will run 24 hours on weekends.
Tip
conditions-and and conditions-or can be combined infinitely with each other and themselves.
Config File Example¶
# Leprechaun config file example
# More info at https://andreasxp.github.io/leprechaun/configuration.html
theme: light # Try also with "dark"
# Paste your addresses here
addresses:
XMR: "<your address here>"
ETH: "<your address here>"
# Configure your CPU miners here
# You can specify as many miners as you want, but only one miner works at a
# time. Leprechaun selects the first miner from the top, which is enabled and
# whose condition is satisfied.
cpu-miners:
strong-xmr-miner:
# This is an example of an XMR miner, which runs with normal priority,
# an all threads, but only when the user has been idle for at least 5
# minutes.
currency: XMR
enabled: true
process-priority: 2 # CPU process priority, from 0 (lowest) to 5 (highest)
process-threads: max # Use all threads
# Condition for working:
condition: when-idle
idle-time: 5m
weak-xmr-miner:
# This miner has no conditions, so it is always ready to work
currency: XMR
enabled: true
process-priority: 1
process-threads: max / 4 # use a quarter of available threads
# Configure your GPU miners here
gpu-miners:
eth-miner:
currency: ETH
enabled: true
backend: ethminer # Optional, one of 't-rex' or 'ethminer'
# This is an example of a complex condition. This miner will work on
# weekdays from 22:00 to 06:00, and on weekends all-day.
conditions-or:
- condition: on-schedule
days: [mon, tue, wed, thu, fri]
from-time: "22:00"
until-time: "06:00"
- condition: on-schedule
days: [sat, sun]