1# strfry {#module-services-strfry}
2
3strfry is a relay for the [nostr protocol](https://github.com/nostr-protocol/nostr).
4
5## Basic usage {#module-services-strfry-basic-usage}
6
7By default, the module will execute strfry:
8
9```nix
10{ ... }:
11
12{
13 services.strfry.enable = true;
14}
15```
16It runs in the systemd service named `strfry`.
17
18## Reverse Proxy {#module-services-strfry-reverse-proxy}
19
20You can configure nginx as a reverse proxy with:
21
22```nix
23{ ... }:
24
25{
26 security.acme = {
27 acceptTerms = true;
28 defaults.email = "foo@bar.com";
29 };
30
31 services.nginx.enable = true;
32 services.nginx.virtualHosts."strfry.example.com" = {
33 addSSL = true;
34 enableACME = true;
35 locations."/" = {
36 proxyPass = "http://127.0.0.1:${toString config.services.strfry.settings.relay.port}";
37 proxyWebsockets = true; # nostr uses websockets
38 };
39 };
40
41 services.strfry.enable = true;
42}
43```