Browse Source

Updated documentation

feature/dockerfile-arm
Gonzalo Javier Aune 5 years ago
parent
commit
4e7e5d4103
  1. 3
      docker-compose.arm.yml
  2. 117
      install_guide_raspberrypi.md

3
docker-compose.arm.yml

@ -4,6 +4,7 @@ volumes:
services:
relay:
restart: always
build:
context: .
dockerfile: Dockerfile.arm
@ -14,6 +15,6 @@ services:
- "80:80"
environment:
- PORT=80
- NODE_DOMAIN=78.152.250.3:8888
- NODE_DOMAIN=IP-OR-DNS:8888
- NODE_LND_PORT=9735
- NODE_ENV=production

117
install_guide_raspberrypi.md

@ -1,3 +1,15 @@
### Assumptions
We will be using port 8888 and 9735 as external ports.
### Enable Port Forwarding on your home router
We need to forward both (8888 & 9735) ports to our Raspberry Pi.
Typically this will be under Advanced and then Port Forwarding or Virtual Server.
On the Port Forwarding page enter in a name for the forwarding like, "Relay" and another for "LND". Then enter the port you are forwarding in the port field. Select "TCP/UDP" or "Both" under Protocol if you are unsure which protocol you are using. Next, enter the internal IP address of the device you are port forwarding to and click "Apply" or "Save" to store the changes.
### Install ufw Firewall to open ports
```
sudo apt install ufw
@ -24,9 +36,30 @@ sudo sh get-docker.sh
sudo usermod -aG docker $(whoami)
```
Next logout and login again
Next, logout and login again
### Install docker-compose
```
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
sudo pip3 install docker-compose
```
### Build docker image and run
### Build docker image and run (with docker-compose)
```
cd sphinx-relay
docker-compose -f docker-compose.arm.yml build
```
Edit docker-compose.arm.yml file with your IP under the NODE_DOMAIN environment variable
```
docker-compose -f docker-compose.arm.yml up -d
```
### Optional: Build docker image and run manually
```
cd sphinx-relay
@ -41,34 +74,86 @@ docker run -p 80:80 -p 9735:9735 \
relay:0.1
```
### Optional: Install docker-compose
## Commands
### Login to container
```
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
sudo pip3 install docker-compose
docker-compose exec relay sh
```
or
```
docker exec -it relay /bin/sh
```
### Optional: Build docker image and run (with docker-compose)
### Check QR Code (inside container):
```
head -n 500 /var/log/supervisor/relay.log
```
cd sphinx-relay
docker-compose -f docker-compose.arm.yml build
### Unlock wallet (inside container):
```
head -n 1 /relay/.lnd/.lndpwd | lncli --lnddir=/relay/.lnd/ unlock --stdin
```
Edit docker-compose.arm.yml file with the exposed ports and NODE_DOMAIN (IP + PORT)
## Using noip
Prerequisite: Have an account in https://www.noip.com/
```
docker-compose -f docker-compose.arm.yml up -d
cd /usr/local/src
sudo wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz
sudo tar xzf noip-duc-linux.tar.gz
```
Check QR Code:
At this point you need to ls to check what version is the one you downloaded. At the time of writing the latest version is noip-2.1.9-1
```
docker-compose exec relay head -n 500 /var/log/supervisor/relay.log
cd noip-2.1.9-1
sudo make
sudo make install
```
# Unlock wallet (inside container)
Follow the questions and after:
```
head -n 1 /relay/.lnd/.lndpwd | lncli --lnddir=/relay/.lnd/ unlock --stdin
sudo vi /etc/systemd/system/noip2.service
```
Insert the following:
```
[Unit]
Description=No-ip.com dynamic IP address updater
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
Alias=noip.service
[Service]
# Start main service
ExecStart=/usr/local/bin/noip2
Restart=always
Type=forking
```
Then enable the service and start it
```
sudo systemctl enable noip2
sudo systemctl start noip2
```
Credits: https://ivancarosati.com/no-ip-with-raspberry-pi/
## Using Tor

Loading…
Cancel
Save