More Build Methods

These approaches are generally slower and require deeper understanding of Unreal Engine.

✔️ Preparation

Explore alternative build methods suited for more advanced Unreal Engine and Edgegap users:

  1. ✔️ Preparation is a fast and automated method suitable for Continuous Integration.

  2. ⚡ Build from Plugin is a legacy build method requiring building Unreal Engine from source.

⚡ Build with Scripts

Building with scripts is a fast, fully automated, and easy method suitable for Continuous Integration.

Preparation

Before you get started, make sure to create a free account with Edgegap (no credit card required).

Configure a few essentials on your development machine:

Install Docker Desktop (or Docker CLI)
  • make sure to restart your computer after completing the installation.

Gain Access to Unreal Engine resources on GitHub
Generate GitHub Personal Access Token (classic)
  • enable only permission [read:packages] ,

  • generate token - store this value safely, you won't see it again.

1. Configure Project

Whether you’re using a Windows, Mac, or a Linux machine, you will need to build your server for Linux runtime, as most cloud providers nowadays (including Edgegap) run on Linux. Don’t worry, no Linux knowledge is required.

☑️ Disable Unreal Engine version compatibility check for dedicated servers and set IpNetDriver as the default driver or the fallback driver for replication networking:

Config/DefaultEngine.ini

net.IgnoreNetworkChecksumMismatch=1
net.CurrentHandshakeVersion=2
net.MinHandshakeVersion=2
net.VerifyNetSessionID=0
net.VerifyNetClientID=0


!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemUtils.IpNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")


MaxClientRate=1000000000
MaxInternetClientRate=1000000000
InitialConnectTimeout=120.0
MaxNetTickRate=60
NetServerMaxTickRate=60


DefaultServerTarget=LyraServer

☑️ Restart Unreal Engine to reload latest changes.

☑️ Create a dedicated server target script by copying your <PROJECT>Editor.Target.cs file in project root folder and renaming the copy to <PROJECT>Server.Target.cs.

☑️ Replace any references to word Editor with Server in your server target script.

☑️ Enable standard output server logs by adding overrides in your server target script:

bUseLoggingInShipping = true;
bOverrideBuildEnvironment = true;

✅ You may now proceed to the next step.

Optional: Steam Integration

Download steamclient.so

Dockerfile
...


...

2. Build and Publish

Working in a team of developers means sharing your code. When things go wrong, the last thing you want to hear is “it works on my machine”. Game servers have to run reliably on any machine, since a successful games’ servers will run on thousands of server machines across the world.

To help make your server reliable, we use Docker - virtualization software to ensuring that all of your server code dependencies down to the operating system level are going to be always exactly the same, no matter how or where the server is launched.

We recommend watching "Never install locally" (video). Docker is often confused with Dockerhub image registry. You do NOT need to use Dockerhub along with Docker. Think of Docker as a universal programming engine and Dockerhub as it’s App Store.

☑️ Verify that Docker is installed and running.

☑️ Download our Edgegap Build Utils archive including:

  • platform-specific build scripts:

    • BuildAndUpload.ps1 for Windows,

    • BuildAndUpload.sh for macOS and Linux,

  • Dockerfile - recipe for building your docker images,

  • dockerignore - list of noncritical files to remove and speed up builds,

  • StartServer.sh - utility script managing your Unreal Engine lifecycle on runtime.

☑️ Move the edgegap-unreal-buildutils folder to your project root directory.

☑️ Edit the BuildAndUpload script for your platform to configure:

  • github credentials used to pull pre-built Unreal Engine images for Linux Servers,

  • project details - engine version, server configuration, .uproject file name,

  • Edgegap Registry credentials used to upload your completed builds.

☑️ Execute the edited script to start build and upload process. Completing this step will add a new image in your Edgegap Container Registry dashboard page in your Repository.

☑️ You will be automatically redirected to create a new 🏷️ App Versions in dashboard.

✅ You may now proceed to the next step, skip to More Build Methods.

Troubleshooting and FAQ

ERROR: failed to run Build function: the Dockerfile cannot be empty

  • Some plugin sources may be missing Dockerfile and/or StartServer.sh , please find a copy these files from github source version of your plugin to your local plugin.


open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.

  • Verify that Docker is running on your development machine.


invalid reference format EdgegapLog: Warning: OnContainerizeCallback: Could not generate container, message:Failed

  • Verify that your application name is set and doesn't contain trailing whitespace.

  • Make sure to press Enter to confirm the input value when done editing.


Couldn’t find target rules file for target ‘ProjectName’ when building a project?

  • Change build configuration in your XYZServerTarget.cs file:

BuildConfig = EProjectPackagingBuildConfigurations::PPBC_Shipping;

403 Forbidden, Could not push container, message:Failed

  • Please verify your docker credentials are correctly set.

  • If using Edgegap Container Registry, ensure the username doesn’t include app-version-pull , which is the profile only allowing pulling images. Your profile should resemble your account email instead.

  • Verify that you have enough free space in your account’s Container Registry. We recommend trying to More Build Methods, and using our API to delete older images. Images are stored on your local machine until deleted for backups.

⚡ Build from Plugin

Our legacy plugin includes advanced utilities, and requires building Unreal Engine from source.

Preparation

Before you get started, make sure to create a free account with Edgegap (no credit card required).

Configure a few essentials on your development machine:

Install Docker Desktop (or Docker CLI)
  • make sure to restart your computer after completing the installation.

Gain Access to Unreal Engine resources on GitHub
Configure Your Development Environment
Install an Official Edgegap Unreal Engine Plugin

Choose one of the official plugins:

1. Configure Project

Whether you’re using a Windows, Mac, or a Linux machine, you will need to build your server for Linux runtime, as most cloud providers nowadays (including Edgegap) run on Linux. Don’t worry, no Linux knowledge is required.

☑️ Build your Unreal Engine version from source on your development machine,

  • install specific release branch (e.g. 5.5) to build on a stable foundation,

  • use Solid State Drive (SSD) to speed up builds (from ~12+ hours to ~2+ hours),

  • this is only required the first time and every time you upgrade your Unreal Engine version.

☑️ Install Unreal Cross-Compiling Toolchain to build game servers for Linux.

☑️ Restart your development machine, otherwise you’ll run into errors later on!

☑️ Disable Unreal Engine version compatibility check for dedicated servers and set IpNetDriver as the default driver or the fallback driver for replication networking:

Config/DefaultEngine.ini

net.IgnoreNetworkChecksumMismatch=1
net.CurrentHandshakeVersion=2
net.MinHandshakeVersion=2
net.VerifyNetSessionID=0
net.VerifyNetClientID=0


!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemUtils.IpNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")


MaxClientRate=1000000000
MaxInternetClientRate=1000000000
InitialConnectTimeout=120.0
MaxNetTickRate=60
NetServerMaxTickRate=60


DefaultServerTarget=LyraServer

☑️ Restart Unreal Engine to reload latest changes.

☑️ Create a dedicated server target script by copying your <PROJECT>Editor.Target.cs file in project root folder and renaming the copy to <PROJECT>Server.Target.cs.

☑️ Replace any references to word Editor with Server in your server target script.

☑️ Enable standard output server logs by adding overrides in your server target script:

bUseLoggingInShipping = true;
bOverrideBuildEnvironment = true;

✅ You may now proceed to the next step.

Optional: Steam Integration

Download steamclient.so

Dockerfile
...


...

2. Build and Publish

Working in a team of developers means sharing your code. When things go wrong, the last thing you want to hear is “it works on my machine”. Game servers have to run reliably on any machine, since a successful games’ servers will run on thousands of server machines across the world.

To help make your server reliable, we use Docker - virtualization software to ensuring that all of your server code dependencies down to the operating system level are going to be always exactly the same, no matter how or where the server is launched.

We recommend watching "Never install locally" (video). Docker is often confused with Dockerhub image registry. You do NOT need to use Dockerhub along with Docker. Think of Docker as a universal programming engine and Dockerhub as it’s App Store.

☑️ Verify that Docker is installed and running.

☑️ Rebuild our plugin for your custom Unreal Engine version built from source.

☑️ Copy compiled plugin to your Plugins folder in the root of your Unreal project (not engine).

☑️ Launch your new Unreal Engine from Visual Studio and open toolbar item Edit / Plugins.

☑️ Enable our plugin in section INSTALLED / Other.

☑️ Configure our plugin by opening toolbar item Edit / Project Settings / Edgegap:

  • API Token is needed to upload your server to Edgegap, get one by clicking Get Token.

  • Application name on Edgegap can match your project name or be customized, make sure to only use lowercase letters, numbers, or characters dash - and underscore _.

  • Image Path provides optionally a custom icon for your game server on Edgegap, skip for now.

  • Version name is useful for tracking client/server compatibility and rolling back in case of issues.

    • Timestamps are a great option for app version names, e.g. 2024.01.30-16.50.20-UTC .

    • Multiple application versions may point to the same image tag, such as v1.1.0 and dev .

    • Learn more about Apps and Versions later.

☑️ Click Create Application. Completing this step will result in a new application appearing in Edgegap Dashboard.

☑️ Skip custom container registry settings for now, you can use third party registry later if you’d like.

☑️ Once you’re happy with your configuration hit Build and Push, wait for the process to finish and verify there are no new errors in your Unreal console. Completing this step will result in a new folder appearing in your project root - Saved/LinuxServer. In addition, a new image appears now in your Edgegap Container Registry dashboard page underneath your Repository, and a new 🏷️ App Versions appears in your dashboard underneath your Application.

☑️ In your new application version, set environment variable TARGET_FILE_NAME to match your DefaultServerTarget value from step More Build Methods.

✅ You may now proceed to the next step.

Troubleshooting and FAQ

ERROR: failed to run Build function: the Dockerfile cannot be empty

  • Some plugin sources may be missing Dockerfile and/or StartServer.sh , please find a copy these files from github source version of your plugin to your local plugin.


open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.

  • Verify that Docker is running on your development machine.


invalid reference format EdgegapLog: Warning: OnContainerizeCallback: Could not generate container, message:Failed

  • Verify that your application name is set and doesn't contain trailing whitespace.

  • Make sure to press Enter to confirm the input value when done editing.


Couldn’t find target rules file for target ‘ProjectName’ when building a project?

  • Change build configuration in your XYZServerTarget.cs file:

BuildConfig = EProjectPackagingBuildConfigurations::PPBC_Shipping;

403 Forbidden, Could not push container, message:Failed

  • Please verify your docker credentials are correctly set.

  • If using Edgegap Container Registry, ensure the username doesn’t include app-version-pull , which is the profile only allowing pulling images. Your profile should resemble your account email instead.

  • Verify that you have enough free space in your account’s Container Registry. We recommend trying to More Build Methods, and using our API to delete older images. Images are stored on your local machine until deleted for backups.

🪜 Next Steps

Continue to 🚀 5. Deploy to Cloud with our Dashboard Deployment feature and learn more about stopping your deployments, injected variables and parametrization, and server discoverability.

Last updated

Was this helpful?