laoxong 6cc7346522
Build and Push Docker Image / build_docker_image (push) Failing after 15m2s
feat: Improve Tag search NIP-12
modified:   Cargo.lock
modified:   Cargo.toml
modified:   src/database.rs
modified:   src/nostr/event.rs
modified:   src/nostr/filter.rs
2025-12-02 18:48:05 +09:00
2025-12-01 01:33:50 +09:00
2025-12-02 18:48:05 +09:00
2025-12-01 01:33:50 +09:00
2025-12-02 18:48:05 +09:00
2025-12-02 18:48:05 +09:00
2025-06-02 23:31:11 +08:00
2025-08-07 00:41:23 +08:00

About

This is a nostr relay running on rust and tokio. A Rust learning project with poor code quality.

Usage

Running Locally

Run cargo run with environment variable DB_PATH set to the path of the database file. RUST_LOG=info BIND_ADDR="0.0.0.0:8080" DB_PATH=./nostr.db AUTH_REQUIRED=True cargo run

Docker

Run with a persistent database volume

docker run -p 8080:8080 -v /path/to/your/db:/usr/local/bin/nostr.db laoxong/nostr_demo:master

docker run -p 8080:8080 -e AUTH_REQUIRED=true laoxong/nostr_demo:master

Docker Compose

nostr-relay:
    image: laoxong/nostr_demo:master
    container_name: nostr-relay
    volumes:
      - ./nostr-relay/:/etc/nostr
    environment:
      - DB_PATH=/etc/nostr/nostr.db
      - AUTH_REQUIRED=False

Env

  • DB_PATH: Path to the SQLite database file. Defaults to nostr.db.

  • BIND_ADDR: The address and port to bind the server to. Defaults to 0.0.0.0:8080.

  • RUST_LOG: Log level. Defaults to warn

  • AUTH_REQUIRED: Set to true to enable authentication for publishing events (NIP-42). Defaults to false. If enabled, only authenticated clients whose pubkey is in the relay's trust list can publish events.

Features

  • NIP-1
  • NIP-2
  • NIP-5
  • NIP-9
  • NIP-12
  • NIP-42
  • NIP-65
S
Description
No description provided
Readme 200 KiB
Languages
Rust 99%
Dockerfile 1%