LogoLogo
⚠️ Outdated documentationGo to latestHomeAPI
SDK 1.3
SDK 1.3
  • Welcome
  • Overview
    • Features
    • Roadmap
  • Getting started
    • Get the Unity SDK
    • Setup a project
      • Scene setup
      • Prefab setup
      • Sample connection UIs
      • Local development
        • Local testing using Builds
        • Local testing via Unity's Multiplayer Play Mode (MPPM)
        • Local testing via ParrelSync
      • Test in the cloud
        • Deploy a Replication Server
        • Share builds
    • Video tutorials
    • Samples and tutorials
      • Package samples
      • First Steps tutorial
        • 1. Basic syncing
          • 1.2. Animation parameters
          • 1.3. 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
  • Manual
    • Unity Components
      • CoherenceSync
      • CoherenceBridge
      • CoherenceNode
      • CoherenceLiveQuery
      • CoherenceTagQuery
      • PrefabSyncGroup
      • CoherenceInput
      • Order of execution
    • Networking state changes
      • 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
      • Instantiate via
      • Load via
      • Instantiating from CoherenceSyncConfig
    • Scene management
    • Baking (code generation)
    • Replication Server
      • Rooms and Worlds
      • Replication Server API
    • Simulators (Servers)
      • Scripting: Client vs Simulator
      • Run local Simulators
      • World Simulators
      • Room Simulators
      • Simulator slugs
      • Multi-Room Simulators
      • 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
      • Command-line interface tools
      • Single-player gameplay
    • Scripting API
  • Hosting
    • Choosing where to host
    • coherence Cloud
      • Online Dashboard
      • Manage Worlds
      • Configure Rooms
      • Lobbies
      • Game Services
        • Account
        • Key-Value Store
      • coherence Cloud APIs
        • Worlds API
        • Rooms API
        • Lobbies API
        • Game Services
          • Authentication Service (Player Accounts)
          • Key-value store
    • Peer-to-peer
      • Implementing Client hosting
  • Support
    • Release notes
    • Glossary
    • Unreal Engine support
    • WebGL support
    • ECS / DOTS support
    • Known issues and troubleshooting
    • Upgrade guide
      • 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

Was this helpful?

Export as PDF
  1. Manual
  2. Advanced topics

Command-line interface tools

Command-line interface tools explained

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

Replication Server

replication-server --help serve

      --port=32001                                  The port to listen to.
      --stats-port=32000                            The port to listen for stats scrapers. Also enables pprof.
      --use-p-prof                                  If StatsPort is 0 then setup pprof on port 6060.
      --dump                                        Write network packets to capture files (.packets).
      --dump-reverse                                Write network packets reversing in and out packets
      --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.
      --schema=STRING                               The schema file (.schema).
      --disconnect-timeout=5000                     Disconnect timeout (in milliseconds).
      --debug-streams                               Use debug streams.
      --max-entities=65536                          Maximum number of entities allowed.
      --max-clients=200                             Expected maximum number of clients.
      --min-query-distance=0.1                      Minimum distance for query change.
      --web-support                                 [Deprecated] Does this support web connections.
      --public-ip=STRING                            Public IP of the replication server, used by webrtc.
      --web-port=32003                              Port for webrtc, only used if --web-support is true
      --signalling-port=32002                       Port for signalling, only used if --web-support is true
      --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
      --env="prod"                                  Environment in which the server is executed
      --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.
      --persistence-enabled                         If enabled, starts replication server with persistence attached.
      --persistence-save-file-name="world.save"     The name of the persistent save file.
      --persistence-save-folder="."                 The folder where the save file is written.
      --persistence-save-frequency=30               The frequency in which the save file is written (in seconds).
      --persistence-query-world-position="0,0,0"    Position of the center of the entity query.
      --persistence-query-radius=10000              Radius of entity query.
      --persistence-disable-s-3-storage             Enable to disable storing to S3.
      --persistence-upload-size-threshold=1024      Difference in bytes to cause an s3 upload.
      --persistence-upload-frequency-forced=3600    The maximum number of seconds between forced s3 uploads.

To start the 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"

replication-server --help listen

      --port=64001                    The port to listen to.
      --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.
      --default-schema=STRING         The default schema file (.schema).
      --stats-port=64000              The port to listen for stats scrapers. Also enables pprof
      --use-p-prof                    If StatsPort is 0 then setup pprof on port 6060.
      --udp-port=42001                Port for udp traffic.
      --web-support                   [Deprecated] Does this support web connections.
      --web-port=42003                Port for webrtc, only used if --web-support is true
      --public-ip=STRING              Public IP of the replication server, used by webrtc.
      --signalling-port=42002         Port for signalling, only used if --web-support is true
      --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
      --env="prod"                    Environment in which the server is executed
      --region=STRING                 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
      --has-persistence               Does this support enabling persistence.
      --grpc-address=STRING           Address for realtime streaming of room/world updates
      --rsid=STRING                   Replication server unique ID

Last updated 4 months ago

Was this helpful?

__