MultiConnectSDK › CLI
11. Using the CLI with Unity
Build and Deploy Server in Unity and the CLI share multiconnect.json, so a project linked by either one works in both.
The easiest way to combine them is to build in Unity, then deploy the same build from a terminal:
- In Unity, open MultiConnect > Build and Deploy Server, and press Build and Deploy at least once. The window sets the build paths, and keeps its builds in
Builds/MultiConnectin the project folder, which Unity's standard.gitignorealready leaves out. - Give the CLI your key. The window keeps its copy of the key inside Unity, so the CLI needs its own: set
MC_ACCESS_KEYandMC_ACCESS_SECRETin your terminal, or runmulticonnect initonce and enter the same deployment and build paths. - From your project folder, run:
multiconnect deploy --skip-build
To deploy a Unity build you made yourself, run multiconnect init, and give your build folder as the build path. The folder must contain the binary named in the deployment's Entry Point File, built for Linux as a Dedicated Server.
To build in CI, set your own Unity command as the build command, using Unity's batch mode. Your CI machine needs Unity with Linux Dedicated Server Build Support installed and licensed.

