More Build Methods
These approaches are generally slower and require deeper understanding of Unreal Engine.
See Getting Started - Servers for your first steps with Unreal Engine game server hosting on Edgegap.
✔️ Preparation
Explore alternative build methods suited for more advanced Unreal Engine and Edgegap users:
✔️ Preparation is a fast and automated method suitable for Continuous Integration.
⚡ 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:
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:
Make sure to input your DefaultServerTarget
at the end of this snippet!
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.
When using Lyra Starter Game sample, make sure to duplicate and rename your LyraGameEOS.Target.cs
file and the containing class name to match your project name.
☑️ 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.
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.
☑️ 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.
⚡ 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:
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.
Download branch with a git client! Using github UI will always download the unstable release
branch.
☑️ 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:
Make sure to input your DefaultServerTarget
at the end of this snippet!
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.
When using Lyra Starter Game sample, make sure to duplicate and rename your LyraGameEOS.Target.cs
file and the containing class name to match your project name.
☑️ 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.
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.
☑️ 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:
Always press enter after editing input values to ensure they are saved correctly.
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
anddev
.Learn more about Apps and Versions later.
Do not reuse latest
version to prevent our system from deploying outdated (cached) image.
☑️ 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.
🪜 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?