Replication Server CLI
Command-line interface tools explained
If you want to manually run the the Replication Server for local development there are only a few options to consider. There are more options used when self hosting.
World
--log-target=LOG-TARGETS One or more log targets separated by comma or in separate arguments (console|file):(plain|colored|json):(trace|debug|info|warn|error):[filePath]
--log-file=LOG-FILE-STRING [Obsolete - use --log-target] Log output file.
--log-level=LOG-LEVEL-STRING [Obsolete - use --log-target] The log level.
--log-format=LOG-FORMAT [Obsolete - use --log-target] Output format of the log.
--eula If true, prints the end-user license agreement and quits.
--env="enduser" Environment in which the server is executed.
--local-ip-override="127.0.0.1" IP to bind the http servers to.
--port=0 [Obsolete] The port to listen to.
--stats-port=32000 The port to listen for stats scrapers. Also enables pprof.
--udp-port=32001 The port to listen to.
--tcp-port=32001 The port for TCP to listen to.
--signalling-port=32002 Port for signalling, only used if --web-support is true.
--web-port=32003 Port for webrtc, only used if --web-support is true.
--api-port=32004 The port for API to listen to.
--ping-port=0 The port for ping service to listen to. Service disabled if 0.
--ping-rate-limit=1000 Maximum pings per second for the ping service. Use 0 to disable rate limiting.
--use-p-prof Enable pprof on APIPort.
--frequency=20 [Obsolete] use SendFrequency instead.
--send-frequency=20 The server send frequency.
--recv-frequency=60 The server packet receive frequency packets/s. Packets received faster than this will be dropped and the connection throttled.
--disable-throttling Disable all packet throttling. Best used with 3rd party network relays that already support DDOS detection and throttling.
--schema=STRING The schema file (.schema).
--disconnect-timeout=5000 Disconnect timeout (in milliseconds).
--retry-delay=1000 Connect retry delay (in milliseconds).
--debug-streams Use debug streams.
--max-entities=65536 Maximum number of entities allowed.
--max-clients=200 Expected maximum number of Clients.
--max-queries-per-client=15 Maximum number of queries per Client allowed.
--min-query-distance=0.1 Minimum distance for query change.
--web-support [Deprecated] Does this support web connections.
--public-ip="" Public IP of the Replication Server, used by WebRTC.
--out-stats-freq=1 Frequency, in seconds, of updates to prometheus stats.
--log-stats-freq=0 Frequency, in seconds, of output of stats to INFO logs. 0 - no output.
--secret="local-development" Secret used for API request and client authentication. The default value is used during local development only.
--project-id="local" ID of the project as assigned by the portal.
--unlock-token="" Token to remove RS restrictions.
--analytics-enabled
--version-override="" Override the RS version. For debug purposes.
--auto-shutdown-timeout-ms=0 Empty Replication Server auto shutdown timeout (in milliseconds), minimum 10000, disabled if 0.
--host-authority-features=,... Set which host authority features are enabled for this World.
To launch the replication server in World mode you need to pass in the world
mode followed by a number of options. For example:
replication-server world [options]
For help with which options are available use this command:
replication-server --help world
Most of the options have reasonable defaults. However, there are two that you should set:
--env
and --schema
The --env
option tells the replication server what the environment is for running. Choose "dev"
for local testing.
The --schema
option tells the replication server what the schema definitions are for the baked code generated by baking.
Minimal parameters set is presented in the example below:
replication-server world --env dev --schema "<path-to-coherence-SDK-package>/Coherence.Toolkit/Toolkit.schema,<path-to-project>/Assets/coherence/Gathered.schema"
Rooms
Launching the Replication Server in Rooms mode is similar to Worlds, except the schema definition options is --default-schema
not --schema
as when launching in World mode.
Similar to starting the Replication Server in World mode, the Replication Server is started in Rooms mode with the rooms
option, followed by options:
replication-server rooms [options]
For help with which options are available in Rooms mode, use this command:
replication-server --help rooms
Minimal parameters set is presented in the example below:
replication-server rooms --env dev --default-schema "<path-to-coherence-SDK-package>/Coherence.Toolkit/Toolkit.schema,<path-to-project>/Assets/coherence/Gathered.schema"
For further information and for more complex use of local Replication Servers, see the Self-Hosting section.
Last updated
Was this helpful?