Sphinx Chat Greenlight
Sphinx Chat Greenlight
You will need 15 minutes to get your greenlight node online, and then wait around 90 minutes for your channel to be fully operational.
Once that is done, you’ll be able to use your sphinx chat app backed up by your greenlight node.
STEP 1 of 8
Grab our installer zip file from here. See the file integrity section below if you’d like to cross check this file.
STEP 2 of 8
Flash our installer onto your raspberry pi using your preferred method. We like to use the Raspberry Pi Imager, which you can download here.
First insert the SD Card you will use into your computer.
If your computer has an sd card slot, you’ll be able to insert it like this.
If your computer does not have an sd card slot, you’ll need a sd card adapter similar to this one, and plug it into your computer’s usb port.
Launch the Raspberry Pi Imager, and click on the button “CHOOSE OS”.
Scroll down through the options available, and select “Use custom”. Using the dialog that follows, select the image that you have downloaded in step 1.
Next, click on the button “CHOOSE STORAGE”.
Select the SD card you previously inserted into your computer.
Click on the button “WRITE”.
Ensure that you do not have any important information on the SD card as its contents are going to be COMPLETELY ERASED. Then click on the button “YES” in the pop-up that follows.
Wait for the image to be written to the SD Card.
Wait for the program to verify that the image has been written correctly to the SD card.
STEP 3 of 8
If you are connecting your raspberry pi wirelessly to your internet router, reinsert your SD card into your computer, and follow the instructions here to set up your raspberry pi’s connection.
First, create an empty file at the base of the boot partition of the raspberry pi. The quickest way to do this in Linux / MacOS is to open a terminal, and use the command touch ssh while standing in the boot directory.
In that same directory, write a file called `wpa_supplicant.conf`, with the name of your Wifi, and the password. See the example below for the correct formatting. Also use the following country codes for these countries: United Kingdom – “GB”, France – “FR”, Germany – “DE”, United States – “US”, Sweden – “SE”.
country=[Insert 2 letter ISO 3166-1 country code here]
ssid=”[Name of your wireless LAN]”
psk=”[Password for your wireless LAN]”
STEP 4 of 8
Eject your sd card
STEP 5 of 8
Place your sd card into the raspberry pi, and plug the pi into a power source.
STEP 6 of 8
Wait around 5 minutes.
STEP 7 of 8
Please use Firefox for this step. If you are on Linux/MacOS load the page
http://raspberrypi.local:3001/connect and if you are on Windows, load the page
http://raspberrypi:3001/connect. Follow the instructions there to open our channel with our routing node. You will need to wait around 90 minutes for your channel to be fully operational.
Once you’ve loaded the page at the link above, you should be greeted with this view. You should now click the “PEER NOW” button to peer with our routing node.
After a few seconds, you should see this view. You are now peered to our routing node, and we are initiating the channel open process.
After about a minute, you should see the txid of your channel funding transaction, along with an indicator of how many confirmations that transaction has received. You can look up your txid in any bitcoin blockchain explorer, and you’ll need 8 confirmations before your channel can be fully operational.
Once you see the view on the right, you are now connected to the lightning network.
Click on “New user”.
Click on “I Have a Connection Code”.
Scan the QR code you got above with your smartphone camera.
Proceed with the rest of the onboarding.
When you can, SSH into your raspberry pi using the username
pi and the password
raspberry, and change the password with the command
The sha256 of the zip file you will download from us is the following:
On macOS, you can check it by running this command in the directory where you have the file:
shasum -a 256 sphinx_greenlight_0_62.img.zip
Backing Up Your Funds and Data
All you need to do is backup the file
home/pi/sphinx.db and the file
Unlike a lightning node, these files do not backup the state of your channels – they backup your sphinx chat data and the secret from which all your bitcoin keys are derived.
Using the app outside the home network
Here’s how you can connect your sphinx chat app to your raspberry pi at home.
- Before anything, note that your app talks to your raspberry pi over http. All message payloads are encrypted, but the metadata is sent in plaintext to sphinx-relay. So if you’d like to set up https, you can find instructions here.
- Tell your router to forward all traffic on port 3001 to your raspberry pi.
- Set up a dynamic DNS service and point it to your router. We like to use dynDNS.
- Go to the advanced page in your sphinx chat app, and point the server setting to the domain name provided by your dynamic DNS service.
- Done! Congratulations, you are now able to use your sphinx chat app wherever you go!
Get your questions answered in the Greenlight Tribe right here!