{"id":13832515,"url":"https://github.com/xbol0/nostring","last_synced_at":"2026-01-17T17:58:56.690Z","repository":{"id":65896126,"uuid":"601491467","full_name":"xbol0/nostring","owner":"xbol0","description":"A Nostr relay library written in Deno","archived":false,"fork":false,"pushed_at":"2023-04-06T05:18:01.000Z","size":175,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T11:01:16.099Z","etag":null,"topics":["deno","nostr","postgresql","relay","typescript"],"latest_commit_sha":null,"homepage":"https://nostring.deno.dev","language":"TypeScript","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/xbol0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-02-14T07:14:50.000Z","updated_at":"2023-04-30T23:56:48.000Z","dependencies_parsed_at":"2024-02-16T04:45:01.300Z","dependency_job_id":null,"html_url":"https://github.com/xbol0/nostring","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbol0%2Fnostring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbol0%2Fnostring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbol0%2Fnostring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbol0%2Fnostring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbol0","download_url":"https://codeload.github.com/xbol0/nostring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225581774,"owners_count":17491788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["deno","nostr","postgresql","relay","typescript"],"created_at":"2024-08-04T11:00:21.699Z","updated_at":"2026-01-17T17:58:56.612Z","avatar_url":"https://github.com/xbol0.png","language":"TypeScript","funding_links":[],"categories":["Install from Source","Relays"],"sub_categories":["Nostr","Implementations"],"readme":"# Nostring\n\n[Nostr](https://github.com/nostr-protocol/nostr) relay written in Deno.\n\nYou can easily host a relay by [Deno Deploy](https://deno.com/deploy) and [Bit.io](https://bit.io/).\n\n## Features\n\n- PostgreSQL database\n- Spam filter\n- Relay Bot\n- Zap for admission\n\n## Usage\n\nConfigure you environments or create a `.env` file.\nMore details are below.\n\nAnd then:\n\n```bash\ndeno run --allow-net --allow-read --allow-env \\\n  https://deno.land/x/nostring/scripts/start.ts\n```\n\nOr you can clone this repo and start manually:\n\n```bash\ngit clone https://github.com/xbol0/nostring\ncd nostring\ndeno task start\n```\n\n## Environment configuration\n\n| Name | Required | Description | Default |\n|:-:|:-:|:-|:-:|\n|DB_URL|yes|PostgreSQL connect URL||\n|PORT|no|HTTP server listen port|`9000`|\n|DB_POOL_SIZE|no|Database client connection pool size|`3`|\n|RELAY_NAME|no, recommanded|NIP-11 Relay name|`nostring`|\n|RELAY_DESC|no|NIP-11 Relay desciption||\n|ADMIN_PUBKEY|no, recommanded|NIP-11 Relay admin pubkey, hex encoding. Would be used for bot if enabled.||\n|RELAY_COUNTRIES|no|NIP-11 Relay countries||\n|ENABLE_BROADCASTCHANNEL|no|Enable [BraodcastChannel on Deno Deploy](https://deno.com/deploy/docs/runtime-broadcast-channel)||\n|ENABLE_ALLOW_UNKNOWN_KIND|no|Enable save unknown kind events||\n|DISABLE_NIP11|no|Disable handle NIP-11 request||\n|SPAM_DETECT_PERCENT|no|Setup spam filter detect percentage, 0 to disable spam filter|`0.5`|\n|BOT_KEY|no, yes if enabled payment|Bot private key, in hex encoding, if you enabled payment for relay, you should setup this||\n|BOT_NAME|no|Bot name|You relay's name + `'s bot`|\n|BOT_AVATAR|no|Bot picture|`https://media-uploader.orzv.workers.dev/pomf2.lain.la/f/m4lnneh4.png`|\n|BOT_RELAY|no, yes if enabled payment|You bot relay list||\n|MAX_MESSAGE_LENGTH|no|Max message length per websocket send|`393216` -\u003e 384KB|\n|MAX_SUBSCRIPTIONS|no|Max subscriptions per connection|`32`|\n|MAX_FILTER|no|Max filters per REQ subscription|`10`|\n|MAX_LIMIT|no|Max limit per filter|`500`|\n|MAX_SUBID_LENGTH|no|Max subscription id length|`64`|\n|MIN_PREFIX|no|Min prefix for ids and authors param|`32`|\n|MAX_EVENT_TAGS|no|Max tags per event|`2048`|\n|MAX_CONTENT_LENGTH|no|Max content length per event|`102400` -\u003e 100KB|\n|MIN_POW_DIFFICULTY|no|Min NIP-13 PoW diffieculty|`0`|\n|AUTH_REQUIRED|no|Need auth for access||\n|PAYMENT_REQUIRED|no|Need pay for access||\n|NIPS|no|NIP-11 supported nips|`1,9,11,12,13,15,16,20,22,26,33,40,42`|\n|EVENT_RETENTION|no|NIP-11 event retention, in JSON format|`[{\"kinds\":[1,4],\"time\":31536000,\"count\":5000},{\"kinds\":[6,7],\"count\":10000},{\"kinds\":[0,2,3],\"count\":1},{\"count\":1000}]`|\n|EVENT_TIMESTAMP_RANGE|no|NIP-22 timestamp accepted range|`-86400~300` -\u003e one day ago to 5 minites later|\n|BROADCAST_RELAYS|no|Events broadcast to other relays, seperated by comma||\n|WHITELIST_PUBKEYS|no|Whitelist pubkeys, seperated by comma||\n|LANGUAGE_TAGS|no|NIP-11 language tags||\n|TAGS|no|NIP-11 tags||\n|POSTING_POLICY|no|NIP-11 posting policy url||\n|PAYMENT_LNURL|no|Payment LNURL||\n|FEES_ADMISSION|no|Fees for admission, unit sats, eg. `1000,2000,3000`||\n|FEES_SUBSCRIPTION|no|Fees for subscription, unit sats, eg. `1000/2592000,2000/31536000`||\n|FEES_PUBLICATION|no|Fees for publication, unit sats, eg. `1,2,3:10,4,10000:100`||\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbol0%2Fnostring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbol0%2Fnostring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbol0%2Fnostring/lists"}