Skip to content
A simple Lightning ⚡️ point-of-sale system, powered by Lightning Charge
Branch: master
Clone or download
Latest commit 69a6eed Feb 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.babelrc Pre-compile babel and browserify bundles for npm publication Apr 3, 2018
.gitignore Pre-compile babel and browserify bundles for npm publication Apr 3, 2018
LICENSE initial commit Feb 2, 2018
items.yaml.example Allow setting custom metadata fields for products Feb 21, 2019
package.json Properly forward arguments to CLI script Sep 10, 2018


npm release MIT license Pull Requests Welcome IRC

A simple Lightning ⚡️ point-of-sale system with a clean & minimal web UI.

  • Optimized for places selling fixed-price items (like coffee shops, falafel stands or barber shops), but also has an option for billing custom amounts.
  • Small codebase (~60 server-side LoC + ~70 client-side LoC), great starting point for developing your own Lightning Charge apps!

Powered by ⚡️ Lightning Charge.

See demo video here ➤


$ npm install -g nanopos

$ edit items.yaml # see file format below

$ nanopos --items-path items.yaml --charge-token mySecretToken --currency USD
HTTP server running on localhost:9116

Running with Docker

Nanopos includes a Dockerfile to allow for fast setup using a docker container based on node:carbon. To run from the container with port 9116 exposed, first setup Lightning Charge, then build the image with:

$ docker build -t elements_project/nanopos .

and then run with:

$ docker run -p9116:9116 -e CHARGE_URL=http://[charge-url]/ -e CHARGE_TOKEN=[access-token] elements_project/nanopos

That's it! The web server should now be running on port 9116 and ready to accept payments.

Example items.yaml file

  price: 0.02 # denominated in the currency specified by --currency
  title: Green Tea # title is optional, defaults to the key

  price: 1

  price: 3

  price: 7

  price: 15

tshirt (S):
  price: 25
    shirt_size: S

The metadata object will be added into the metadata of invoices for this item.

CLI options

$ nanopos --help

  A simple Lightning point-of-sale system, powered by Lightning Charge.

    $ nanopos [options]

    -c, --charge-url <url>      lightning charge server url [default: http://localhost:9112]
    -t, --charge-token <token>  lightning charge access token [required]

    -y, --items-path <path>     path to yaml file with item config [default: ./items.yaml, file is required]
    -x, --currency <currency>   currency to use for item prices [default: BTC]
    -m, --theme <name>          pick theme from [default: yeti]
    -l, --title <name>          website title [default: Lightning Nano POS]
    --no-custom                 disable custom amount field [default: false]
    --show-bolt11               display bolt11 as text and button [default: false]

    -p, --port <port>           http server port [default: 9115]
    -i, --host <host>           http server listen address [default:]
    -h, --help                  output usage information
    -v, --version               output version number

    $ nanopos -t chargeSecretToken -x EUR -y items.yaml



You can’t perform that action at this time.