diff --git a/README.md b/README.md index 80b5de8..11492c1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Relay stores: - Invites (so you can add your friends) - Media Keys: keys for decrypting media files, asymetrically encrypted for each contact in a chat -# Run your own sphinx node +# Run your own Sphinx node ## Preparations @@ -104,121 +104,53 @@ Since none of Sphinx clients support connecting to Sphinx-Relay over Tor as of t ## Deployment -[Docker deployment](docs/docker_deployment.md) -[Raspberry Pi/myNode deployment](docs/mynode_deployment.md) -[Raspberry Pi/Raspiblitz deployment](docs/raspiblitz_deployment.md) +* [Docker deployment](docs/docker_deployment.md) +* [Raspberry Pi/myNode deployment](docs/myNode_deployment.md) +* [Raspberry Pi/Raspiblitz deployment](docs/raspiblitz_deployment.md) ## Connecting a mobile client -## Connecting a Desktop client - -## Troubleshooting - -## Known issues - -There are several known issues at the time of writing of this document: - - -you can check their actual status on GitHub - - -## 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. +Scan the generated QR code with your iOS or Android Sphinx client. -``` -cp ~/.ssh/id_rsa . -``` +> You should see `[socket.io] connected!` in your Relay console output. -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 -``` +Add some friends' adresses and start chatting! -- In another terminal, go to the project folder and run. +## Connecting a Desktop client -``` -docker-compose exec lnd bash -``` +As of the time 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). -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. +To connect your Desktop Sphinx to your Relay: +- connect a mobile Sphinx client; +- open Profile in your mobile client; +- Export Private Key (key will be stored in your device's clipboard); +- send the private key to your Desktop and paste it to the connection input field. -Edit your app.json file inside config and on the `production` key replace `node_ip` with the one from the ping. +> You should see `[socket.io] connected!` in your Relay console output. -Run Relay. +## Troubleshooting -``` -docker-compose up node_server -``` +### Mobile Sphinx does not scan the generated QR code -Create / Unlock your wallet +- restart the Relay machine; +- connect as `admin`; +- switch to user `bitcoin` with `sudo su bitcoin`; +- make sure `NODE_IP` environment variable contains correct `:` values, `export` again if necessary; +- `cd ~/sphinx-relay; npm run prod` -``` -docker-compose exec lnd lncli create +### Messages sent with your Relay are delivered empty or not delivered at all -docker-compose exec lnd lncli unlock +Make small manual lightning payments to the Sphinx.chat LND +```bash +$ lncli sendpayment --dest=023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f --final_cltv_delta=10 --amt=5 --keysend ``` +Then make manual payments to your destination address. -NOTE: All lncli commands need to be prepended with `docker-compose exec lnd`, this tells docker to execute **something** on the lnd container. - -## Without Docker - -You can run your own Sphinx node in order to have full ownership over your communication! - -### guide - -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) +Make sure all payments complete successfully. -### download - -`git clone https://github.com/stakwork/sphinx-relay` - -`cd sphinx-relay` - -`npm install` - -### dependencies - -sqlite3: `apt-get install sqlite3` - -### configure - -Make sure your LND is running with the `--accept-keysend` flag! If you are using lnd.conf file, add `accept-keysend=1` - -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` +## 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