Kosmos Community

Use your own address/domain as Lightning Address for your Kosmos wallet

Documenting this here, since I have set it up for myself. Here’s how you can do it in Nginx:

    location /.well-known/lnurlp/raucao {
        proxy_ssl_server_name on;
        proxy_pass https://accounts.kosmos.org/lnurlpay/raucao@kosmos.org;
    }

This is the config for my server name kip.pe, so the user address raucao@kip.pe resolves to the lnurlpay wallet of raucao@kosmos.org. (It’s important to add the proxy_ssl_server_name on directive, because our HAProxy uses SNI headers for routing traffic to the correct VM.)

Would be great to have more example configs for other proxies/servers!

2 Likes

oh that’s pretty cool!

only “problem” is that it will show your @kosmos.org address in the metadata (see description):

1 Like

Ah, yes, good point!

I think we should change the description, either only using the username, or removing it altogether. The username could also differ, so I guess it should be neutral.

I only edited your template and didn’t want to think about it much when I saved that.

This should also work if I add a static file to my website in .well-known/lnurlp/[whatever]
with the content kosmos JSON, e.g.

{"status":"OK","callback":"https://accounts.kosmos.org/lnurlpay/raucao@kosmos.org/invoice","tag":"payRequest","maxSendable":1000000000,"minSendable":100000,"metadata":"[[\"text/identifier\", \"raucao@kosmos.org\"], [\"text/plain\", \"Send sats, receive thanks.\"]]","commentAllowed":0}

or am I missing something?

1 Like

Sure, as long as you keep track of any potential upstream changes yourself in that case.