The short answer
Per Epic's documentation: use a source build of Unreal Engine and a C++ project that supports client-server play, create a <PROJECT_NAME>Server.Target.cs file in the project's Source directory, and run the server with -log while testing. By default a dedicated server listens on port 7777. For hosting, you additionally need a Linux server package, which means a cross-compile toolchain or a Linux build machine.
The checklist
- Use a source buildBuild Unreal Engine from source. The standard launcher engine cannot produce a dedicated server target.
- Add the server targetIn a C++ project create
<PROJECT_NAME>Server.Target.csin the Source directory and regenerate project files. - Cook and stage for LinuxRun BuildCookRun with the Linux platform and the server-only options, so the output contains only server content.
- Write a start scriptLaunch with a fixed map and port, for example
./YourGameServer.sh /Game/Maps/Lobby -port=7777 -log, and make it executable. - Test on Linux with a real clientRun the staged server on a Linux machine and join from a client built from the same version, from a different network.
- Add health and join probesReply to a UDP health request and a join request with known answers, so a join can be proven.
- Pack and hashArchive the staged folder as
.tar.gzwith no links or secrets and record its SHA-256.
Example packaging command
The shape below is the common one. Adjust paths and configuration for your project and engine version, and read Epic's current documentation.
RunUAT.sh BuildCookRun -project="YourGame.uproject" -platform=Linux -server -noclient \
-serverconfig=Shipping -cook -build -stage -pak -archive -archivedirectory=Out
# start with:
./YourGameServer.sh /Game/Maps/Lobby -port=7777 -log
Things that break Unreal servers on a host
| Problem | Symptom | Fix |
|---|---|---|
| Client and server built from different changelists | Connects, then disconnects or desyncs | Rebuild both from one version |
| Server needs a map not cooked | Crash on start | Add the map to the cook list |
| Bound only to localhost | Not reachable | Launch without a localhost-only bind and verify with ss |
| Heavy memory use | Process killed (exit 137) | Measure peak memory; use the large profile if you must |
| Start script not executable | Exit 126 | chmod +x before packing |
| Large pak files | Upload too big | Strip server content; compress the archive |
A note on cost
Unreal servers are often heavier than small Unity or Godot servers. If you need the large profile, it spends two plan hours for every hour it runs; see pricing and the idle shutdown guide.
Frequently asked questions
Do I need Linux to build an Unreal dedicated server for Linux?
Not necessarily. Epic supports cross-compiling for Linux from Windows with its toolchain, or you can build on a Linux machine. Either way, you must test the packaged server on real Linux, because missing libraries, file permissions and memory limits only show up there. A Windows-only test does not prove the Linux package runs.
Sources
- Epic Games: Setting up dedicated servers in Unreal Engine, accessed October 3, 2026