Replication Server CLI

Command-line interface tools explained

Found in <package-root>/.Runtime/<platform>/.

Worlds

replication-server --help 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.
--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 start the Replication Server, you need to give it the location of the schema.

You can copy the CLI commands to start the Replication Server form coherence Hub > Servers tab.

You can also define other parameters like min-query-distance (the minimum distance the LiveQuery needs to move for the Replicator to recognize a change), send and receive frequency, ip and port number.

Minimal parameters set is presented in the example below:

replication-server serve --port 32001 --signalling-port 32002 --send-frequency 20 --recv-frequency 60 --web-support --env dev --schema "/Users/coherence/unity/Coherence.Toolkit/Toolkit.schema,/Users/coherence/MyProject/Library/coherence/Gathered.schema"

Rooms

replication-server --help rooms

--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"  Local IP to bind http servers to.
--port=0                         [Obsolete] The port for api to listen to.
--udp-port=42001                 Port for udp traffic.
--tcp-port=42001                 Port for tcp traffic.
--signalling-port=42002          Port for signalling, only used if --web-support is true.
--web-port=42003                 Port for webrtc, only used if --web-support is true.
--api-port=64001                 The port for API to listen to.
--stats-port=64000               The port to listen for stats scrapers. Also enables pprof.
--default-frequency=20           [Obsolete] use SendFrequency instead.
--send-frequency=20              The frequency to send data to the clients. Packets/s.
--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.
--default-schema=""              The default schema file (.schema).
--use-p-prof                     Enable pprof on APIPort.
--web-support                    [Deprecated] Does this support web connections.
--public-ip=""                   Public IP of the Replication Server, used by WebRTC.
--disconnect-timeout=5000        Disconnect timeout (in milliseconds).
--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.
--region=""                      Region in which the server is located.
--secret="local-development"     Secret used for API request and client authentication. The default value is used during local development only.
--room-size-limit=100            The hard limit of max clients in a Room. Enforced at Room creation.
--cleanup-interval-sec=60        Interval, in seconds, between attempts to clean up empty Rooms.
--analytics-enabled              
--unlock-token=""                Token to remove RS restrictions.
--version-override=""            Override the RS version. For debug purposes.
--grpc-address=""                Address for realtime streaming of Room/World updates.
--rsid=""                        Replication Server's unique ID.
--auto-shutdown-timeout-ms=0     Empty Replication Server auto shutdown timeout (in milliseconds), minimum 10000ms, disabled if 0.

Last updated

Was this helpful?