Skip to main content

Lightning.Pub

Don't just run a Lightning Node, run a Lightning Pub.

"Pub" is a Nostr-native account system designed to make running Lightning infrastructure for your friends/family/customers easier than previously thought possible.

What is Lightning.Pub?

Lightning payments open the door to a new internet, but because of UX challenges with sovereignty we've seen a much slower uptake than we should for something so amazing. The biggest hurdle to adoption hasn't been with Bitcoin/Lightning node management itself, as liquidity is easily automated, but rather the legacy baggage of traditional Client-Server web infrastructure. Things like IP4, Reverse Proxies, DNS, Firewalls and SSL certificates all require personal configuration that is a hurdle for most.

Tor as a workaround has proven too slow and unreliable, and a dead-end for clearnet-web usecases. Mobile nodes are easy to use for spending, but channels for every device is expensive and unscalable. UX suffers from the limitations of the node not being an always-online server, which also makes them largely useless for merchants and routing services that earn revenue while you sleep.

Pub solves these challenges with a P2P-like design that is also web-friendly, by implementing a full RPC that is Nostr-native. Being Nostr-native eliminates the complexity of configuring your node like a server by using commodity Nostr relays. These relays, unlike LNURL proxies, are trustless by nature of Nostr's own encryption spec (NIP44).

Additionally, support for optional services are integrated into Pub for operators seeking backward compatibility with legacy LNURLs and Lightning Addresses.

By solving the networking and programmability hurdles, Pub provides Lightning with a 3rd Layer that enables node-runners, Businesses, and Uncle Jims to more easily bring their personal network into Bitcoin's permissionless economy. In doing so, Pub runners can keep the Lightning Network decentralized, with custodial scaling that is free of fiat rails, large banks, and other forms of high-time-preference shitcoinery.

Key Features

  • Zero Network Configuration Required - No port forwarding, Tor setup, firewall rules, or DNS configuration needed! Pub uses Nostr relays for all communication.
  • Complete Lightning Solution - No additional LN node or Bitcoin full node required (uses Neutrino)
  • Automated Channels - Receives quotes from multiple LSPs including Zeus, Voltage, and Flashsats
  • Bootstrap Peering - Trusted peer support until you can afford your own channels
  • Accounting SubLayers - Application pools and user-level accounting with configurable fee regimes
  • CLINK Integration - Nostr-native invoice transport for trustless payments

Accounts

  • Connecting via ShockWallet is as easy as pasting an nprofile
  • Or use a link to share your nprofile with friends and family
Connect Wallet Invite Guests

Planned Features

  • A management dashboard is actively being integrated into ShockWallet
  • Nostr native CLINK "offers"
  • Encrypted Push Notifications
  • P2P "LSP" coordination for channel batching over Nostr
  • Swap integration
  • High-Availability / Clustering

Dashboard Wireframe:

Pub Dashboard

Installation

One-Line Deployment

Paste one line and have a Pub node in under 2 minutes. It uses neutrino so you can run it on a $5 VPS or old laptop.

Linux:

wget -qO- https://deploy.lightning.pub | bash

macOS:

curl -fsSL https://deploy.lightning.pub | bash

It should look like this in a minute or so:

One-Line Deployment

Retrieving the admin secret

If you missed the admin connection string or QR code during installation, you can view it with cat ~/lightning_pub/admin.connect. This will display the admin connection string (format: nprofile1...:token) which you can:


This method installs all dependencies and creates user-level services (systemd on Linux, launchd on macOS).

Platform Support:

  • Debian: Fully tested and supported
  • Ubuntu: Fully tested and supported
  • Arch: Fully tested and supported
  • Fedora: Fully tested and supported
  • macOS: Fully supported with launchd service management

System Requirements:

  • RAM: Minimum 2GB burstable in headless containers or VPS. 4+GB recommended for full Linux Desktop OS.
  • Storage: 20GB of space for compact blocks.
  • Network: No port forwarding, Tor, or firewall configuration needed!

After Installation:

  • The installer will display an admin connection string (format: nprofile1...:token) and a terminal QR code containing the same admin connection string
  • Scan the terminal QR code directly with ShockWallet's "Add Source" feature (mobile or web) to pair as administrator
  • You can also copy/paste the connection string into ShockWallet's node connection screen

Note: The installation is now confined to user-space, meaning:

  • No sudo required for installation
  • All data stored in $HOME/lightning_pub/
  • Linux: Services managed via systemd (user-level)
  • macOS: Services managed via launchd with convenient aliases
  • Logs available at $HOME/lightning_pub/install.log

⚠️ Migration from Previous Versions: Previous system-wide installations (as of 8.27.2025) need some manual intervention:

  1. Stop existing services: sudo systemctl stop lnd lightning_pub
  2. Disable services: sudo systemctl disable lnd lightning_pub
  3. Remove old systemd units: sudo rm /etc/systemd/system/lnd.service /etc/systemd/system/lightning_pub.service
  4. Reload systemd: sudo systemctl daemon-reload
  5. Run the new installer: wget -qO- https://deploy.lightning.pub | bash

If you encounter issues, see the Troubleshooting section in the FAQ.

Automatic Updates

The installer automatically upgrades Pub instances, but does not does not set up a scheduled job. You can however re-run the installer for a graceful update. The installer will only restart services if version checks deem it necessary.

For automatic updates via cron, see the Updates section in the FAQ.

Docker Installation

See the Deploy with Docker guide.

Manual CLI Installation

  1. Run LND if you aren't already:
./lnd --bitcoin.active --bitcoin.mainnet --bitcoin.node=neutrino --neutrino.addpeer=neutrino.shock.network --feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
  1. Download and Install Lightning.Pub:
git clone https://github.com/shocknet/Lightning.Pub && cd Lightning.Pub && npm i
  1. Configure values in the env file:
cp env.example .env && nano .env
  1. Start the service:
npm start

Usage Notes

Connect with ShockWallet (wallet2) using the admin connection string that gets logged at startup. You can:

  • Scan the terminal QR code displayed during installation with ShockWallet's "Add Source" feature (mobile or web)
  • Copy/paste the connection string into ShockWallet's node connection screen

The nprofile of the node (without admin token) can also be used to send invitation links to guests via the web version of ShockWallet.

Note that connecting with wallet will create an account on the node, it will not show or have access to the full LND balance. Allocating existing funds to the admin user will be added to the operator dashboard in a future release.

Next Steps

For complete documentation, see the Lightning.Pub GitHub repository.

Support Development

[!IMPORTANT] ShockWallet and Lightning.Pub are free software. If you would like to see continued development, please show your support 😊

License

Warning

[!WARNING] While this software has been used in a high-profile production environment for several years, it should still be considered bleeding edge. An integrated Watchdog service provides security monitoring - see the Watchdog documentation for details. While we give the utmost care and attention to security, the internet is an adversarial environment and SECURITY/RELIABILITY ARE NOT GUARANTEED- USE AT YOUR OWN RISK.