-
Notifications
You must be signed in to change notification settings - Fork 65
rserve.conf
Rserve
supports setting of configuration directives either via arguments on the command line or from a configuration file. The configuration file is a simple text file with entries of the form
setting value
For the full list of supported settings (configuration directives), see below. The corresponding entry as an argument on the command line is --RS-set setting=value
and is equivalent to the corresponding setting value
entry. One exception is fork here
(see special section below) which can only be used in a configuration file.
All supported configuration directives listed by their occurrence in the source code (FIXME: someone may want to group them into logical groups)
-
log.io
(boolean) if enabled the content of I/O messages is logged in debug mode (has no effect in normal mode) -
daemon
(boolean) if enabled Rserve will daemonize -
close.all.stdio
(boolean) if enabled,stdout
/stderr
are closed and re-directed to/dev/null
-
msg.id
(boolean) if enabled Rserve uses message IDs in the headers -
remote
(boolean) if enabled servers listen on all external interfaces so they can be used over the network, otherwise just loopback interface (local) is bound -
tag.argv
(boolean) if enabled the program name is changed after forking to distinguish the server instance from working sessions -
forward.stdio
(boolean) if enabledstdout
/stderr
is forwarded using OOB send -
ulog
string, defining destination for logging. Can be either a path to a local socket or either oftcp://<host>[:port]
orudp://<host>:[port]
to send logging to and external server (ifport
is not specified514
is used). The protocol is compatible withsyslogd
. -
keep.alive
(boolean) if enabledSO_KEEPALIVE
is enabled on the socket -
switch.qap.tls
(boolean) if enabledTLS
switch is allowed forQAP
connections (i.e. enabling encryption on unencrypted QAP) -
qap.oc
(boolean, alternate namerserve.oc
) if enabled, Object-Capability mode (OCAP) of the QAP protocol is used (see OCAP mode) -
console.oob
(boolean) if enabled R console I/O generates OOB send messages (OOB must be enabled for this to have any effect) -
console.input
(boolean) if enabled RReadConsole
API invokes OOB message to query the client for input (has no effect unlessconsole.oob
is also enabled) -
websockets.qap.oc
(boolean) if enabled the WebSockets QAP server uses Object-Capability mode -
random.uid
(boolean) if enabled randomuid
is used when switchinguid
after connect -
random.gid
(boolean) if enabled randomgid
is used when switchinggid
after connect -
random.uid.range
(string of the formxxx-yyy
) range for randomly generateduid
s -
auto.uid
(boolean) if enableduid
is determined from the password file on authentication -
auto.gid
(boolean) if enabledgid
is determined from the password file on authentication -
default.uid
(integer)uid
to use as fall-back if it cannot be determined during authentication -
default.gid
(integer)gid
to use as fall-back if it cannot be determined during authentication -
oob.idle.interval
(integer) interval in seconds after which an"idle"
OOB send packet is sent to the client (mostly to prevent proxies from dropping the connection) -
qap.port
(integer, alternative nameport
) port to use by the QAP server -
ipv6
(boolean) if enabled servers listen on IPv6 -
use.idle.callback
(boolean) if enabled.ocap.idle()
function is called when R is idle in OCAP mode (currently if idle for 200ms) -
http.upgrade.websockets
(boolean) if enabled HTTP server allows upgrade to the WebSockets protocol on the same connection -
http.raw.body
(boolean) if enabled HTTP callback sends raw (unparsed) body -
websockets.port
(integer) port to use for the WebSockets server -
http.port
(integer) port to use for the HTTP server -
tls.key
(path) path to the file containing the RSA key to be used for TLS -
tls.ca
(path) path to the file (in PEM format) containing Certificate Authority certificates the be registered with TLS -
tls.cert
(path) path to the file (in PEM format) containing the certificate to use for TLS servers -
tls.client
(string) specification of the behavior concerning client certificates. Possible values:none
(don't request, don't check),request
(request, but don't check),require
(request and require a valid certificate),match:
...,prefix:
... andsuffix:
... for additional filters on required certificates (see NEWS entry Rserve 1.8-8 for details). -
pid.file
(path) path to the file that will hold the PID of the Rserve server process once started -
rsa.key
(path) path to the RSA key to use for RSA authentication -
qap.tls.port
(integer, alternative nametls.port
) port of the secure server running QAP wrapped in TLS -
http.tls.port
(integer, alternative namehttps.port
) port of the secure server running HTTP wrapped in TLS -
websockets.tls.port
(integer) port of the secure server running WebSockets wrapped in TLS -
qap
(boolean, alternative namerserve
) if enabled QAP server is started (this is the only server enabled by default) -
websockets.qap
(boolean) if enabled WebSockets mode with QAP protocol is started -
websockets.text
(boolean) if enabled WebSockets mode with text protocol is started (deprecated and discouraged) -
websockets
(boolean) if enabled all WebSocket modes are enabled -
maxinbuf
(integer) limit for the size of incoming packets in kB (default 256). This is mostly a safety setting such that incoming packets cannot exhaust the server's memory easily. Recommended to increase if the client is expected to send large data to the server. -
source
(path) path to a file to use viasource()
in the stand-alone Rserve process prior to starting the servers. NOTE:run.Rserve()
is not a stand-alone process and thus does not use this directive. -
eval
(string) the string will be parsed and evaluated in the global environment in the stand-alone Rserve process prior to starting the servers -
maxsendbuf
(integer) limit for the size of the output buffer in kB (default: none) -
su
(string, one ofnow
,server
orclient
) determines the time at which a user switch is performed -
http.user
(string) username to switch to when running the HTTP server -
https.user
(string) username to switch to when running the HTTP/TLS server -
websockets.user
(string) username to switch to when running the WebSockets server -
uid
(integer/oct) user ID to switch to -
gid
(integer/oct) group ID to switch to -
chroot
(path) path to use as a chroot jail -
umask
(integer/oct) umask to set when running the server (used after su server) -
allow
(string) IP address to add to the white-list (only IPv4 is supported at this point) -
control
(boolean) if enabled control commands (server eval, server source, shutdown) are allowed (NOTE: not supported since Rserve 1.8) -
shutdown
(boolean) if enabledCMD_shutdown
is allowed (it doesn't affect shutdown viaSIGINT
) -
workdir
(path) path to the working directory used as root for per-connection directories -
workdir.clean
(boolean) if enabled the working directory for a closed connection is removed upon exit even if it is dirty -
workdir.mode
(integer/oct) mode (unix permissions) for the per-connection working directories -
workdir.parent.mode
(integer/oct) more for the root of all per-connection working directories -
encoding
(string) string encoding to use in the protocol. It must be an encoding recognized by R's iconv facilities. Note that many clients require UTF-8. -
socket
(path) path to the local socket used for QAP -
sockmod
(integer/oct) mode for the local socket -
pwdfile
(path) path to the password file. The file is expected to contain one user/password pair per line, separated by a whitespace. -
auth.function
(string) name of an R function to use for authentication instead of the built-in Rserve facilities. -
auth
(boolean orrequire
- only first character is checked) if enabled authentication is required before any other command can be used -
interactive
(boolean) if enabled R is run in interactive mode, otherwise not -
plaintext
(boolean) if enabled plain-text authentication is allowed -
oob
(boolean) if enabled out-of-band (OOB) messages (send and msg) can be used by the R code run in the session -
fileio
(boolean) if enabled file I/O QAP commands are allowed (non-OCAP mode only), deprecated and not recommended -
r.control
(boolean, alternative namer-control
) if enabled the R session can use self-command to issue control commands (as opposed to control commands initiated by the client) -
cachepwd
(boolean orindefinitely
) controls caching of passwords. If enabled the passwords file is read on connection (beforesu
is executed), if disabled it is read at the time of authentication and ifindefinitely
then it only read at the time of server start.
-
fork here
is a directive that can be only used in the configuration file (i.e., it cannot be used via--RS-set
) and it instructs Rserve to fork the server at that point. It enables the creation of multiple server instances from a single Rserve startup, typically by using multipleport
directives interspersed withfork here
. (Technically, the directive isfork
with the only supported parameterhere
at this point)
The shell-like form ${NAME}
anywhere on the right-hand side of config directives is replaced by the value of the NAME
environment variable (since 1.8-0
)
-
boolean
directives accept true values1
,true
,yes
andenable
. In practice, only the first character is checked, soe
,enable
andenabled
are equivalent. When used inrun.Rserve
the expected values areTRUE
orFALSE
. -
integer/oct
type means that prefix0x
is interpreted as hexadecimal integer,0
as octal integer and no prefix as decimal integer.