Update config

This commit is contained in:
Jon Staab
2025-09-23 17:16:18 -07:00
parent 6642cba977
commit a337da1757
7 changed files with 95 additions and 17 deletions
+28 -13
View File
@@ -33,12 +33,25 @@ Configures NIP 29 support.
- `auto_join` - whether relay members can join `open` groups without approval. Defaults to `true`.
- `auto_leave` - whether relay members can leave groups without approval. Defaults to `true`.
### `[management]`
Configures NIP 86 support.
- `enabled` - whether NIP 86 is enabled.
- `methods` - a list of [NIP 86](https://github.com/nostr-protocol/nips/blob/master/86.md) relay management methods enabled for this relay.
### `[blossom]`
Configures blossom support.
- `enabled` - whether blossom is enabled.
- `directory` - where to store files. Defaults to `./data/{my-relay}/media`.
### `[roles]`
Defines roles that can be assigned to different users and attendant privileges. Each role is defined by a `[roles.{role_name}]` header and has the following options:
- `pubkey` - a list of nostr pubkeys this role is assigned to.
- `nip86_methods` - a list of [NIP 86](https://github.com/nostr-protocol/nips/blob/master/86.md) relay management methods enabled for this role. Defaults to `[]`.
- `pubkeys` - a list of nostr pubkeys this role is assigned to.
- `can_invite` - a boolean indicating whether this role can invite new members to the relay by requesting a `kind 28935` claim. Defaults to `false`. See [access requests](https://github.com/nostr-protocol/nips/pull/1079) for more details.
A special `[roles.member]` heading may be used to configure policies for all relay users (that is, pubkeys assigned to other roles, or who have redeemed an invite code).
@@ -47,8 +60,7 @@ A special `[roles.member]` heading may be used to configure policies for all rel
Contains information related to data persistence.
- `sqlite` is the location of the sqlite database file. Defaults to `./data/{my-relay}.db`.
- `media` is the name of the directory for storing blossom files. Defaults to `./media/{my-relay}`.
- `events` - the location of the sqlite database file used to store events. Defaults to `./data/{my-relay}/events`.
### Example
@@ -56,25 +68,28 @@ The below config file might be saved as `./config/my-relay.example.com` in order
```toml
[self]
name = "My relay"
secret = "ce30b1831a4551f4cb7a984033c34ab96d8cf56ff50df9d0c27d9fa5422f2278"
[roles]
[groups]
enabled = true
auto_join = false
[management]
enabled = true
methods = ["supportedmethods", "banpubkey", "allowpubkey"]
[blossom]
enabled = false
[roles.member]
can_invite = true
[roles.admin]
nip86_methods = ["supportedmethods", "banpubkey", "allowpubkey"]
pubkeys = ["d9254d9898fd4728f7e2b32b87520221a50f6b8b97d935d7da2de8923988aa6d"]
[groups]
enabled = true
auto_join = false
[data]
events = "./data/my-relay/events"
```
## Development