selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
sphinx-relay logo

Self-host sphinx-relay

v2.5.3

Lightning Network relay for Sphinx chat

ReleaseOpen SourceMIT
Updated2 years ago
LanguageTypescript
Setup difficultyAdvanced
Stars
247
Port
3300 (HTTP/WebSocket API for Sphinx clients (Docker))
Requires
LND (Lightning Network Daemon)
Docker
sphinxlightning/sphinx-relay
Install with Docker Compose

What is sphinx-relay?

Sphinx Relay is a Node.js service that wraps LND to provide connectivity and data storage for the Sphinx chat app. It lets anyone operate their own relay node so messages travel over the Lightning Network in a decentralized, encrypted fashion. The relay persists aliases, messages, recurring payment setups, contact invites, and media decryption keys. Deployment options include Docker, Docker Compose, plain Linux, myNode, and Raspiblitz. An LND instance (v0.10.0+) with funded channels is required. Clients connect by scanning a QR code the relay prints at startup, which opens a WebSocket link on port 3001 (or 3300 in Docker).

Should you self-host sphinx-relay?

sphinx-relay scores 44/100 on selfhost.directory (how scoring works) and ranks #71 of 110 in Chat. It has 247 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Zulip (82/100, 26 131 stars). It scores higher overall, so compare the two before you pick. See sphinx-relay vs Zulip side by side.

Features

  • End-to-end encryption
  • Keysend support
  • Lightning Network messaging
  • Message storage
  • Multiple Deployment Options
  • QR code connection

sphinx-relay README

How to install sphinx-relay

Install sphinx-relay with Docker Compose

Docker Compose
Environment variables
PORT=3000, NODE_IP, NODE_ALIAS, NODE_ENV=production

version: '2' volumes: node_modules:

services: relay: build: context: . dockerfile: Dockerfile.lndrelay volumes: - .:/relay - .lnd/:/relay/.lnd - node_modules:/relay/node_modules ports: - '3000:3000' - '9735:9735' - '10009:10009' command: 'lnd --accept-keysend --configfile=/relay/.lnd/lnd.conf && npm start' environment: - PORT=3000 - NODE_IP=mynodeip - NODE_ALIAS=myalias - NODE_ENV=production

Bundles LND and relay in one container via supervisord

How to configure sphinx-relay

  • LND_IPIP address of LND node

    IP address of LND node

  • lnd_log_locationPath to LND log file

    Path to LND log file

  • LND_PORT10009gRPC port of LND node

    gRPC port of LND node

  • macaroon_locationPath to LND admin macaroon file

    Path to LND admin macaroon file

  • NODE_ENVproductionEnvironment mode (production/development)

    Environment mode (production/development)

    values: production, development

  • node_http_port3001HTTP port for client connections

    HTTP port for client connections

  • NODE_SCHEMEhttpURL scheme for public URL

    URL scheme for public URL

    values: http, https

  • PORT3300Port the relay listens on

    Port the relay listens on

  • PUBLIC_URLPublic URL for client connections

    Public URL for client connections

  • storage/relay/.lnd/sphinx.dbSQLite database file path

    SQLite database file path

  • tls_locationPath to LND TLS certificate

    Path to LND TLS certificate

sphinx-relay releases & version history

More in Messaging

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…