{"id":14634480,"url":"https://github.com/bezysoftware/netstr","last_synced_at":"2026-01-16T08:20:36.248Z","repository":{"id":250484636,"uuid":"817400528","full_name":"bezysoftware/netstr","owner":"bezysoftware","description":"Modern nostr relay","archived":false,"fork":false,"pushed_at":"2024-12-04T14:45:38.000Z","size":575,"stargazers_count":9,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-07T00:36:14.526Z","etag":null,"topics":["nostr","nostr-relay"],"latest_commit_sha":null,"homepage":"https://relay.netstr.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bezysoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-19T16:14:30.000Z","updated_at":"2025-09-01T06:52:24.000Z","dependencies_parsed_at":"2024-07-27T19:46:51.744Z","dependency_job_id":"0c8ca200-d431-473e-8598-600dfd5f7c65","html_url":"https://github.com/bezysoftware/netstr","commit_stats":null,"previous_names":["bezysoftware/netstr"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bezysoftware/netstr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezysoftware%2Fnetstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezysoftware%2Fnetstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezysoftware%2Fnetstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezysoftware%2Fnetstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bezysoftware","download_url":"https://codeload.github.com/bezysoftware/netstr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezysoftware%2Fnetstr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nostr","nostr-relay"],"created_at":"2024-09-09T19:01:38.246Z","updated_at":"2026-01-16T08:20:36.226Z","avatar_url":"https://github.com/bezysoftware.png","language":"C#","readme":"# [netstr - a nostr relay](https://relay.netstr.io/)\n[![release](https://img.shields.io/github/v/release/bezysoftware/netstr)](https://github.com/bezysoftware/netstr/releases)\n[![build](https://github.com/bezysoftware/netstr/workflows/build/badge.svg)](https://github.com/bezysoftware/netstr/workflows/actions)\n\n![netstr logo](art/logo.jpg)\n\nNetstr is a modern relay for the [nostr protocol](https://github.com/nostr-protocol/nostr) written in C#. \n\n * **Prod** instance: https://relay.netstr.io/\n * **Dev** instance: https://relay-dev.netstr.io/ (feel free to play with it / try to break it, just report if you find anything that needs fixing)\n\n## Features\n\nNIPs with a relay-specific implementation are listed here.\n\n- [x] NIP-01: [Basic protocol flow description](https://github.com/nostr-protocol/nips/blob/master/01.md)\n- [x] NIP-02: [Follow list](https://github.com/nostr-protocol/nips/blob/master/02.md)\n- [x] NIP-04: [Encrypted Direct Message](https://github.com/nostr-protocol/nips/blob/master/04.md) (deprecated in favor of NIP-17)\n- [x] NIP-09: [Event deletion](https://github.com/nostr-protocol/nips/blob/master/09.md)\n- [x] NIP-11: [Relay information document](https://github.com/nostr-protocol/nips/blob/master/11.md)\n- [x] NIP-13: [Proof of Work](https://github.com/nostr-protocol/nips/blob/master/13.md)\n- [x] NIP-17: [Private Direct Messages](https://github.com/nostr-protocol/nips/blob/master/17.md)\n- [x] NIP-40: [Expiration Timestamp](https://github.com/nostr-protocol/nips/blob/master/40.md)\n- [x] NIP-42: [Authentication of clients to relays](https://github.com/nostr-protocol/nips/blob/master/42.md)\n- [x] NIP-45: [Counting results](https://github.com/nostr-protocol/nips/blob/master/45.md)\n- [ ] NIP-50: [Search Capability](https://github.com/nostr-protocol/nips/blob/master/50.md)\n- [x] NIP-62: [Request to Vanish](https://github.com/vitorpamplona/nips/blob/right-to-vanish/62.md)\n- [x] NIP-70: [Protected events](https://github.com/nostr-protocol/nips/blob/master/70.md)\n- [x] NIP-77: [Negentropy syncing](https://github.com/nostr-protocol/nips/pull/1494)\n- [x] NIP-119: [AND operator for filters](https://github.com/nostr-protocol/nips/pull/1365)\n\n## Tests\n\nEach supported NIP has a set of tests written in [Specflow / Gherkin language](https://docs.specflow.org/projects/specflow/en/latest/Gherkin/Gherkin-Reference.html). \nThe scenarios are described in plain English which lets anyone read them and even contribute with new ones without any programming skills. See sample (simplified):\n\n```gherkin\nScenario: Newly subscribed client receives matching events, EOSE and future events\n    Given a relay is running\n    And Alice is connected to relay\n    And Bob is connected to relay\n    When Bob publishes events\n    | Id                                                               | Content  | Kind  | CreatedAt  |\n    | a6d166e834e78827af0770f31f15b13a772f281ad880f43ce12c24d4e3d0e346 | Hello 1  | 1     | 1722337838 |\n    | cb952d0ab727c3fcaf94e6809a64d1a27ff87cae5be583398ee7f0f1381d6b66 | Hello MD | 30023 | 1722337839 |\n    And Alice sends a subscription request abcd\n    | Kinds |\n    | 1     |\n    And Bob publishes an event\n    | Id                                                               | Content | Kind | CreatedAt  |\n    | 8013e4630a69528007355f65e01936c9b761a4bbd9340b60a4bd0222b15b7cf3 | Hello 2 | 1    | 1722337840 |\n    Then Alice receives messages\n    | Type  | Id   | EventId                                                          |\n    | EVENT | abcd | a6d166e834e78827af0770f31f15b13a772f281ad880f43ce12c24d4e3d0e346 |\n    | EOSE  | abcd |                                                                  |\n    | EVENT | abcd | 8013e4630a69528007355f65e01936c9b761a4bbd9340b60a4bd0222b15b7cf3 |\n    And Bob receives messages\n    | Type | Id                                                               | Success | \n    | OK   | a6d166e834e78827af0770f31f15b13a772f281ad880f43ce12c24d4e3d0e346 | true    |\n    | OK   | cb952d0ab727c3fcaf94e6809a64d1a27ff87cae5be583398ee7f0f1381d6b66 | true    |\n    | OK   | 8013e4630a69528007355f65e01936c9b761a4bbd9340b60a4bd0222b15b7cf3 | true    |\n```\n\nAbove scenario simulates that `Bob` publishes events to a relay, `Alice` creates a subscription and `Bob` publishes more events. The scenario then asserts that `Alice` and `Bob`\nboth received their expected messages in correct order.\n\n## Setup\n\nNetstr is c# app backed by a Postgres database. You have several options to get up and running:\n\n* Using `dotnet run`\n* Using `docker run`\n* Using `docker compose`\n* Deploying to Azure\n\n### Dotnet run\n\n* Install .NET: https://dotnet.microsoft.com/en-us/download\n* Install Postgres: https://www.postgresql.org/download/\n* Edit `appsettings.json` and set a `NetstrDatabase` Connection String to point to your Postgres instance\n* Run `dotnet run --project .\\src\\Netstr\\Netstr.csproj`\n\n### Docker run\n\n* Install Docker: https://docs.docker.com/engine/install/\n* Install Postgres: https://www.postgresql.org/download/\n* Run `docker run -e ConnectionStrings__NetstrDatabase=YOUR_CONNECTION_STRING bezysoftware/netstr:latest`\n  * Set your connection string to point to your Postgres instance\n\n### Docker compose\n\nDocker compose contains a Postgres DB service so no need to install it manually. You will however need to set the following environment variable:\n * NETSTR_DB_PASSWORD - password for Postgres DB\n \nOptionally you can also set following variables:\n * NETSTR_IMAGE - docker image (default `bezysoftware/netstr:latest`)\n * NETSTR_PORT - port on which the relay will be accessible (default 8080)\n * NETSTR_ENVIRONMENT - will be used to name the compose instance (default 'prod')\n * NETSTR_ENVIRONMENT_LONG - will be used inside the application to load specific configuration (default 'Production')\n\n### Deploying to Azure\n\nThe `scripts` folder contains scripts to setup a VM in Azure with everything you'll need to run a Netstr instance:\n * Separate VM with an attached data disk\n * Docker with Compose to run the `compose.yml`\n * Nginx with certbot which generates an SSL certificate for your domain\n","funding_links":[],"categories":["Relays"],"sub_categories":["Implementations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezysoftware%2Fnetstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbezysoftware%2Fnetstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezysoftware%2Fnetstr/lists"}