micahstubbs / lightpay

Atomic swaps for the Lightning Payment Network
https://lightpay.it/
MIT License
17 stars 2 forks source link

deploy lightning on dev server #2

Closed micahstubbs closed 6 years ago

micahstubbs commented 6 years ago
## Install Go

- $ sudo apt-get update
- $ sudo apt-get -y upgrade
- $ wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
- $ sudo tar -xvf go1.10.linux-amd64.tar.gz
- $ sudo mv go /usr/local

## Setup Go ENV

- $ mkdir ~/go

## Edit ~/.profile

vim ~/.profile

### paste this in:
 GOPATH=$HOME/go
 # set PATH so it includes user's private bin directories
 PATH="$HOME/bin:$GOPATH/bin:$HOME/.local/bin:/usr/local/go/bin:$PATH"
###

$ . ~/.profile // load env vars

## Install LND

$ git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
# switch to bash if you are using another shell
$ bash
$ make
$ make install

## Setup LND directory and conf

$ mkdir ~/.lnd

# Edit ~/.lnd/lnd.conf

vim ~/.lnd/lnd.conf

### change the IP to your server's external IP
### then
### paste this in:
[Application Options]
externalip=144.202.102.131
maxpendingchannels=10

[autopilot]
autopilot.active=1
autopilot.maxchannels=10
autopilot.allocation=0.8

[Bitcoin]
bitcoin.active=1
bitcoin.node=neutrino
bitcoin.testnet=1

[neutrino]
neutrino.addpeer=127.0.0.1
#neutrino.addpeer=btcd0.lightning.computer:18333
###

## Run LND

# switch to bash if you are using another shell
$ bash
$ nohup /root/go/bin/lnd > /root/.lnd/lnd.log 2>&1 &
$ lncli create
micahstubbs commented 6 years ago

LND deployment plan from alex ^^

micahstubbs commented 6 years ago

ok, hit my first error message

➜  make git:(master) make install
make: *** No rule to make target 'install'.  Stop.
micahstubbs commented 6 years ago

solution: switch back to bash from zsh

micahstubbs commented 6 years ago

ok, next error message

root@vultr:~# nohup /home/ubuntu/go/bin/lnd > /home/ubuntu/.lnd/log/lnd.log 2>&1 &
[1] 13261
root@vultr:~# bash: /home/ubuntu/.lnd/log/lnd.log: No such file or directory
micahstubbs commented 6 years ago

and one more error message

➜  lnd git:(master) lncli create
[lncli] open /root/.lnd/tls.cert: no such file or directory
micahstubbs commented 6 years ago

ok, it succeeded 🎉