2018-04-26 12:18:36 +02:00
'\" t
. \" Title: lightning-connect
. \" Author: [see the "AUTHOR" section]
. \" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
2019-03-12 01:40:59 +01:00
. \" Date: 03/12/2019
2018-04-26 12:18:36 +02:00
. \" Manual: \ \&
. \" Source: \ \&
. \" Language: English
. \"
2019-03-12 01:40:59 +01:00
.TH "LIGHTNING\-CONNECT" "7" "03/12/2019" "\ \&" "\ \&"
2018-04-26 12:18:36 +02:00
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
lightning-connect \- Command for connecting to another lightning node\& .
.SH "SYNOPSIS"
.sp
2019-02-08 17:53:45 +01:00
\fB connect\fR \fI id\fR [\fI host\fR \fI port\fR ]
2018-04-26 12:18:36 +02:00
.SH "DESCRIPTION"
.sp
The \fB connect\fR RPC command establishes a new connection with another node in the Lightning Network\& .
.sp
2019-02-08 17:53:45 +01:00
\fI id\fR represents the target node\(cq s public key\& . As a convenience, \fI id\fR may be of the form \fI id@host\fR or \fI id@host:port\fR \& . In this case, the \fI host\fR and \fI port\fR parameters must be omitted\& .
2018-04-26 12:18:36 +02:00
.sp
2019-02-08 17:53:45 +01:00
\fI host\fR is the peer\(cq s hostname or IP address\& .
2018-04-26 12:18:36 +02:00
.sp
2019-02-08 17:53:45 +01:00
If not specified, the \fI port\fR defaults to 9375\& .
2018-04-26 12:18:36 +02:00
.sp
2019-02-08 17:53:45 +01:00
If \fI host\fR is not specified, the connection will be attempted to an IP belonging to \fI id\fR obtained through gossip with other already connected peers\& .
.sp
2019-03-12 01:40:59 +01:00
If \fI host\fR begins with a \fI /\fR it is interpreted as a local path, and the connection will be made to that local socket (see \fB bind\- addr\fR in lightningd\- config(5))\& .
.sp
2019-02-08 17:53:45 +01:00
Connecting to a node is just the first step in opening a channel with another node\& . Once the peer is connected a channel can be opened with lightning\- fundchannel(7)\& .
2018-04-26 12:18:36 +02:00
.SH "RETURN VALUE"
.sp
2019-02-08 17:53:45 +01:00
On success the peer \fI id\fR is returned\& .
.sp
The following error codes may occur:
2018-04-26 12:18:36 +02:00
.sp
2019-02-08 17:53:45 +01:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\- 1\& . Catchall nonspecific error\& . This may occur if the host is not valid or there are problems communicating with the peer\& .
\fB connect\fR
will make up to 10 attempts to connect to the peer before giving up\& .
.RE
2018-04-26 12:18:36 +02:00
.SH "AUTHOR"
.sp
2019-02-08 17:53:45 +01:00
Rusty Russell <rusty@rustcorp\& .com\& .au> is mainly responsible\& . Felix <fixone@gmail\& .com> is the original author of this manpage\& .
2018-04-26 12:18:36 +02:00
.SH "SEE ALSO"
.sp
lightning\- fundchannel(7), lightning\- listpeers(7), lightning\- listchannels(7), lightning\- disconnect(7)
.SH "RESOURCES"
.sp
Main web site: https://github\& .com/ElementsProject/lightning