Skip to content

A high-performance nostr relay, using PostgreSQL. (Thanks to https://opensats.org/ for their generous donation!)

License

Notifications You must be signed in to change notification settings

HumanjavaEnterprises/nostr-relay-nestjs

 
 

Repository files navigation

Nostr Relay NestJS

Coverage Status FOSSA Status

A high-performance Nostr relay implementation powered by NestJS and PostgreSQL.

Quick Start

  1. Clone and Install:
git clone https://github.com/HumanjavaEnterprises/nostr-relay-nestjs.git
cd nostr-relay-nestjs
npm install
  1. Configure Environment:
cp .env.example .env
# Edit .env with your settings
  1. Run Migrations:
npx ts-node scripts/migrate-to-latest.ts
  1. Start the Relay:
npm run start:dev

Quick Deploy: Deploy on Railway

Documentation

📚 Core Documentation

🔧 Operations

👩‍💻 Development

Deployment

⚠️ IMPORTANT DEPLOYMENT SAFETY NOTICE

The deployment process requires specific steps to ensure safe execution:

  1. Prepare for Deployment:

    # CRITICAL: Copy deploy script to parent directory first
    cp deploy.sh ../deploy-nostr.sh
    
    # Move to parent directory
    cd ..
    
    # Make script executable
    chmod +x deploy-nostr.sh
  2. Execute Deployment:

    # Run deployment from outside the project directory
    ./deploy-nostr.sh

    ⚠️ WARNING: Never run the deploy script from within the project directory! The deployment process removes and replaces the project directory, which could interrupt the script if run from within.

  3. After Deployment:

    # Optional: Remove the copied deploy script
    rm deploy-nostr.sh

Why These Steps Matter

  • Safety: Running from outside the target directory ensures the script continues executing even when the project directory is modified
  • Reliability: Prevents script interruption during critical deployment steps
  • Security: Maintains a clean deployment process with no self-copying scripts

For detailed deployment configuration and options, see our Deployment Guide.

Features

NIPs Support Status

🟢 Full implemented 🟡 Partially implemented 🔴 Not implemented

NIP Status Description
01 🟢 Basic protocol flow
02 🟢 Contact List
04 🟢 Encrypted Direct Message
05 🟢 DNS Identifiers
09 🔴 Event Deletion
11 🟢 Relay Information
13 🟢 Proof of Work
17 🟢 Report Events
22 🟢 Event Timestamps
26 🟢 Delegated Events
28 🟢 Public Chat
29 🟢 Group Chat
40 🟢 Expiration
42 🟢 Authentication
45 🔴 Counting
50 🟢 Search

For detailed NIP implementations, see our Technical Specifications.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A high-performance nostr relay, using PostgreSQL. (Thanks to https://opensats.org/ for their generous donation!)

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.8%
  • JavaScript 7.0%
  • Shell 6.1%
  • Handlebars 3.1%