Deploy Bitcoin Lightning checkout (Express + Postgres)

An Express shop that takes Bitcoin over Lightning, into your own wallet.

Deploy Bitcoin Lightning checkout (Express + Postgres)

Just deployed

/var/lib/postgresql/data

Deploy and Host Bitcoin Lightning checkout (Express + Postgres) on Railway

A one-product shop on Express and Postgres that takes Bitcoin payments over Lightning, paid straight into your own wallet. It is built with OpenReceive, open-source checkout code: orders and payment attempts live in the Postgres database this template creates, and no payment processor sits between the buyer and your wallet.

About Hosting Bitcoin Lightning checkout (Express + Postgres)

The template runs two services: the Express shop and a Postgres database. The shop creates its tables on first start, serves the store and the checkout, and settles payments during normal requests, so there is no worker process to run. You need one value to deploy: a receive-only NWC code from your Lightning wallet (it can create invoices but never spend), pasted as NWC_URI. Optional swaps let customers pay with USDT, USDC, SOL and ETH instead: add LSC_URI_PRIMARY, and the swap provider you configure converts each payment to BTC over Lightning, into the same wallet. Available assets and networks depend on the provider.

Common Use Cases

  • Selling a product or download for Bitcoin, with the money arriving in your own wallet
  • A starting point for adding a Bitcoin Lightning checkout to an existing Express app
  • Trying out OpenReceive's checkout end to end before integrating it elsewhere

Dependencies for Bitcoin Lightning checkout (Express + Postgres) Hosting

Implementation Details

The code is examples/express-postgres-starter in the OpenReceive repository, and the walkthrough is the Node.js quickstart. Open the shop's domain and buy the sticker to see a Lightning invoice. Only the browser that placed an order can open its checkout.

Why Deploy Bitcoin Lightning checkout (Express + Postgres) on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Bitcoin Lightning checkout (Express + Postgres) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Openfront Gym
Opensource Mindbody alternative based on Next.js and Keystone.js

Openship
0
View Template
open-excalidraw
Self-hostable collaborative drawing built on Excalidraw

Prateek Mohanty
5
View Template
Next.js + Prisma + PostgreSQL Starter
Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

blueorange
0