2023-07-30 00:19:36 +00:00
|
|
|
---
|
|
|
|
strfry_version: beta
|
|
|
|
strfry_binary_path: /usr/local/bin/strfry
|
|
|
|
strfry_make_jobs: "{{ ansible_processor_cores }}"
|
|
|
|
strfry_skip_config: False
|
|
|
|
strfry_system_group: strfry
|
|
|
|
strfry_system_user: strfry
|
|
|
|
|
|
|
|
strfry_data_path: /var/lib/strfry
|
|
|
|
strfry_db: "./strfry-db/" # Becomes /var/lib/strfry/strfry-db
|
|
|
|
|
2023-08-11 19:28:48 +00:00
|
|
|
strfry_policies_enabled: true
|
|
|
|
|
2023-07-30 00:19:36 +00:00
|
|
|
strfry_dbParams:
|
|
|
|
# Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required)
|
|
|
|
maxreaders: 256
|
|
|
|
|
|
|
|
# Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required)
|
|
|
|
mapsize: 10995116277760
|
|
|
|
|
2023-09-25 15:03:34 +00:00
|
|
|
# Disables read-ahead when accessing the LMDB mapping. Reduces IO activity when DB size is larger than RAM. (restart required)
|
|
|
|
noReadAhead: no
|
|
|
|
|
|
|
|
strfry_events:
|
|
|
|
# Maximum size of normalised JSON, in bytes
|
|
|
|
maxEventSize: 65536
|
|
|
|
|
|
|
|
# Events newer than this will be rejected
|
|
|
|
rejectEventsNewerThanSeconds: 900
|
|
|
|
|
|
|
|
# Events older than this will be rejected
|
|
|
|
rejectEventsOlderThanSeconds: 94608000
|
|
|
|
|
|
|
|
# Ephemeral events older than this will be rejected
|
|
|
|
rejectEphemeralEventsOlderThanSeconds: 60
|
|
|
|
|
|
|
|
# Ephemeral events will be deleted from the DB when older than this
|
|
|
|
ephemeralEventsLifetimeSeconds: 300
|
|
|
|
|
|
|
|
# Maximum number of tags allowed
|
|
|
|
maxNumTags: 2000
|
|
|
|
|
|
|
|
# Maximum size for tag values, in bytes
|
|
|
|
maxTagValSize: 1024
|
|
|
|
|
2023-07-30 00:19:36 +00:00
|
|
|
strfry_relay:
|
|
|
|
# Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required)
|
|
|
|
bind: "127.0.0.1"
|
|
|
|
|
|
|
|
# Port to open for the nostr websocket protocol (restart required)
|
|
|
|
port: 7777
|
|
|
|
|
|
|
|
# Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required)
|
|
|
|
nofiles: 1000000
|
|
|
|
|
|
|
|
# HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case)
|
|
|
|
realIpHeader: ""
|
|
|
|
|
|
|
|
info:
|
|
|
|
# NIP-11: Name of this server. Short/descriptive (< 30 characters)
|
|
|
|
name: "strfry default"
|
|
|
|
|
|
|
|
# NIP-11: Detailed information about relay, free-form
|
|
|
|
description: "This is a strfry instance."
|
|
|
|
|
|
|
|
# NIP-11: Administrative nostr pubkey, for contact purposes
|
|
|
|
pubkey: "unset"
|
|
|
|
|
|
|
|
# NIP-11: Alternative administrative contact (email, website, etc)
|
|
|
|
contact: "unset"
|
|
|
|
|
|
|
|
# Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg) (restart required)
|
|
|
|
maxWebsocketPayloadSize: 131072
|
|
|
|
|
|
|
|
# Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
|
|
|
|
autoPingSeconds: 55
|
|
|
|
|
|
|
|
# If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy)
|
|
|
|
enableTcpKeepalive: false
|
|
|
|
|
|
|
|
# How much uninterrupted CPU time a REQ query should get during its DB scan
|
|
|
|
queryTimesliceBudgetMicroseconds: 10000
|
|
|
|
|
|
|
|
# Maximum records that can be returned per filter
|
|
|
|
maxFilterLimit: 500
|
|
|
|
|
|
|
|
# Maximum number of subscriptions (concurrent REQs) a connection can have open at any time
|
|
|
|
maxSubsPerConnection: 20
|
|
|
|
|
|
|
|
writePolicy:
|
|
|
|
# If non-empty, path to an executable script that implements the writePolicy plugin logic
|
2023-08-12 21:59:36 +00:00
|
|
|
plugin: "{{ strfry_data_path }}/strfry-policy.ts"
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
compression:
|
|
|
|
# Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required)
|
2023-08-12 21:59:36 +00:00
|
|
|
enabled: yes
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
# Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required)
|
2023-08-12 21:59:36 +00:00
|
|
|
slidingWindow: yes
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
logging:
|
|
|
|
# Dump all incoming messages
|
2023-08-12 21:59:36 +00:00
|
|
|
dumpInAll: no
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
# Dump all incoming EVENT messages
|
2023-08-12 21:59:36 +00:00
|
|
|
dumpInEvents: no
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
# Dump all incoming REQ/CLOSE messages
|
2023-08-12 21:59:36 +00:00
|
|
|
dumpInReqs: no
|
2023-07-30 00:19:36 +00:00
|
|
|
|
|
|
|
# Log performance metrics for initial REQ database scans
|
2023-08-12 21:59:36 +00:00
|
|
|
dbScanPerf: no
|
2023-07-30 00:19:36 +00:00
|
|
|
|
2023-09-25 15:03:34 +00:00
|
|
|
# Log reason for invalid event rejection? Can be disabled to silence excessive logging
|
|
|
|
invalidEvents: yes
|
|
|
|
|
2023-07-30 00:19:36 +00:00
|
|
|
numThreads:
|
|
|
|
# Ingester threads: route incoming requests, validate events/sigs (restart required)
|
|
|
|
ingester: 3
|
|
|
|
|
|
|
|
# reqWorker threads: Handle initial DB scan for events (restart required)
|
|
|
|
reqWorker: 3
|
|
|
|
|
|
|
|
# reqMonitor threads: Handle filtering of new events (restart required)
|
|
|
|
reqMonitor: 3
|
|
|
|
|
2023-09-25 15:03:34 +00:00
|
|
|
# negentropy threads: Handle negentropy protocol messages (restart required)
|
|
|
|
negentropy: 2
|
2023-07-30 00:19:36 +00:00
|
|
|
|
2023-09-25 15:03:34 +00:00
|
|
|
negentropy:
|
|
|
|
# Support negentropy protocol messages
|
|
|
|
enabled: yes
|
2023-07-30 00:19:36 +00:00
|
|
|
|
2023-09-25 15:03:34 +00:00
|
|
|
# Maximum records that sync will process before returning an error
|
|
|
|
maxSyncEvents: 1000000
|