Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lnbits/subdomains


https://github.com/lnbits/subdomains

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Subdomains Extension - [LNbits](https://github.com/lnbits/lnbits) extension

For more about LNBits extension check [this tutorial](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions)

So the goal of the extension is to allow the owner of a domain to sell subdomains to anyone who is willing to pay some money for it.

[![video tutorial livestream](http://img.youtube.com/vi/O1X0fy3uNpw/0.jpg)](https://youtu.be/O1X0fy3uNpw 'video tutorial subdomains')

## Requirements

- Free Cloudflare account
- Cloudflare as a DNS server provider
- Cloudflare TOKEN and Cloudflare zone-ID where the domain is parked

## Usage

1. Register at Cloudflare and setup your domain with them. (Just follow instructions they provide...)
2. Change DNS server at your domain registrar to point to Cloudflare's
3. Get Cloudflare zone-ID for your domain

4. Get Cloudflare API TOKEN


5. Open the LNbits subdomains extension and register your domain
6. Click on the button in the table to open the public form that was generated for your domain

- Extension also supports webhooks so you can get notified when someone buys a new subdomain\

## API Endpoints

- **Domains**
- GET /api/v1/domains
- POST /api/v1/domains
- PUT /api/v1/domains/
- DELETE /api/v1/domains/
- **Subdomains**
- GET /api/v1/subdomains
- POST /api/v1/subdomains/
- GET /api/v1/subdomains/
- DELETE /api/v1/subdomains/

### Cloudflare

- Cloudflare offers programmatic subdomain registration... (create new A record)
- you can keep your existing domain's registrar, you just have to transfer dns records to the cloudflare (free service)
- more information:
- https://api.cloudflare.com/#getting-started-requests
- API endpoints needed for our project:
- https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records
- https://api.cloudflare.com/#dns-records-for-a-zone-create-dns-record
- https://api.cloudflare.com/#dns-records-for-a-zone-delete-dns-record
- https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record
- api can be used by providing authorization token OR authorization key
- check API Tokens and API Keys : https://api.cloudflare.com/#getting-started-requests
- Cloudflare API postman collection: https://support.cloudflare.com/hc/en-us/articles/115002323852-Using-Cloudflare-API-with-Postman-Collections