Browse Source

Merge pull request #66 from dimaatmelodromru/docs-edit

Docs edit
push-params
Evan Feenstra 4 years ago
committed by GitHub
parent
commit
60a475a74b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 164
      README.md
  2. 80
      docs/docker_deployment.md
  3. 298
      docs/myNode_deployment.md
  4. 110
      docs/raspiblitz_deployment.md

164
README.md

@ -1,6 +1,6 @@
# Relay
**Relay** is a Node.js wrapper around [LND](https://github.com/lightningnetwork/lnd), handling connectivity and storage for [**Sphinx**](https://sphinx.chat). Communication between Relay nodes takes place entirely on the Lightning Network, so is decentralized, untraceable, and encrypted. Message content is also end-to-end encrypted using client public keys, on the **Sphinx** app itself.
**Relay** is a Node.js wrapper around [LND](https://github.com/lightningnetwork/lnd), handling connectivity and storage for [**Sphinx**](https://sphinx.chat). Communication between Relay nodes takes place entirely on the Lightning Network, so it is decentralized, untraceable, and encrypted. Message content is also end-to-end encrypted using client public keys, on the ** Sphinx** app itself.
![Relay](https://github.com/stakwork/sphinx-relay/raw/master/public/relay.jpg)
@ -9,107 +9,153 @@ Relay stores:
- Messages
- Recurring payment configurations
- Invites (so you can add your friends)
- Media Keys: keys for decrypting media files, asymetrically encrypted for each contact in a chat
- Media Keys: keys for decrypting media files, asymmetrically encrypted for each contact in a chat
# run your own sphinx node
# Run your own Sphinx node
## Using Docker on Raspberry Pi
## Preparations
Install docker-compose: https://medium.com/@techiebouncer/install-docker-and-docker-compose-on-raspberry-pi-4-raspbian-buster-c5b78b9a0d08
* Be able to connect with your node through SSH.
* Make sure you are running LND version `0.10.0` or higher. This can be seen at http://mynode.local/lnd at the right top. Or by inserting the following console command:
Clone this repo.
```
git clone https://github.com/stakwork/sphinx-relay.git
```sh
$ lncli getinfo
> "version": "0.10.0-beta commit=v0.10.0-beta"
```
Copy your id_rsa to clone the private lnd-lean repo.
### If you are already operating your LND
```
cp ~/.ssh/id_rsa .
```
If you have some open/funded channels of 100 000 sat+ capacity, you don't need to do anything else regarding Sphinx-Relay operation; if you don't have enough capacity in your channel(s) - add funds or rebalance your channel(s).
Build it.
### If you just installed your LND
```
docker-compose build
```
If you do not have any open/funded channels, you might want to open a channel to the Sphinx.chat LND. With a direct channel set up to sphinx.chat, sending messages to sphinx.chat-hosted recipients is slightly cheaper. Please, make your own judgment regarding your privacy/cost efficiency balance.
Edit your docker-compose.yml file replacing NODE_IP and NODE_ALIAS.
- Fund your LND wallet
Relay will run on port 3000 local. You would need to point your router's port forwarding from 80 to 3000 to your docker machine.
```bash
$ lncli newaddress p2wkh
{
"address": "<bech32 bitcoin address>"
}
```
Start up LND separately first.
Send 100000 sats to the provided bitcoin address.
Check your LND wallet balance with
```bash
$ lncli walletbalance
{
"total_balance": "100000",
"confirmed_balance": "0",
"unconfirmed_balance": "100000"
}
```
docker-compose up lnd
until it shows:
```bash
{
"total_balance": "100000",
"confirmed_balance": "100000",
"unconfirmed_balance": "0"
}
```
- Open a channel to sphinx.chat:
- In another terminal, go to the project folder and run.
```bash
$ lncli connect 023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f@54.159.193.149:9735
{
}
$ lncli openchannel 023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f --local_amt=90000 --push_amt=5000 --sat_per_byte=35
{
"funding_txid": "76bc738472545c343ab4eecc733bd26f1493fb512d1921f3f7d863d0f0f0fbca"
}
```
docker-compose exec lnd bash
> **_NB_** Set the right amount of bitcoin transaction fee in `sat_per_byte`
> We recommend using [mempool.space](https://mempool.space) to determine the necessary fee.
You can monitor the progress of the channel creation operation with `lncli pendingchannels`/`lncli listchannels` commands; the former will show your channel while the operation is still in progress, the latter will show your channel once it's successfully completed.
Check the payment delivery by making a small payment to the Sphinx.chat LND:
```bash
$ lncli sendpayment --dest=023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f --final_cltv_delta=10 --amt=5 --keysend
+------------+--------------+--------------+--------------+-----+----------+----------+-------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE |
+------------+--------------+--------------+--------------+-----+----------+--------------------+---------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE |
+------------+--------------+--------------+--------------+-----+----------+----+------------+--------------+--------------+--------------+-----+----------+--------------------+---------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE |
+------------+--------------+--------------+--------------+-----+----------+--------------------+---------+
| SUCCEEDED | 1.544 | 5.188 | 5 | 0 | 642053 | 705537919981322241 | gameb_1 |
+------------+--------------+--------------+--------------+-----+----------+--------------------+---------+
Amount + fee: 5 + 0 sat
Payment hash: <......>
Payment status: SUCCEEDED, preimage: <.....>
```
Once you're given a bash, run `ping lnd` and take note of the IP, this is because we need to tell Relay where lnd is via the IP, this is a temporary measure due to the limitation of the grpc connection can only be done via IP and not domain name.
## Network connectivity
Edit your app.json file inside config and on the `production` key replace `node_ip` with the one from the ping.
If you have a permanent public IP on your internet connection and you want your mobile or desktop Sphinx client to connect to it over internet, open port `3001/TCP` on your router and create a port forwarding rule for TCP to port 3001 of your machine running Sphinx-Relay. How to do this is not included in this guide. https://www.yougetsignal.com/tools/open-ports/ is one of the many websites that can be used to check if a port is opened on your network.
Run Relay.
If you plan to use your Sphinx clients within the local network, then you do not have to do anything special.
```
docker-compose up node_server
```
Create / Unlock your wallet
```
docker-compose exec lnd lncli create
Since none of Sphinx clients support connecting to Sphinx-Relay over Tor as of this moment, you could set up a [Tor2IP tunnel](https://github.com/openoms/bitcoin-tutorials/blob/eaac48a5decb6aef8540de249816d255b310dc3a/tor2ip_tunnel.md) as well (for extra privacy/security or because of unavailability of a permanent public IP address on your local internet connection).
docker-compose exec lnd lncli unlock
```
## Deployment
NOTE: All lncli commands need to be prepended with `docker-compose exec lnd`, this tells docker to execute **something** on the lnd container.
* [Docker deployment](docs/docker_deployment.md)
* [Raspberry Pi/myNode deployment](docs/myNode_deployment.md)
* [Raspberry Pi/Raspiblitz deployment](docs/raspiblitz_deployment.md)
## Without Docker
## Connecting a mobile client
You can run your own Sphinx node in order to have full ownership over your communication!
Scan the generated QR code with your iOS or Android Sphinx client.
### guide
> You should see `[socket.io] connected!` in your Relay console output.
mynode users: here is a complete guide provided by someone who is running Relay at home: [MyNode Guide](https://github.com/stakwork/sphinx-relay/blob/master/install_guide_myNode_and_Raspiblitz.md)
Add some friends' addresses and start chatting!
### download
## Connecting a Desktop client
`git clone https://github.com/stakwork/sphinx-relay`
As of this writing, neither of the Desktop Sphinx clients can scan Relay QR codes, nor directly import the connection string (printed by Relay just above the QR code).
`cd sphinx-relay`
To connect your Desktop Sphinx to your Relay:
- connect a mobile Sphinx client;
- open Profile in your mobile client;
- Export Private Key (key is stored in your device clipboard);
- send the private key to your Desktop and paste it to the connection input field.
`npm install`
> You should see `[socket.io] connected!` in your Relay console output.
### dependencies
## Troubleshooting
sqlite3: `apt-get install sqlite3`
### Mobile Sphinx does not scan the generated QR code
### configure
- restart the Relay machine;
- connect as `admin`;
- switch to user `bitcoin` with `sudo su bitcoin`;
- make sure `NODE_IP` environment variable contains correct `<IP>:<port>` values, `export` again if necessary;
- `cd ~/sphinx-relay; npm run prod`
Make sure your LND is running with the `--accept-keysend` flag! If you are using lnd.conf file, add `accept-keysend=1`
Then try again.
Edit the "production" section of config/app.json:
- Change `macaroon_location` to the location of your LND admin macaroon
- Change `tls_location` to the location of your LND cert
### Messages sent with your Relay are delivered empty or not delivered at all
Edit the "production" section of config/config.json
- Update "storage" to point to where you want your DB file to live
Make small manual lightning payments to the Sphinx.chat LND (or the node you are connected to)
```bash
$ lncli sendpayment --dest=023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f --final_cltv_delta=10 --amt=5 --keysend
```
Then make manual payments to your destination address.
To connect to your app
- `export NODE_IP=x.x.x.x` (you can use a domain name instead if you have that set up)
- For extra security, `export USE_PASSWORD=true`
Make sure all payments complete successfully.
### run
Try messaging again in both directions. Usually, as the first messages is successfully delivered, there are no futher issues.
`npm run prod`
## Known issues
When Relay starts up, it will print a QR in the terminal. You can scan this in your app (Android & iOS) to connect!
There are several known issues at the time of the writing of this document.
You can [check their actual status on GitHub](https://github.com/stakwork/sphinx-relay/issues)
# Roadmap

80
docs/docker_deployment.md

@ -0,0 +1,80 @@
## Using Docker on Raspberry Pi
Install docker-compose: https://medium.com/@techiebouncer/install-docker-and-docker-compose-on-raspberry-pi-4-raspbian-buster-c5b78b9a0d08
Clone this repo.
```
git clone https://github.com/stakwork/sphinx-relay.git
```
Copy your id_rsa to clone the private lnd-lean repo.
```
cp ~/.ssh/id_rsa .
```
Build it.
```
docker-compose build
```
Edit your docker-compose.yml file replacing NODE_IP and NODE_ALIAS.
Relay will run on port 3000 local. You would need to point your router's port forwarding from 80 to 3000 to your docker machine.
Start up LND separately first.
```
docker-compose up lnd
```
- In another terminal, go to the project folder and run.
```
docker-compose exec lnd bash
```
Once you're given a bash, run `ping lnd` and take note of the IP, this is because we need to tell Relay where lnd is via the IP, this is a temporary measure due to the limitation of the grpc connection can only be done via IP and not domain name.
Edit your app.json file inside config and on the `production` key replace `node_ip` with the one from the ping.
Run Relay.
```
docker-compose up node_server
```
Create / Unlock your wallet
```
docker-compose exec lnd lncli create
docker-compose exec lnd lncli unlock
```
NOTE: All lncli commands need to be prepended with `docker-compose exec lnd`, this tells docker to execute **something** on the lnd container.
### Configure
Make sure your LND is running with the `--accept-keysend` flag! If you are using lnd.conf file, add `accept-keysend=1`, if necessary
Edit the "production" section of config/app.json:
- Change `macaroon_location` to the location of your LND admin macaroon
- Change `tls_location` to the location of your LND cert
Edit the "production" section of config/config.json
- Update "storage" to point to where you want your DB file to live
To connect to your app
- `export NODE_IP=x.x.x.x` (you can use a domain name instead if you have that set up)
- For extra security, `export USE_PASSWORD=true`
### run
`npm run prod`
When Relay starts up, it will print a QR in the terminal. You can scan this in your app (Android & iOS) to connect!
[Back to README](https://github.com/dimaatmelodromru/sphinx-relay/tree/docs-edit#connecting-a-mobile-client)

298
docs/myNode_deployment.md

@ -0,0 +1,298 @@
# Deployment to myNode
This guide is focused on installing Sphinx-relay on top of myNode. Information about myNode can be found at: https://mynodebtc.com/.
### Preparations
* Be able to connect with your node through SSH.
* Connect to myNode as `admin`:
```sh
$ ssh admin@mynode.local
```
Use password `bolt` unless you have already changed it.
### Install dependencies
sqlite3: `$ sudo apt install sqlite3`
python2 (if not present): `$ sudo apt install python2`
### Open port 3001 on myNode
Open up a console window with SSH. And login as root
```sh
$ sudo su
```
Open up port 3001 on your machine and make sure it has been added to the list.
```sh
# ufw allow 3001 comment 'allow Sphinx-Chat'
# ufw status
> Status: active
>
> To Action From
> -- ------ ----
> 3001 (v6) ALLOW Anywhere (v6) # Sphinx-Chat
```
### Download
login as user bitcoin.
```sh
$ sudo su bitcoin
$ cd
```
Clone the repository from Github and install the package.
```sh
$ git clone https://github.com/stakwork/sphinx-relay
$ cd sphinx-relay
$ npm install
```
### Configure
Edit the "production" section of config/app.json.
```sh
$ cd
$ cd sphinx-relay/config/
$ nano app.json
```
Change the following 4 lines:
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/mynode/lnd/tls.cert",
"lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log",
```
Save and exit:
`Ctrl + X`
`Y`
`Enter`
Edit the "production" section of config/config.json
```sh
$ nano config.json
```
Change the following line to:
```
"storage": "/home/bitcoin/sphinx.db"
```
Save and exit:
`Ctrl + X`
`Y`
`Enter`
#### If you want to use your Sphinx client within the same local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the local IP address of the machine running your Sphinx-Relay on your local network.
#### If you want to connect to your Sphinx-Relay from outside of your local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the permanent public IP address of your router.
Make sure that port 3001 forwarding is properly set up.
For extra security:
```sh
$ export USE_PASSWORD=true
```
### Activate keysend
We need LND to run with keysend activated. First, we check if it is already enabled on your node.
Go to http://mynode.local/lnd/config and check if the line `accept-keysend=True` (or `accept-keysend=1`) is included somewhere in the text.
If `accept-keysend=True` is already included you can continue without changing anything. If `accept-keysend=True` 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.)
### Run
Now it's time to run the software.
```sh
$ cd
$ 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 that 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-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
$ sudo systemctl start sphinx-relay
```
Check if Relay successfully started.
```sh
$ sudo systemctl status sphinx-relay
```
### To stop the program
```sh
$ sudo systemctl stop sphinx-relay
```
# To update Sphinx-Relay
> This probably is not the most efficient way to update. But it works, so we got that going, which is nice. Feel free to optimize the process and contribute. :)
Login as `admin` and stop the program.
```sh
$ sudo systemctl stop sphinx-relay
```
login as user `bitcoin`.
```sh
$ sudo su bitcoin
$ cd
```
## Remove the old version
```sh
$ rm -rf sphinx-relay
```
## Download the new version
Clone the repository from Github and install the package.
```sh
$ git clone https://github.com/stakwork/sphinx-relay
$ cd sphinx-relay
$ npm install
```
### Configure
Edit the "production" section of config/app.json.
```sh
$ cd
$ cd sphinx-relay/config/
$ nano app.json
```
Change the following 4 lines:
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/mynode/lnd/tls.cert",
"lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log",
"lncli_location": "/home/bitcoin/go/bin",
```
Save and exit:
`Ctrl + X`
`Y`
`Enter`
Edit the "production" section of config/config.json
```sh
$ nano config.json
```
Change the following line to:
```
"storage": "/home/bitcoin/sphinx.db"
```
Save and exit:
`Ctrl + X`
`Y`
`Enter`
#### If you want to use your Sphinx client within the same local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the local IP address of the machine running your Sphinx-Relay on your local network.
#### If you want to connect to your Sphinx-Relay from outside of your local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the permanent public IP address of your router.
> Make sure that port 3001 forwarding is properly set up.
For extra security:
```sh
$ export USE_PASSWORD=true
```
### Turn on the service.
Login as admin.
```sh
$ su admin
```
Or
```sh
$ exit
```
Turn the service on and check the status.
```sh
$ sudo systemctl enable sphinx-relay
$ sudo systemctl start sphinx-relay
```
### tail logs
`journalctl -u sphinx-relay -f`
[Back to README](https://github.com/dimaatmelodromru/sphinx-relay/tree/docs-edit#connecting-a-mobile-client)

110
install_guide_myNode_and_Raspiblitz.md → docs/raspiblitz_deployment.md

@ -1,21 +1,23 @@
# Guide: install Sphinx-relay on myNode / Raspiblitz.
# Deployment to Raspiblitz
This guide is focused on installing Sphinx-relay on top of myNode. Information about myNode can be found at: https://mynodebtc.com/.
This guide is focused on installing Sphinx-relay on top of ***raspiblitz***. Information about myNode can be found at: https://raspiblitz.com/.
### Preparations
* Be able to connect with your node through SSH.
* Make sure you are running LND version `0.10.0` or higher. This can be seen at http://mynode.local/lnd at the right top. Or by inserting the following console command:
* Connect to **raspiblitz** as `admin`:
```sh
$ lncli getinfo
> "version": "0.10.0-beta commit=v0.10.0-beta"
$ ssh admin@mynode.local
```
* Open port `3001/TCP` on your router. How to do this is not included in this guide. https://www.yougetsignal.com/tools/open-ports/ is one of the many websites that can be used to check if a port is opened on your network.
---
## Let's Start
Use password `raspiblitz` unless you have already changed it.
### Install dependencies
sqlite3: `$ sudo apt install sqlite3`
### Open port 3001 on myNode
python2 (if not present): `$ sudo apt install python2`
### Open port 3001 on Raspiblitz
Open up a console window with SSH. And log in as root
```sh
@ -23,8 +25,8 @@ $ sudo su
```
Open up port 3001 on your machine and make sure it has been added to the list.
```sh
$ ufw allow 3001 comment 'allow Sphinx-Chat'
$ ufw status
# ufw allow 3001 comment 'allow Sphinx-Chat'
# ufw status
> Status: active
>
@ -46,11 +48,6 @@ $ git clone https://github.com/stakwork/sphinx-relay
$ cd sphinx-relay
$ npm install
```
### Dependencies
sqlite3: `$ sudo apt-get install sqlite3`
python2: `$ sudo apt-get install python2`
### Configure
Edit the "production" section of config/app.json.
@ -61,14 +58,6 @@ $ nano app.json
```
Change the following 4 lines:
#### myNode
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/mynode/lnd/tls.cert",
"lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log",
```
#### Raspiblitz
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/lnd/tls.cert",
@ -86,7 +75,7 @@ Edit the "production" section of config/config.json
```sh
$ nano config.json
```
Change to following line to:
Change the following line to:
```
"storage": "/home/bitcoin/sphinx.db"
```
@ -97,37 +86,45 @@ Save and exit:
`Enter`
To connect to your app:
(replace x.x.x.x with your IP - NOTE: This is your external IP)
#### If you want to use your Sphinx client within the same local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the local IP address of the machine running your Sphinx-Relay on your local network.
#### If you want to connect to your Sphinx-Relay from outside of your local network
```sh
$ cd
$ cd sphinx-relay/config/
$ export NODE_IP=x.x.x.x:3001
```
where `x.x.x.x` is the permanent public IP address of your router.
> Make sure that port 3001 forwarding is properly set up.
For extra security:
```sh
$ export USE_PASSWORD=true
```
### Activate keysend
### Activate keysend
We need LND to run with keysend activated. First we check if it is already activated on your node.
#### myNode:
Go to http://mynode.local/lnd/config and check if the line `accept-keysend=1` (or `accept-keysend=True`) 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.)
We need LND to run with keysend activated. First, we check if it is already enabled on your node.
#### Raspiblitz:
Go to raspiblitz menu, or:
```sh
$ raspiblitz
```
Find item menu "Services" and activate Keysend
Find menu "Services" item and activate Keysend.
### Run
Now it's time to run the software.
```sh
@ -138,7 +135,7 @@ $ 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.
Before you start this part, make sure your app is connected and that you are able to send & receive messages.
Login as admin.
```sh
@ -146,7 +143,7 @@ $ sudo su admin
```
Create a file named sphinx-relay.service
```sh
$ sudo nano /etc/systemd/system/sphinx/sphinx-relay.service
$ sudo nano /etc/systemd/system/sphinx-relay.service
```
Copy and paste the following text to add it to the file:
```sh
@ -177,26 +174,27 @@ Save and exit:
Let's run!
```sh
$ sudo systemctl enable sphinx-relay.service
$ sudo systemctl start sphinx-relay.service
$ sudo systemctl enable sphinx-relay
$ sudo systemctl start sphinx-relay
```
Check if relay succesfully started.
Check if Relay successfully started.
```sh
$ sudo systemctl status sphinx-relay.service
$ sudo systemctl status sphinx-relay
```
### To stop the program
```sh
$ sudo systemctl stop sphinx-relay.service
$ sudo systemctl stop sphinx-relay
```
# To update Sphinx-Relay
(This probably is not the most efficient way to update. But it works so we got that goin which is nice. Feel free to optimize the process and contribute. :) )
Login as Admin and stop the program.
> This probably is not the most efficient way to update. But it works, so we got that going, which is nice. Feel free to optimize the process and contribute. :)
Login as `admin` and stop the program.
```sh
$ sudo systemctl stop sphinx-relay.service
```
login as user bitcoin.
login as user `bitcoin`.
```sh
$ sudo su bitcoin
$ cd
@ -221,15 +219,6 @@ $ nano app.json
```
Change the following 4 lines:
#### myNode
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/mynode/lnd/tls.cert",
"lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log",
"lncli_location": "/home/bitcoin/go/bin",
```
#### Raspiblitz
```
"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/mnt/hdd/lnd/tls.cert",
@ -281,10 +270,13 @@ $ exit
```
Turn the service on and check the status.
```sh
$ sudo systemctl enable sphinx-relay.service
$ sudo systemctl start sphinx-relay.service
$ sudo systemctl enable sphinx-relay
$ sudo systemctl start sphinx-relay
```
### tail logs
`journalctl -u sphinx-relay -f`
`journalctl -u sphinx-relay -f`
[Back to README](https://github.com/dimaatmelodromru/sphinx-relay/tree/docs-edit#connecting-a-mobile-client)
Loading…
Cancel
Save