Browse Source

Merge pull request #29 from CodingMuziekwijk/patch-3

run relay continuously.
feature/dockerfile-arm
Evan Feenstra 5 years ago
committed by GitHub
parent
commit
6d4ee24ffd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 62
      install_guide_myNode_and_Raspiblitz.md

62
install_guide_myNode_and_Raspiblitz.md

@ -59,7 +59,7 @@ $ nano app.json
```
Change the following 4 lines:
# myNode
## myNode
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/mynode/lnd/tls.cert",
@ -67,7 +67,7 @@ Change the following 4 lines:
"lncli_location": "/home/bitcoin/go/bin",
```
# Raspiblitz
## Raspiblitz
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/lnd/tls.cert",
@ -113,19 +113,19 @@ $ export USE_PASSWORD=true
We need LND to run with keysend activated. First we check if it is already activated on your node.
# myNode
## myNode:
Go to http://mynode.local/lnd/config and check if the line `accept-keysend=1` is included somewhere in the text.
If `accept-keysend=1` is already included you can continue without changing anything. If `accept-keysend=1` is not included, add it to a new line and click the `Save` button. This will restart your device. (Restarting could take up to several minutes but also hours, so be patient.)
# Raspiblitz
## Raspiblitz:
Go to raspiblitz menu, or:
```sh
$ raspiblitz
```
Find item menu "Services" and active Keysend
Find item menu "Services" and activate Keysend
### Run
Now it's time to run the software.
@ -136,3 +136,55 @@ $ cd sphinx-relay/config/
$ npm run prod
```
When Relay starts up, it will print a QR in the terminal. You can scan this in your app (Android or iOS) to connect!
### To make relay run continuously (also after a restart).
Before you start this part. Make sure your app is connected and you are able to send & receive messages.
Login as admin.
```sh
$ sudo su admin
```
Create a file named sphinx-relay.service
```sh
$ sudo nano /etc/systemd/system/sphinx/sphinx-relay.service
```
Copy and paste the following text to add it to the file:
```sh
[Unit]
Description=Sphinx Relay Service
After=network.target
[Service]
Type=simple
User=bitcoin
WorkingDirectory=/home/bitcoin/sphinx-relay/config/
ExecStart=npm run prod
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sphinx-relay
[Install]
WantedBy=multi-user.target
```
Save and exit:
`Ctrl + X`
`Y`
`Enter`
Let's run!
```sh
$ sudo systemctl enable sphinx-relay.service
$ sudo systemctl start sphinx-relay.service
```
Check if relay succesfully started.
```sh
$ sudo systemctl status sphinx-relay.service
```
### To stop the program
```sh
$ sudo systemctl stop sphinx-relay.service
```

Loading…
Cancel
Save