Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidson-souza/ln-address-server
A small, self-hosted lnaddress server
https://github.com/davidson-souza/ln-address-server
Last synced: 7 days ago
JSON representation
A small, self-hosted lnaddress server
- Host: GitHub
- URL: https://github.com/davidson-souza/ln-address-server
- Owner: Davidson-Souza
- License: mit
- Created: 2024-07-20T20:58:52.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-09-09T22:22:30.000Z (4 months ago)
- Last Synced: 2024-09-10T02:59:05.833Z (4 months ago)
- Language: Rust
- Size: 34.2 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Poor-man's lnaddress server
This is a super minimal implementation of lnurl pay and lnaddress to self-host. It's only meant for a few users and not a lot of traffic.
As the ln wallet, we use `phoenixd`.## Using
**It is strongly encoraged to run this behind a reverse-proxy like nginx**
To use, just build it with rust, and then you'll need a folder with the json of each user you want to support. For example, create a `users/` folder and create one json for each user. The json name should be `user`, where user is what will appear before the `@` on the final address. So `[email protected]` should have a json called `john` (no `.json`). The content should be the following:
```json
{
"metadata": "[[\"text/plain\",\"YOUR DESCRIPTION\"]]",
"callback": "https:///callback"
}
```Replace MIN_SENDABLE and MAX_SENDABLE with something like 1000 and 100000000 (in milisatoshis). `YOUR DESCRIPTION` is a short string that will be shown on the client before paying you. `CALLBACK ADDRESS` is the address where this software is hosted.
Here's an example:
```json
{
"metadata": "[[\"text/plain\",\"my ln address\"]]",
"callback": "https://smith.com/callback"
}
```After that, you need to start `phoenixd` and get the password from `~/.phoenix/phoenix.conf`. You'll see a field like `http-password=`. Only copy the `PASSWORD` part. The start this with
```bash
$ ln-address --secret-key
```Run `--help` to see all options.
### Using with docker
Copy/rename `.env.sample` to `.env` and fill the `PHOENIXD_PASSWORD` environment variable with your local password, then run the usual `docker compose up` command.
Attention: this intentionally does not include a container for `phoenixd`.