UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

architecture

[UBA] Automating Linux Dedicated Server Builds in Unity Cloud

Solution

cloud servicesonline servicesmultiplayernetworkingserver

Unity 2021.x - Unity 6.3.x

Published Thu, Apr 30

Issue

 The BuildTarget configuration for Linux Dedicated Servers is frequently difficult to locate within the Unity Build Automation (UBA) web interface. This leads to the misconception that automated pipelines are restricted to desktop and mobile platforms, causing delays in deploying headless server instances for Unity 6.3.x projects.

Explanation

Automated server builds are achieved by ensuring the ProjectSettings.asset is correctly configured before the Unity Cloud runner initializes the process.

  1. Open the Build Settings in your project and select the BuildTarget for Dedicated Server.
  2. Set the target platform to Linux.
  3. Ensure the Server Build checkbox is enabled in the platform settings.
  4. Commit and push these changes to Unity Version Control (UVCS) or your Git provider to update the project metadata.
  5. In the Unity Cloud Dashboard, navigate to Build Automation > Configurations.
  6. Create a new configuration and select Linux as the platform; the BuildTarget will be inherited from your project settings.

Additional Tips

  • Use post-build scripts to automate the delivery of the server executable to hosting providers like PlayFab or GameLift.
  • Since Unity Build Automation does not handle deployment, configure a webhook to notify your orchestration layer once a BuildTarget artifact is ready for download.
  • Ensure any UNITY_SERVER preprocessor defines are correctly set in your project to strip client-only logic during the BuildTarget execution.

TL;DR

Dedicated server builds for Linux can be fully automated in Unity Cloud by properly synchronizing the BuildTarget settings and utilizing webhooks for post-build deployment.


Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.