|
| 1 | +# LnAddress.Net |
| 2 | + |
| 3 | +**LnAddress.Net** is a service that allows you to receive Lightning payments using any username at your domain. For |
| 4 | + |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +- **Docker Image**: A pre-built Docker image is available |
| 9 | + at [ipmsio/lnaddress.net](https://hub.docker.com/r/ipmsio/lnaddress.net). |
| 10 | +- **Configuration Reference**: Review the [docker-compose.yml](docker-compose.yml) file for a complete list of |
| 11 | + environment variables and configuration options. |
| 12 | +- **Reverse Proxy Setup**: An example Nginx configuration is provided in [example.nginx](example.nginx). |
| 13 | + |
| 14 | +## Getting Started |
| 15 | + |
| 16 | +1. **Pull the Docker Image**: |
| 17 | + |
| 18 | + ```bash |
| 19 | + docker pull ipmsio/lnaddress.net:latest |
| 20 | + ``` |
| 21 | + |
| 22 | +2. **Review Configuration Variables**: |
| 23 | + |
| 24 | + Check the [docker-compose.yml](docker-compose.yml) file for environment variables. These variables allow you to: |
| 25 | + |
| 26 | + - Configure connection details to your LND instance. |
| 27 | + - Adjust limits for payment amounts or comment fields. |
| 28 | + |
| 29 | +3. **Set Up Nginx (Optional)**: |
| 30 | + |
| 31 | + For a production setup, use [example.nginx](example.nginx) as a guide to set up a reverse proxy with TLS termination. |
| 32 | + |
| 33 | +## Connecting to LND |
| 34 | + |
| 35 | +To enable Lightning payments, you need to connect LnAddress.Net to your LND instance. You will need: |
| 36 | + |
| 37 | +- The **TLS certificate** (`tls.cert`) |
| 38 | +- The **admin.macaroon** in base64 format |
| 39 | +- The **LND RPC server endpoint** |
| 40 | + |
| 41 | +**Steps to Obtain LND Credentials**: |
| 42 | + |
| 43 | +1. **TLS Certificate**: |
| 44 | + |
| 45 | + Extract the certificate content between the `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` lines. |
| 46 | + |
| 47 | + ```bash |
| 48 | + cat /.lnd/tls.cert |
| 49 | + ``` |
| 50 | + |
| 51 | + Copy only the certificate portion without the header and footer lines. |
| 52 | + |
| 53 | +2. **Admin Macaroon**: |
| 54 | + |
| 55 | + Convert the `admin.macaroon` to a single-line base64 string: |
| 56 | + |
| 57 | + ```bash |
| 58 | + base64 /.lnd/data/chain/bitcoin/mainnet/admin.macaroon | tr -d '\n' |
| 59 | + ``` |
| 60 | + |
| 61 | +3. **RPC Server URL**: |
| 62 | + |
| 63 | + Set your LND RPC endpoint, for example: |
| 64 | + |
| 65 | + ```bash |
| 66 | + https://<lnd-ip>:10009 |
| 67 | + ``` |
| 68 | + |
| 69 | + Ensure your `lnd.conf` includes: |
| 70 | + |
| 71 | + ```ini |
| 72 | + rpclisten=0.0.0.0:10009 |
| 73 | + ``` |
| 74 | + |
| 75 | + This makes LND’s RPC interface accessible to LnAddress.Net. |
| 76 | + |
| 77 | +## Default Settings |
| 78 | + |
| 79 | +- **MinSendable**: 1,000 millisatoshis (1 satoshi) |
| 80 | +- **MaxSendable**: 100,000,000 millisatoshis (100,000 satoshis) |
| 81 | +- **MaxCommentAllowed**: 0 (no comments accepted) |
| 82 | + |
| 83 | +If these defaults don’t meet your needs, adjust them via environment variables as shown |
| 84 | +in [docker-compose.yml](docker-compose.yml). |
| 85 | + |
| 86 | +## Running the Service |
| 87 | + |
| 88 | +Once you have your environment variables set and Docker is ready, you can run: |
| 89 | + |
| 90 | +```bash |
| 91 | +docker-compose up -d |
| 92 | +``` |
| 93 | + |
| 94 | +or, if running standalone: |
| 95 | + |
| 96 | +```bash |
| 97 | +docker run -d \ |
| 98 | + -p 80:80 \ |
| 99 | + -e LND_TLS_CERT="<base64_tls_cert>" \ |
| 100 | + -e LND_MACAROON="<base64_admin_macaroon>" \ |
| 101 | + -e LND_SERVER_URL="https://<lnd-ip>:10009" \ |
| 102 | + ipmsio/lnaddress.net:latest |
| 103 | +``` |
| 104 | + |
| 105 | +Replace the environment variables with your actual values. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +**You’re now set up to receive Lightning payments via username addresses on your domain!** |
0 commit comments