core-lightning/doc/beginners-guide/beginners-guide.md
Rusty Russell 3d3bf87b34 build: remove all trace of DEVELOPER.
If you previously configured with `--enable-developer` we turn that into `--enable-debugbuild`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: build: `--enable-developer` arg to configure (and DEVELOPER variables): use `./configure --enable-debugbuild` and `developer` setting at runtime.
2023-09-21 20:08:24 +09:30

3.1 KiB

title slug excerpt hidden createdAt updatedAt
Running your node beginners-guide A guide to all the basics you need to get up and running immediately. false 2022-11-18T14:27:50.098Z 2023-02-21T13:49:20.132Z

Starting lightningd

Regtest (local, fast-start) option

If you want to experiment with lightningd, there's a script to set up a bitcoind regtest test network of two local lightning nodes, which provides a convenient start_ln helper. See the notes at the top of the startup_regtest.sh file for details on how to use it.

. contrib/startup_regtest.sh

Mainnet Option

To test with real bitcoin, you will need to have a local bitcoind node running:

bitcoind -daemon

Wait until bitcoind has synchronized with the network.

Make sure that you do not have walletbroadcast=0 in your ~/.bitcoin/bitcoin.conf, or you may run into trouble.
Notice that running lightningd against a pruned node may cause some issues if not managed carefully, see pruning for more information.

You can start lightningd with the following command:

lightningd --network=bitcoin --log-level=debug

This creates a .lightning/ subdirectory in your home directory: see man -l doc/lightningd.8 (or ???) for more runtime options.

Using The JSON-RPC Interface

Core Lightning exposes a JSON-RPC 2.0 interface over a Unix Domain socket; the lightning-cli tool can be used to access it, or there is a python client library.

You can use [lightning-cli](ref:lightning-cli) help to print a table of RPC methods; [lightning-cli](lightning-cli) help <command> will offer specific information on that command.

Useful commands:

Care And Feeding Of Your New Lightning Node

Once you've started for the first time, there's a script called contrib/bootstrap-node.sh which will connect you to other nodes on the lightning network.

There are also numerous plugins available for Core Lightning which add capabilities: see the Plugins guide, and check out the plugin collection at: https://github.com/lightningd/plugins, including helpme which guides you through setting up your first channels and customising your node.

For a less reckless experience, you can encrypt the HD wallet seed: see HD wallet encryption.