- port
Port to listen on. Default 0 (binds to a random available port).
The actual URL is retrieved via server$url.
- host
Host address to bind to. Default "127.0.0.1" (localhost).
- data_dir
Directory for document storage. Defaults to a
session-temporary directory, so documents do not persist across R
sessions. Supply an explicit path to persist documents across sessions.
- auto_create_docs
Logical, whether to auto-create documents when
clients request unknown document IDs. Default TRUE.
- storage_id
Optional storage ID for this server. If NULL (default),
generates a new persistent identity. Set to NA for an ephemeral server
(no persistence identity).
- tls
(optional) for secure wss:// connections, a TLS configuration
object created by nanonext::tls_config().
- auth
Optional authentication configuration created by auth_config().
When provided, clients must include a valid JWT (ID token) as a
Bearer token in the Authorization header of the WebSocket upgrade request.
Connections without valid credentials are rejected immediately.
Note: TLS is required when authentication is enabled to protect tokens.
- share
Controls document sharing policy for connected clients. This
unified parameter governs both proactive document announcement (pushing
documents to clients) and access control (allowing clients to request
documents). Accepts one of:
NA (default) — never announce but allow all requests.
TRUE — announce all documents to all clients and allow all
requests.
FALSE — never announce and deny all requests (sends
doc-unavailable).
A function with signature function(client_id, doc_id)
returning TRUE (announce and allow), NA (allow on request only),
or FALSE (deny access). Called per client and per document.