How to build Unreal 5 Linux dedicated server

13th October 2022


Building a UE5 Linux dedicated server has a few extra steps. I've found a few good resources on it here and here, and below are my summary/lessons from doing that.

Firstly need to download the "cross compile toolchain" from the UE website. At the time of this blog the link is here. Grab the version that is most suitable. If you open your IDE, you should now see new compilation target options for Linux Server in your solution target dropdowns.

Then you need to duplicate your game editor target file. So if you game was called Example - you would duplicate ExampleEditor.Target.cs to be called ExampleServer.Target.cs. Then inside that file, replace Editor with Server in all locations. It should look something like this:

using UnrealBuildTool;
using System.Collections.Generic;

public class ExampleServerTarget : TargetRules
{
    public ExampleServerTarget(TargetInfo Target) : base(Target)
    {
        Type = TargetType.Server;
        DefaultBuildSettings = BuildSettingsVersion.V2;
        IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
        bUseLoggingInShipping = true; // Games in a "shipping" build dont include logging normally
        ExtraModuleNames.Add("Example");
    }
}

Now we need to regenerate the visual studio project files in your project.

When launching a dedicated server make sure you append -log at the end so you can watch the output of the server

< BACK TO LIST