Replication Server CLI
Replication Server command-line interface 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 too.
--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.
--persistence-enabled [Experimental] If enabled, starts replication server with persistence attached.
--persistence-target-format="binary" [Experimental] Serialization target format. If format is different than 'binary' a migration will happen.
--persistence-save-file-name="world" [Experimental] The name of the persistent save file. Extension is based on the target format.
--persistence-save-folder="." [Experimental] The folder where the save file is written.
--persistence-save-frequency=30 [Experimental] The frequency in which the save file is written (in seconds).
--persistence-query-world-position="0,0,0" [Experimental] Position of the center of the entity query.
--persistence-query-radius=10000 [Experimental] Radius of entity query.
--persistence-disable-s-3-storage [Obsolete] Enable to disable storing to S3.
--persistence-upload-size-threshold=1024 [Obsolete] Difference in bytes to cause an s3 upload.
--persistence-upload-frequency-forced=3600 [Obsolete] The maximum number of seconds between forced s3 uploads.
--wait-for-persistence [Experimental] If enabled, replication server waits for persistent data to fully load before allowing any clients to connect.
--auto-shutdown-timeout-ms=0 Empty replication server auto shutdown timeout (in milliseconds), minimum 10000, disabled if 0
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 too.
--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.
--has-persistence Does this support enabling persistence.
--grpc-address="" Address for realtime streaming of room/world updates
--rsid="" Replication server 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?