→ see [`reference.conf`](https://github.com/ACINQ/eclair/blob/master/eclair-core/src/main/resources/reference.conf) for full reference. There are many more options!
## Customize features
Eclair ships with a set of features that are activated by default, and some experimental or optional features that can be activated by users.
The list of supported features can be found in the [reference configuration](https://github.com/ACINQ/eclair/blob/master/eclair-core/src/main/resources/reference.conf).
To enable a non-default feature, you simply need to add the following to your `eclair.conf`:
```conf
eclair.features {
official_feature_name = optional|mandatory
}
```
For example, to activate `option_static_remotekey`:
```conf
eclair.features {
option_static_remotekey = optional
}
```
Note that you can also disable some default features:
It's usually risky to activate non-default features or disable default features: make sure you fully understand a feature (and the current implementation status, detailed in the release notes) before doing so.
Eclair supports per-peer features. Suppose you are connected to Alice and Bob, you can use a different set of features with Alice than the one you use with Bob.
When experimenting with non-default features, we recommend using this to scope the peers you want to experiment with.
This is done with the `override-features` configuration parameter in your `eclair.conf`:
In order to secure your channels' funds against attacks, your eclair node keeps an up-to-date estimate of on-chain feerates (based on your Bitcoin node's estimations).
When that estimate deviates from what your peers estimate, eclair may automatically close channels that are at risk to guarantee the safety of your funds.
Since predicting the future is hard and imperfect, eclair has a tolerance for deviations, governed by the following parameters:
```conf
on-chain-fees {
feerate-tolerance {
ratio-low = 0.5 // will allow remote fee rates as low as half our local feerate
ratio-high = 10.0 // will allow remote fee rates as high as 10 times our local feerate
}
}
```
We do not recommend changing these values unless you really know what you're doing.
However, if you have a trust relationship with some specific peers, and you know they will never try to cheat you, you can increase the tolerance specifically for those peers.
On the other hand, if you have channels with peers you suspect may try to attack you, you can decrease the tolerance specifically for those peers.
```conf
on-chain-fees {
override-feerate-tolerance = [
{
nodeid = "<nodeIdofatrustedpeer>"
feerate-tolerance {
ratio-low = 0.1 // will allow remote fee rates as low as 10% our local feerate
ratio-high = 15.0 // will allow remote fee rates as high as 15 times our local feerate
}
},
{
nodeid = "<nodeIdofapeerwedon'ttrustatall>"
feerate-tolerance {
// will only allow remote fees between 75% and 200% of our local feerate
ratio-low = 0.75
ratio-high = 2.0
}
}
]
}
```
## Examples
### Basic configuration
This is a common configuration file which overrides the default server port, node's label and node's color and enables the API (needed to interact with your node with `eclair-cli`):
```conf
# server port
eclair.server.port=9737
# node's label
eclair.node-alias="my node"
# rgb node's color
eclair.node-color=49daaa
eclair.api.enabled=true
# You should set a real password here.
eclair.api.password=foobar
# Make sure this port isn't accessible from the internet!
eclair.api.port=8080
```
### Regtest mode
To run with Bitcoin's `regtest` mode, you need to set the `chain` reference:
```conf
eclair.chain = "regtest"
```
You usually also need to disable the feerate mismatch
If you run Eclair and Bitcoin on the same computer an alternative way to handle the Bitcoin Core RPC authentication
is to use the safecookie. To use safecookie authentication, you need to remove `rpcpassword=***` and `rpcuser=***` from your `bitcoin.conf` and add the following to `eclair.conf`:
```conf
eclair.bitcoind.auth = "safecookie"
eclair.bitcoind.cookie = "PATH TO THE COOKIE FILE"
```
Setting `eclair.bitcoind.cookie` might not be necessary if Bitcoin is running on mainnet and using the default datadir.
Eclair will need read access to Bitcoin Core's cookie file.
You can either run Eclair and Bitcoin Core with the same user, or grant read permissions to the Eclair user.
locked-funds-risk = 1e-8 // msat per msat locked per block. It should be your expected interest rate per block multiplied by the probability that something goes wrong and your funds stay locked.
// 1e-8 corresponds to an interest rate of ~5% per year (1e-6 per block) and a probability of 1% that the channel will fail and our funds will be locked.
// Virtual fee for failed payments
// Corresponds to how much you are willing to pay to get one less failed payment attempt