config.toml (3751B)
1 # Nostr-rs-relay configuration 2 3 [info] 4 # The advertised URL for the Nostr websocket. 5 relay_url = "wss://nostr.example.com/" 6 7 # Relay information for clients. Put your unique server name here. 8 name = "nostr-rs-relay" 9 10 # Description 11 description = "A newly created nostr-rs-relay.\n\nCustomize this with your own info." 12 13 # Administrative contact pubkey 14 #pubkey = "0c2d168a4ae8ca58c9f1ab237b5df682599c6c7ab74307ea8b05684b60405d41" 15 16 # Administrative contact URI 17 #contact = "mailto:contact@example.com" 18 19 [diagnostics] 20 # Enable tokio tracing (for use with tokio-console) 21 #tracing = true 22 23 [database] 24 # Directory for SQLite files. Defaults to the current directory. Can 25 # also be specified (and overriden) with the "--db dirname" command 26 # line option. 27 data_directory = "." 28 29 30 # Use an in-memory database instead of 'nostr.db'. 31 # Caution; this will not survive a process restart! 32 #in_memory = false 33 34 # Database connection pool settings for subscribers: 35 36 # Minimum number of SQLite reader connections 37 #min_conn = 4 38 39 # Maximum number of SQLite reader connections 40 #max_conn = 128 41 42 [network] 43 # Bind to this network address 44 address = "0.0.0.0" 45 46 # Listen on this port 47 port = 8080 48 49 # If present, read this HTTP header for logging client IP addresses. 50 # Examples for common proxies, cloudflare: 51 #remote_ip_header = "x-forwarded-for" 52 #remote_ip_header = "cf-connecting-ip" 53 54 # Websocket ping interval in seconds, defaults to 5 minutes 55 #ping_interval = 300 56 57 [options] 58 # Reject events that have timestamps greater than this many seconds in 59 # the future. Recommended to reject anything greater than 30 minutes 60 # from the current time, but the default is to allow any date. 61 reject_future_seconds = 1800 62 63 [limits] 64 # Limit events created per second, averaged over one minute. Must be 65 # an integer. If not set (or set to 0), defaults to unlimited. 66 #messages_per_sec = 0 67 68 # Limit the maximum size of an EVENT message. Defaults to 128 KB. 69 # Set to 0 for unlimited. 70 #max_event_bytes = 131072 71 72 # Maximum WebSocket message in bytes. Defaults to 128 KB. 73 #max_ws_message_bytes = 131072 74 75 # Maximum WebSocket frame size in bytes. Defaults to 128 KB. 76 #max_ws_frame_bytes = 131072 77 78 # Broadcast buffer size, in number of events. This prevents slow 79 # readers from consuming memory. 80 #broadcast_buffer = 16384 81 82 # Event persistence buffer size, in number of events. This provides 83 # backpressure to senders if writes are slow. 84 #event_persist_buffer = 4096 85 86 [authorization] 87 # Pubkey addresses in this array are whitelisted for event publishing. 88 # Only valid events by these authors will be accepted, if the variable 89 # is set. 90 #pubkey_whitelist = [ 91 # "35d26e4690cbe1a898af61cc3515661eb5fa763b57bd0b42e45099c8b32fd50f", 92 # "887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072", 93 #] 94 95 [verified_users] 96 # NIP-05 verification of users. Can be "enabled" to require NIP-05 97 # metadata for event authors, "passive" to perform validation but 98 # never block publishing, or "disabled" to do nothing. 99 #mode = "disabled" 100 101 # Domain names that will be prevented from publishing events. 102 #domain_blacklist = ["wellorder.net"] 103 104 # Domain names that are allowed to publish events. If defined, only 105 # events NIP-05 verified authors at these domains are persisted. 106 #domain_whitelist = ["example.com"] 107 108 # Consider an pubkey "verified" if we have a successful validation 109 # from the NIP-05 domain within this amount of time. Note, if the 110 # domain provides a successful response that omits the account, 111 # verification is immediately revoked. 112 #verify_expiration = "1 week" 113 114 # How long to wait between verification attempts for a specific author. 115 #verify_update_frequency = "24 hours" 116 117 # How many consecutive failed checks before we give up on verifying 118 # this author. 119 #max_consecutive_failures = 20