{"id":13715176,"url":"https://github.com/yanascz/lnurld","last_synced_at":"2025-05-07T03:31:22.655Z","repository":{"id":177017718,"uuid":"562540916","full_name":"yanascz/lnurld","owner":"yanascz","description":"LNURL Daemon","archived":false,"fork":false,"pushed_at":"2024-11-21T14:40:14.000Z","size":314,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-21T15:28:21.276Z","etag":null,"topics":["bitcoin","http-server","lightning-network","lnurl-auth","lnurl-pay","lnurl-withdraw","nostr","raffle","zapper"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanascz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-06T17:09:47.000Z","updated_at":"2024-11-13T19:44:30.000Z","dependencies_parsed_at":"2023-10-16T04:00:22.468Z","dependency_job_id":"87d4c882-4d2e-4c87-8362-40d730a8fc4a","html_url":"https://github.com/yanascz/lnurld","commit_stats":null,"previous_names":["yanascz/lnurld"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanascz%2Flnurld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanascz%2Flnurld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanascz%2Flnurld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanascz%2Flnurld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanascz","download_url":"https://codeload.github.com/yanascz/lnurld/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806435,"owners_count":21807202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","http-server","lightning-network","lnurl-auth","lnurl-pay","lnurl-withdraw","nostr","raffle","zapper"],"created_at":"2024-08-03T00:00:55.305Z","updated_at":"2025-05-07T03:31:18.568Z","avatar_url":"https://github.com/yanascz.png","language":"Go","funding_links":[],"categories":["Self-Hosted Bitcoin Payment Processors"],"sub_categories":[],"readme":"# LNURL Daemon\n\nLNURL Daemon is a minimalistic [Lightning Address](https://lightningaddress.com/) and LNURL self-hosted HTTP server.\nIt is intended to run on your node and connect directly to your [LND](https://github.com/lightningnetwork/lnd).\nYou may test it by sending some sats to ⚡lnurld@yanas.cz or by scanning the following QR code:\n\n![LNURL-pay QR code](https://yanas.cz/ln/pay/lnurld/qr-code)\n\n## Supported features\n\n* [LUD-01: Base LNURL encoding](https://github.com/fiatjaf/lnurl-rfc/blob/luds/01.md)\n* [LUD-03: `withdrawRequest` base spec](https://github.com/fiatjaf/lnurl-rfc/blob/luds/03.md)\n* [LUD-04: `auth` base spec](https://github.com/fiatjaf/lnurl-rfc/blob/luds/04.md)\n* [LUD-06: `payRequest` base spec](https://github.com/fiatjaf/lnurl-rfc/blob/luds/06.md)\n* [LUD-09: `successAction` field for `payRequest`](https://github.com/fiatjaf/lnurl-rfc/blob/luds/09.md)\n* [LUD-12: Comments in `payRequest`](https://github.com/fiatjaf/lnurl-rfc/blob/luds/12.md)\n* [LUD-16: Paying to static internet identifiers](https://github.com/fiatjaf/lnurl-rfc/blob/luds/16.md)\n* [NIP-57: Lightning Zaps](https://github.com/nostr-protocol/nips/blob/master/57.md)\n* Multiple customizable accounts\n* Lightning Network terminal\n* Lightning Network raffle\n* Events with LNURL-auth sign-up\n\n## Installation\n\nLND is expected to run on the same machine and user `bitcoin` is assumed.\nYou also need [Go installed](https://go.dev/doc/install).\n\n### Build from source\n\n```shell\n$ git clone https://github.com/yanascz/lnurld.git\n$ cd lnurld\n$ go install\n$ go build\n```\n\n### Create config file\n\n```shell\n$ sudo mkdir /etc/lnurld\n$ sudo cp config.yaml /etc/lnurld\n$ sudo sed -i s/S3cr3t/$(openssl rand -base64 12 | tr / -)/ /etc/lnurld/config.yaml\n```\n\n**Make sure to review the config file before running `lnurld` in production!** \n\n(Create image `satoshi.png` in `/etc/lnurld/thumbnails` if you want it served by `lnurld`.)\n\n### Create data directory\n\n```shell\n$ sudo mkdir /var/lib/lnurld\n$ sudo chown bitcoin:bitcoin /var/lib/lnurld\n```\n\nAccount, event and raffle data will be stored there.\n\n### Run the server\n\n```shell\n$ ./lnurld\n```\n\nAlternatively with a custom config file path:\n\n```shell\n$ ./lnurld --config=/home/satoshi/.lnurld/cfg.yaml\n```\n\nDon’t forget to stop the server before setting up systemd service!\n\n### Setup systemd service\n\n```shell\n$ sudo cp lnurld /usr/local/bin\n$ sudo cp systemd/lnurld.service /etc/systemd/system\n$ sudo systemctl start lnurld.service\n$ sudo systemctl enable lnurld.service\n```\n\nNow the service should be up and running, listening on configured host and port.\n\n### Setup reverse proxy\n\nExample [nginx](https://nginx.org) configuration for domain `nakamoto.example` (replace with your own) with\n[Let’s Encrypt](https://letsencrypt.org) SSL certificate:\n\n```\nhttp {\n    #\n    # general configuration omitted\n    # \n\n    upstream lnurld {\n        server 127.0.0.1:8088;\n    }\n\n    server {\n        listen       443 ssl http2;\n        listen       [::]:443 ssl http2;\n        server_name  nakamoto.example;\n\n        ssl_certificate      \"/etc/letsencrypt/live/nakamoto.example/fullchain.pem\";\n        ssl_certificate_key  \"/etc/letsencrypt/live/nakamoto.example/privkey.pem\";\n        ssl_session_cache    shared:lnurld:1m;\n\n        proxy_set_header  X-Forwarded-Proto $scheme;\n        proxy_set_header  X-Forwarded-Host $host;\n\n        location / {\n            proxy_pass http://lnurld;\n        }\n    }\n}\n```\n\nIf you don’t have an SSL certificate, you can get one using [Certbot](https://certbot.eff.org).\n\n## Usage\n\nOnce configured and deployed, you shall be able to send sats to ⚡satoshi@nakamoto.example from your LN wallet.\nIf you need to display a QR code, simply navigate to or share https://nakamoto.example/ln/pay/satoshi/qr-code.\nFor a smaller/larger QR code, feel free to append desired size in pixels to the URL, e.g `?size=1024`. This pattern\napplies to any configured account.\n\nTo see accessible accounts and to manage events/raffles, navigate to https://nakamoto.example/auth. You’ll need\nto authenticate using one of the configured username/password pairs. Account stats, QR code and/or payment terminal\nare accessible from the account’s detail page in the Accounts section at https://nakamoto.example/auth/accounts.\n\nEvents may be managed in the Events section at https://nakamoto.example/auth/events. Each created event may be shared\nwith your friends, and they may sign up to attend the event once they authenticate using their LN wallet.\n\nRaffles may be managed in the Raffles section at https://nakamoto.example/auth/raffles. Raffle QR code may be shared\nto allow anyone to purchase as many raffle tickets as they wish, increasing their chances. Once enough tickets are sold,\ni.e. at least the same number as there are prizes, you may start drawing winning tickets from the raffle’s detail page.\n\nOnce a raffle is drawn, received sats may be withdrawn to any LN wallet that supports LNURL-withdraw. However, you have\nto first configure path to a macaroon with `invoices:read invoices:write offchain:read offchain:write` permissions.\n\n## Update\n\n```shell\n$ cd lnurld\n$ git pull\n$ ./systemd/deploy.sh\n```\n\nAlternatively checkout a specific branch/tag.\n\nWhen updating from revision `4da3fcf` or earlier, run this account migration in your data directory:\n\n```shell\n$ for f in *.csv*; do d=accounts/${f%.csv*}; sudo -u bitcoin mkdir -p $d; sudo mv $f $d/invoices.csv${f#*.csv}; done\n```\n\nWhen updating from revision `ec77e80` or earlier, run this event migration in your data directory:\n\n```shell\n$ sudo sed -e 's/\"dateTime\":\\(\"[^\"]*\"\\)/\"start\":\\1,\"end\":\\1/' -i events/*/data.json\n```\n\nThen you might want to update end dates of your events via the admin user interface.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanascz%2Flnurld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanascz%2Flnurld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanascz%2Flnurld/lists"}