Setting up Payments on Nostr

How to set up for Nostr Zaps–payments with Bitcoin Lightning network, using Albyhub and Phoenixd.

Rod

8. Oktober 2024October 8, 2024 · 13 Min. Lesezeit13 min read · Aktualisiert am 6. August 2025Updated August 6, 2025

Tldr

Payments on Nostr

One of the great features of Nostr is integrated payments. This feature integrates financial transactions directly into the social network, as a seamless part of using the network.

You can get paid by and pay anyone on the network, to or from anywhere in the world, and for any reason, in a way that is instant and nearly free.

The payments get to be instant and global and free because they are made in Bitcoin, using the Bitcoin payments network called The Lightning Network.

Per Bitcoin, payments are denominated in satoshis (sats). A sat is a one-hundred-millionth of a Bitcoin– US$1 is about 1,700 sats at the time of writing. Making a payment like this on Nostr is called a “zap” and usually indicated with a lightning bolt symbol (you are getting “zapped by lightning”). You might say to your friend ”I'll zap you 1,700 sats”.

This unlocks all kinds of interesting things that are not possible with other social networks, like

Every Nostr user can have this set up. It's free or nearly free to set up, nearly free to make payments, and some apps like Primal will even set it up for you by default.

Moreover it's useful and it's fun.

Ways to set up lightning for zaps on Nostr

You can get paid in Bitcoin to a lightning address. This looks exactly like an email address except you can make a payment to it from a lightning wallet.

Anyone can publish their lightning address on Nostr so that you can pay them. And you can also get your own lightning address on your own Nostr profile so that people can pay you.

The lightning address links to a server that’s always active and ready to credit your balance whenever you receive payments.

To make that happen at a high level there are two options, either:

Generally using a custodial service will be easier, but comes with the need to trust that third party custodian, and may limit you to pay within their app.

For myself I'm going to self host using Albyhub by ⁠Alby and Phoenixd by Acinq.

Hosting your own lightning server with Albyhub and Phoenixd

Anyone who's experimented with self-sovereign setups for Bitcoin know that historically there's been quite a bit of heavy lifting.

My number one favourite feature of what Albyhub and Phoenixd have done together is to create a nearly instant set up with no heavy lifting. I was stunned. For anyone who's used to jumping through hoops with this, it was like magic.

You can use Albyhub with any lightning wallet backend, but in my view none are as automatic, and magic, as Phoenixd.

Compare the traditional set up with the Albyhub and Phoenixd setup.

Traditional–

Vs Albyhub and Phoenixd–

For any normal non-technical user, self-hosting your own lightning node just went from being too hard, to very achievable.

Unpacking the parts

There are a few parts to this set up and there’s a bit of assumed knowledge here, so let’s quickly unpack it

I'm going to plug it all together, so that I can pay for anything in any way I like (from NWC, Alby Plugin or Alby Go), and receive payment from anyone (to our Lightning Address), with all funds managed on my own server (hosting Albyhub and Phoenixd).

How to set up Albyhub and Phoenixd

To set this up requires basic command line knowledge, and some experience with Docker. I didn’t have that experience, so I gave ChatGPT the docs on each of Albyhub and Phoenixd and it walked me through the setup.

To start with, I got myself a cheap VPS, and installed Docker. Docker then allowed me to deploy Albyhub and Phoenixd as a container.

The Albyhub Github contains very helpful readme, here https://github.com/getAlby/hub

And Phoenixds own docs here https://phoenix.acinq.co/server and here https://github.com/ACINQ/phoenixd

Alby also has a dedicated section to working with Albyhub with Phoenixd backend, here https://github.com/getAlby/hub/blob/master/scripts/linux-x86_64/phoenixd/README.md

First, install Docker and make sure it is running.

Then working with the code on the Albyhub with Phoenixd page–

That’s it. Docker will proceed to create the application for you running on port 8080

You can then log in in a web browser and start the setup–

Setting up the bells and whistles

That's the hard part done. The next step is add all the little extra pieces that make for a great Nostr experience.

Alby Browser Plugin–

Alby Go App

Nostr Wallet Connect

Your own Lightning Address

That completes the set up.

Backups

Now that everything is set up, it’s time to make a backup.

I already had my Nostr keys as a mnemonic backup from my last article, and I’m using these keys for my Alby Account, so there is nothing new to back up there.

But we still need backups for the Albyhub login credentials, and the Phoenixd wallet.

When started for the first time, Phoenixd will generate a 12-word mnemonic of its own, which it will use to restore your wallet balance in case of any issue. This recovery phrase is stored in the phoenix folder you created, at ~/.phoenixd/seed.dat.

In total, your backups will contain:

Once these are backed up somewhere safely, you can fully recover your set up if ever anything goes wrong.

Things I did wrong in set up so that you don’t have to

Initially I had some trouble with user permissions. I was able to resolve it by changing the user configuration in the docker-compose.yml.

I also had some trouble with the initial funds transfer. In order to test everything without risking significant funds, I made an initial transfer to the hub of 10 satoshis.

I thought this was a bug in my set up, but it turns out this is a feature of Phoenixd auto-liquidity, that it keeps some initial sats as a payment credit to buy the required lightning channel liquidity. The total cost amounts to on average 1% charge, but it is also front-loaded, and because my payment was so very tiny (10 satoshis worth a fraction of a cent) the payment was entirely front-loaded.

I diagnosed this by accessing Phoenixd directly in the cli, and by doing so, I was able to see the balance present, as a fee credit.

To check, run–

And receive a response like this, which shows the credit on the account –

The above command–

Helpful docs–

I wondered what the total initial amount would be that would be captured as fee credit. Your mileage might vary, but for me:

All up only a few cents to get started with initial liquidity.

In summary

Nostr has integrated payments that are instant and nearly free, using Satoshis on the Lightning Network. Some Nostr clients come with a wallet set up automatically, and it is quite easy to set up your own self-custody wallet, with all the bells and whistles.

I wanted to set up my own self-custody wallet so that I could test and learn the full set up of the system. For this I used Albyhub and Phoenixd, and I deployed it to a cheap VPS using Docker.

Once set up, I added all the extra bits so that now–

And in doing this–

For anyone interested in Nostr or Bitcoin software or technologies, I recommend to go through a set up like this as it really covers the full gamut or the Nostr–Lightning–Bitcoin stack. It’s clear how far this technology has come and how powerful it can get from here.

Up next

#alby#bitcoin#grownostr#lightning#nostr#phoenixd#zap

Written by

Comments

No comments yet. Start the conversation.