LogoLogo
HomeOnline DashboardAPIDiscordForums
SDK 1.6
SDK 1.6
  • Welcome
  • Overview
    • Features
    • Roadmap
  • Getting started
    • Get the Unity SDK
    • Setup a project
      • 1. Scene setup
      • 2. Prefab setup
      • 3. Test your game locally
        • Local testing using builds
        • Local testing via Unity's Multiplayer Play Mode
        • Local testing via ParrelSync
      • 4. Test in the cloud
        • Deploy a Replication Server
        • Share builds
    • How to... ?
    • Single-player to multiplayer
    • Video tutorials
    • Samples and tutorials
      • Package samples
      • Sample Connection UIs
      • First Steps tutorial
        • 1. Basic syncing
          • 1.1 Animation parameters
          • 1.2 Sending commands
        • 2. Physics / Authority transfer
        • 3. Areas of interest
        • 4. Parenting entities
        • 5. Complex hierarchies
        • 6. Persistence
      • Campfire project
        • Game mechanics
        • Leveraging object pooling
        • Remote interactions: Chairs
        • Remote interactions: Trees
        • A unique object with complex state
        • Custom instantiation and destruction
        • Running a server-side NPC
        • Playing audio and particles
        • A simple text chat
      • Beginner's guide to networking
    • Troubleshooting
  • Manual
    • Unity Components
      • CoherenceSync
      • CoherenceBridge
      • CoherenceLiveQuery
      • CoherenceTagQuery
      • CoherenceGlobalQuery
      • CoherenceInput
      • CoherenceNode
      • PrefabSyncGroup
      • Order of execution
    • Networking state changes
      • Instantiate and Destroy Objects
      • Supported types
      • Messaging with Commands
      • Syncing child GameObjects
      • Animation
      • CoherenceSync references
      • [Sync] and [Command] Attributes
      • [OnValueSynced] Attribute
      • Creating your own syncable member
      • Custom Component Actions
      • Rigid Bodies
      • Interpolation
    • Authority
      • Authority transfer
      • Server-authoritative setup
    • Lifetime
      • Persistence
      • Uniqueness
      • Example: A global counter
    • Parenting network entities
      • Direct children CoherenceSyncs
      • Deeply-nested CoherenceSyncs
      • Nesting Prefabs at Edit time
    • Asset management
      • Instantiating from CoherenceSyncConfig
      • Instantiate via
      • Load via
    • Scene management
    • Multiple Connections within a Game Instance
    • Baking (code generation)
      • Conditional compilation
    • Replication Server
      • Rooms and Worlds
      • Replication Server API
    • Simulators (Servers)
      • Scripting: Client vs Simulator
      • Run local Simulators
      • World Simulators
      • Room Simulators
      • Simulator slugs
      • Build and Deploy
      • Command-line arguments
    • Client Connections
    • Optimization
      • Areas of Interest
      • Level of Detail (LOD)
      • Profiling
      • Simulation Frequency
    • Project Settings
    • Advanced topics
      • Big worlds
        • World Origin Shifting
        • Load balancing
      • Competitive games
        • Simulation Frame
        • Determinism, Prediction and Rollback
      • Team workflows
        • Version Control integration
        • Continuous Integration
      • Schema explained
        • Specification
        • Field settings
        • Archetypes
      • Code stripping
      • Replication Server CLI
      • Single-player gameplay
    • Scripting API
  • Hosting
    • Choosing where to host
    • coherence Cloud
      • Online Dashboard
      • Manage Worlds
      • Configure Rooms
      • Player Accounts
      • Game Services
        • Lobbies
        • Cloud Storage
        • Key-Value Store (Legacy)
      • APIs
        • Worlds
        • Rooms
        • Lobbies
        • Cloud Storage
        • Key-Value Store (Legacy)
    • Peer-to-peer
      • Implementing Client hosting
  • Support
    • Release notes
    • Glossary
    • Unreal Engine support
    • WebGL support
    • ECS / DOTS support
    • Known issues
    • Upgrade guide
      • Upgrade 1.5 -> 1.6
      • Upgrade 1.4 -> 1.5
      • Upgrade 1.3 -> 1.4
      • Upgrade 1.2 -> 1.3
      • Upgrade 1.1 -> 1.2
      • Upgrade 1.0 -> 1.1
      • Upgrade 0.10 -> 1.0
      • Upgrade 0.9 -> 0.10
    • Credit cost & pricing
    • Report a bug
Powered by GitBook
On this page
  • Worlds
  • Rooms

Was this helpful?

Export as PDF
  1. Manual
  2. Advanced topics

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 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

Was this helpful?