= Configuration
Mona Bärenfänger <mona@lightcurve.io>
:description: How to configure Lisk Core using custom config files.
// Settings
:toc:
:source-highlighter: coderay
:docs_general: ROOT::
:v_sdk: master

// External URLs
// Project URLs
:url_config: reference/cli.adoc
:url_config_clo: reference/cli.adoc#clo
:url_config_start: reference/core-cli.adoc#start
:url_config_structure: reference/cli.adoc#structure
:url_docker: management/docker.adoc
:url_enable_pom: management/enabling-misbehavior-report.adoc
:url_management_forging: management/forging.adoc
:url_pm2_restart: management/pm2.adoc#refreshing-restarting-lisk-core
:url_config_options: https://lisk.com/documentation/lisk-sdk/v6/references/typedoc/modules/_liskhq_lisk_framework_report_misbehavior_plugin.html#$config-options


:url_enable_misbehavior: {docs_general}run-blockchain/enabling-misbehavior-report.adoc
:url_dashboard: {docs_general}build-blockchain/using-dashboard.adoc


// :url_source: management/source.adoc
:url_sdk_plugins: lisk-sdk::plugins/index.adoc
//TODO: Update the commented out hyperlinks once the pages are available.
// NOTE: A complete command reference with all available options for starting Lisk Core can be found in the xref:{url_config_start}[Lisk Core CLI].

NOTE: A complete command reference with all available options for starting Lisk Core can be found in Lisk Core CLI's reference page.

== Using a network-specific default configuration

To quickly connect your Lisk Core node to a specific network, specify the desired network with the `--network` or `-n` flag.

This will use the default config file for the specific network when starting Lisk Core.
The default configurations are located in the `config` folder of Lisk Core.

[source,bash]
----
lisk-core start --network=NETWORK
----

`NETWORK` may be `mainnet`, `testnet`, or `devnet`.

== Using a custom config file

Lisk Core uses the default config for connecting to the mainnet by default.

However, it is possible to use Lisk Core with a custom config, by specifying the path to the config file with the `--config` or `-c` flag.

The custom config file needs to follow the JSON config structure of Lisk Core.
A straightforward method is to copy one of the network-specific default configs of Lisk Core and adjust it to suit your requirements.

./home/lisk/
[source,bash]
----
cp .lisk/lisk-core/config/testnet/config.json custom-config.json
vim custom-config.json
----

NOTE: If you intend to connect the node to the mainnet, change the `testnet` to the `mainnet` in the snippet above.

[source,bash]
----
lisk-core start --config=/home/lisk/custom-config.json --overwrite-config
----

//NOTE: Remember to xref:{url_pm2_restart}[restart] the node for the new config changes to take effect.
NOTE: Remember to restart the node for the new config changes to take effect.

== Enabling plugins

Plugins are not enabled by default.
Dedicated flags can be used to enable them on the application start.

However, to enable the following plugins it is recommended to view the following detailed guides here, on how to register and enable the xref:{url_enable_misbehavior}[Misbehavior plugin], and also the xref:{url_dashboard}[Dashboard plugin].
