Nostr Relay is an open-source server for people who want to run their own relay on the Nostr network, the protocol where posts and messages pass between independent servers and apps. It is written in Go and built on the relayer framework, so it suits developers, community operators and self-hosters who want control over where their data lives. The project is free and released under the MIT license.
Nostr Relay accepts events from clients, stores them and serves them back to anyone who asks. You can choose SQLite for a simple single-machine setup, or PostgreSQL and MySQL when you already manage a database server. The sections below cover what the program does, how to set it up, and when a client program is a better fit.
What Is a Nostr Relay?
Nostr is a protocol in which users publish signed events, such as short posts, profile updates and direct messages. Those events travel through relays, which are servers that receive, store and forward them. A user typically connects to several relays at once, so no single server controls their identity or their audience.
A relay is therefore a piece of shared infrastructure. It does not need to be large to be useful. A small server with a few thousand events can serve a family group, a club or a project team just as well as a busy public relay does.
Who Should Run Their Own Relay?
Running a relay makes sense for a few kinds of people. A community that wants its own space on Nostr can host a relay so its members publish to a server they trust. A developer building a Nostr app may run a local relay to test publishing and subscriptions without depending on public servers.
Privacy-minded individuals sometimes run a relay for their own archive, keeping a copy of the events they care about. Small organizations may prefer a relay they control, especially when internal communication needs a predictable home. Each of these cases involves ongoing responsibility for uptime, storage and security.
How a Relay Handles Events in Practice
When a client publishes an event, the relay checks that the event is well formed and signed, then stores it. When a client subscribes with a filter, the relay searches its storage and sends matching events back. This loop is the core job, and most operational questions come down to how efficiently it runs.
Storage grows steadily, so plan for disk space and decide how long to keep old events. Many operators start small, watch their database size for a few weeks, and then adjust. Testing with a few clients before opening the relay to the public gives you a clearer picture of real traffic.
Key features
Several storage backends
Optional SQLite backups with Litestream
Built on the relayer framework
Free and MIT-licensed
Supported coins
Nostr Relay is built for the Nostr network, which the project's documentation names as the network it serves. The relay stores and forwards Nostr events, not cryptocurrency or wallet balances. Anything you publish through it is a Nostr event, not a financial transaction.
How to install Nostr Relay on Windows
- 1
Download the release
Download only from the official website or the project's GitHub Releases page. Choose the newest tagged version, which was v0.0.267 at the time of writing, and confirm the current version on the releases page before you start.
- 2
Verify the file
Compare the SHA-256 checksum of the downloaded file with the value published on the release page. If the project provides a signature, check it as well. If the values do not match, do not run the file.
- 3
Look for a Windows build or use Docker
The project lists Windows support as likely rather than confirmed, and it lists Docker as a platform. Check the release assets for a Windows archive first. If none is available, run the relay in Docker, which the project supports, instead of assuming a native build exists.
-
Prepare the database and start the relay
Place the program in a folder you control, then create the database before the first start. Point the relay's configuration at that database. The required tables must exist before the relay runs, so create them as part of setup.
System requirements
- Docker, listed by the project as a supported platform
How to use Nostr Relay
Once the database is ready, the relay is a server you start and then point clients at. The steps below describe the typical flow for a self-hosted relay, following the setup order the project describes.
- Start the relay with your database configuration.
- Confirm that the required tables exist in the database before you accept traffic.
- If outside clients need to connect, make the relay reachable by opening its port on your router or firewall.
- Add your relay's address to a Nostr client such as Gossip or Amethyst.
- Publish a test note from the client, then check that it appears when you query the relay.
- If you use SQLite, enable Litestream and confirm that backups are being written.
- Keep a record of your configuration so you can rebuild the server if it fails.
Pros & cons
- Free and MIT-licensed, with source code available on GitHub
- Choice of SQLite, PostgreSQL, MySQL or OpenSearch storage
- Optional SQLite backups through Litestream
- Built on the relayer framework, giving developers a clear starting point
- Windows support is listed as likely, so you may need Docker or a manual build
- Database tables must be prepared by hand before the first run
- Running a public relay means ongoing work on uptime, storage and security
Is Nostr Relay safe?
Download only from the official website or the project's GitHub repository, and use the Releases page for compiled files. Compare the SHA-256 checksum or verify the signature before you run anything. A relay does not manage cryptocurrency funds, but it stores data and accepts network connections, so it still deserves care. Keep database passwords out of shared files, avoid exposing the database port directly to the internet, and apply updates when they arrive. Because the project's code is actively maintained, check the latest version on the official website before you deploy.
- Official source only. Download from github.com/mattn/nostr-relay. Ignore ads and lookalike domains.
- Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
- Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
Alternatives
Most programs in this catalog are Nostr clients. Amethyst, Gossip and Vega are apps where you read and post, while Nostr Relay is server software that stores events for those clients. Nostr Commander RS and NAK are command-line tools. NAK is useful for publishing or querying test events against a relay you run, and Nostr Commander RS focuses on posting from a terminal. Nostr VPN and Blockcore Notes solve different problems, networking and a web-based app. If you want to read and post, choose a client. If you want to host infrastructure, this is the relevant starting point.
Specifications
- Price
- Free
- Type
- Open source
- License
- MIT
- Latest version
- v0.0.267
- Last update
- 18 Oct 2026
- Windows support
- Likely (builds for Windows; check releases)
- Source code
- github.com/mattn/nostr-relay
Frequently asked questions
Nostr Relay is server software that stores and serves events for the Nostr network. People run it to host a relay for a community, to keep a personal archive, or to test Nostr apps during development. Clients connect to it the same way they connect to any other relay.
Yes. The program is free and released under the MIT license, and its source code is on GitHub. Hosting costs such as a server, storage and bandwidth depend on your provider and are separate from the software itself.
Windows support is listed as likely rather than confirmed. Check the releases page for a Windows build first. If none is available, run the relay with Docker, which the project lists as a supported platform and which works on Windows.
It supports SQLite, PostgreSQL, MySQL and OpenSearch. SQLite is the simplest choice for a single server, while PostgreSQL and MySQL suit setups where a database server already exists. The database and its tables must be ready before the relay starts.
Open source code can be inspected by anyone, which is a real advantage. Whether your deployment is safe depends on how you install it, how you secure the database, and how quickly you apply updates. Start with the checksum and verification steps in the installation section.
Yes, when you use SQLite. The relay can optionally use Litestream to back up its SQLite database. Enable it during setup and confirm that backups are being written before you rely on them.
No. Nostr Relay is the server side that stores and forwards events. To read and post, you need a client such as Gossip, Amethyst or Vega, and you point that client at your relay.
Verdict
Nostr Relay suits developers, community operators and self-hosters who want their own Nostr relay with a choice of databases. It is free, MIT-licensed and written in Go, and it supports optional SQLite backups. It is less suited to people who only want to read and post, since a client is the better tool for that. Plan for database setup and ongoing server maintenance before you commit.