Automates NIP-05 identifier registration via pull requests. Users submit their Nostr pubkey through a web form, and the system automatically creates a PR to add them to the nostr.json file.
Visit the registration form to request your NIP-05 identifier. Once your PR is approved and merged, your identifier will be active.
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────────┐
│ Web Form │────▶│ Express Server │────▶│ GitHub Actions │
│ (add-nip05.html)│ │ (/api/submit-nip05) │ │ (add-nip05.yml) │
└─────────────────┘ └──────────────────────┘ └─────────────────────┘
│
▼
┌─────────────────────┐
│ Pull Request │
│ (nostr.json) │
└─────────────────────┘
- User submits username + pubkey via the web form
- Express server validates input and triggers a GitHub
repository_dispatchevent - GitHub Actions workflow updates
nostr.jsonand creates a PR usingpeter-evans/create-pull-request - Repository owner reviews and merges the PR
Clone the repository in your github by forking this repository. If you have already forked this repo, you can skip this step.
- Go to GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens
- Create a new token with:
- Repository access: Only select this repository
- Permissions:
- Actions: Read and write (required to trigger
repository_dispatch) - Contents: Read and write
- Metadata: Read-only (auto-granted)
- Pull requests: Read and write
- Actions: Read and write (required to trigger
- Copy the token (starts with
github_pat_)
- Go to your repository's Settings → Actions → General
- Scroll to "Workflow permissions"
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click Save
- Go to Zeabur Dashboard
- Create a new project or select an existing one
- Click Add Service and select Git
- Connect your GitHub repository (bitkarrot/nip05-service)
- Zeabur will automatically detect the Dockerfile and deploy
In your Zeabur service settings, add these environment variables:
GITHUB_TOKEN: Your GitHub personal access token (required)GITHUB_OWNER: Your GitHub username (default:bitkarrot)GITHUB_REPO: Your repository name (default:nip05-service)ALLOWED_ORIGIN: CORS origin (default:*)
In Zeabur service settings, add a custom domain under Domains section. The service will be accessible at the provided URL.
If you fork this repository, update the environment variables in Zeabur:
GITHUB_OWNER: Your GitHub usernameGITHUB_REPO: Your repository name
.well-known/nostr.json- The NIP-05 identifier mappingadd-nip05.html- User-facing registration formapi/submit-nip05.js- API handler for form submissionsserver.js- Express server entry pointDockerfile- Container configuration for Zeabur.github/workflows/add-nip05.yml- GitHub Actions workflow
- The GitHub token is stored as a Zeabur environment variable, never exposed to users
- Input validation happens both client-side and server-side
- The workflow validates username and pubkey format before making changes
- PRs require manual approval before merging
Once registered, users can set their NIP-05 identifier in their Nostr profile as:
username@yourdomain.com
For the root identifier _, it displays as just the domain.
MIT