129 lines
5.1 KiB
Plaintext
129 lines
5.1 KiB
Plaintext
##
|
|
## Default strfry config
|
|
##
|
|
|
|
# Directory that contains the strfry LMDB database (restart required)
|
|
# Ansible template for strfry.conf
|
|
|
|
db = "{{ strfry_db }}"
|
|
|
|
dbParams {
|
|
# Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required)
|
|
maxreaders = {{ strfry_dbParams.maxreaders }}
|
|
|
|
# Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required)
|
|
mapsize = {{ strfry_dbParams.mapsize }}
|
|
}
|
|
|
|
relay {
|
|
# Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required)
|
|
bind = "{{ strfry_relay.bind }}"
|
|
|
|
# Port to open for the nostr websocket protocol (restart required)
|
|
port = {{ strfry_relay.port }}
|
|
|
|
# Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required)
|
|
nofiles = {{ strfry_relay.nofiles }}
|
|
|
|
# HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case)
|
|
realIpHeader = "{{ strfry_relay.realIpHeader }}"
|
|
|
|
info {
|
|
# NIP-11: Name of this server. Short/descriptive (< 30 characters)
|
|
name = "{{ strfry_relay.info.name }}"
|
|
|
|
# NIP-11: Detailed information about relay, free-form
|
|
description = "{{ strfry_relay.info.description }}"
|
|
|
|
# NIP-11: Administrative nostr pubkey, for contact purposes
|
|
pubkey = "{{ strfry_relay.info.pubkey }}"
|
|
|
|
# NIP-11: Alternative administrative contact (email, website, etc)
|
|
contact = "{{ strfry_relay.info.contact }}"
|
|
}
|
|
|
|
# Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg) (restart required)
|
|
maxWebsocketPayloadSize = {{ strfry_relay.maxWebsocketPayloadSize }}
|
|
|
|
# Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
|
|
autoPingSeconds = {{ strfry_relay.autoPingSeconds }}
|
|
|
|
# If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy)
|
|
enableTcpKeepalive = {{ strfry_relay.enableTcpKeepalive }}
|
|
|
|
# How much uninterrupted CPU time a REQ query should get during its DB scan
|
|
queryTimesliceBudgetMicroseconds = {{ strfry_relay.queryTimesliceBudgetMicroseconds }}
|
|
|
|
# Maximum records that can be returned per filter
|
|
maxFilterLimit = {{ strfry_relay.maxFilterLimit }}
|
|
|
|
# Maximum number of subscriptions (concurrent REQs) a connection can have open at any time
|
|
maxSubsPerConnection = {{ strfry_relay.maxSubsPerConnection }}
|
|
|
|
writePolicy {
|
|
# If non-empty, path to an executable script that implements the writePolicy plugin logic
|
|
plugin = "{{ strfry_relay.writePolicy.plugin }}"
|
|
|
|
# Number of seconds to search backwards for lookback events when starting the writePolicy plugin (0 for no lookback)
|
|
lookbackSeconds = {{ strfry_relay.writePolicy.lookbackSeconds }}
|
|
}
|
|
|
|
compression {
|
|
# Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required)
|
|
enabled = {{ strfry_relay.compression.enabled }}
|
|
|
|
# Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required)
|
|
slidingWindow = {{ strfry_relay.compression.slidingWindow }}
|
|
}
|
|
|
|
logging {
|
|
# Dump all incoming messages
|
|
dumpInAll = {{ strfry_relay.logging.dumpInAll }}
|
|
|
|
# Dump all incoming EVENT messages
|
|
dumpInEvents = {{ strfry_relay.logging.dumpInEvents }}
|
|
|
|
# Dump all incoming REQ/CLOSE messages
|
|
dumpInReqs = {{ strfry_relay.logging.dumpInReqs }}
|
|
|
|
# Log performance metrics for initial REQ database scans
|
|
dbScanPerf = {{ strfry_relay.logging.dbScanPerf }}
|
|
}
|
|
|
|
numThreads {
|
|
# Ingester threads: route incoming requests, validate events/sigs (restart required)
|
|
ingester = {{ strfry_relay.numThreads.ingester }}
|
|
|
|
# reqWorker threads: Handle initial DB scan for events (restart required)
|
|
reqWorker = {{ strfry_relay.numThreads.reqWorker }}
|
|
|
|
# reqMonitor threads: Handle filtering of new events (restart required)
|
|
reqMonitor = {{ strfry_relay.numThreads.reqMonitor }}
|
|
|
|
# yesstr threads: Experimental yesstr protocol (restart required)
|
|
yesstr = {{ strfry_relay.numThreads.yesstr }}
|
|
}
|
|
}
|
|
|
|
events {
|
|
# Maximum size of normalised JSON, in bytes
|
|
maxEventSize = {{ strfry_events.maxEventSize }}
|
|
|
|
# Events newer than this will be rejected
|
|
rejectEventsNewerThanSeconds = {{ strfry_events.rejectEventsNewerThanSeconds }}
|
|
|
|
# Events older than this will be rejected
|
|
rejectEventsOlderThanSeconds = {{ strfry_events.rejectEventsOlderThanSeconds }}
|
|
|
|
# Ephemeral events older than this will be rejected
|
|
rejectEphemeralEventsOlderThanSeconds = {{ strfry_events.rejectEphemeralEventsOlderThanSeconds }}
|
|
|
|
# Ephemeral events will be deleted from the DB when older than this
|
|
ephemeralEventsLifetimeSeconds = {{ strfry_events.ephemeralEventsLifetimeSeconds }}
|
|
|
|
# Maximum number of tags allowed
|
|
maxNumTags = {{ strfry_events.maxNumTags }}
|
|
|
|
# Maximum size for tag values, in bytes
|
|
maxTagValSize = {{ strfry_events.maxTagValSize }}
|
|
} |