Up to date

This page is up to date for Godot 4.1. If you still find outdated information, please open an issue.

Exporting for dedicated servers

If you want to run a dedicated server for your project on a machine that doesn't have a GPU or display server available, you'll need run Godot with the headless display server and Dummy audio driver.

Since Godot 4.0, this can be done by running a Godot binary on any platform with the --headless command line argument, or running a project exported as dedicated server. You do not need to use a specialized server binary anymore, unlike Godot 3.x.

Editor versus export template

It is possible to use either an editor or export template (debug or release) binary in headless mode. Which one you should use depends on your use case:

  • Export template: Use this one for running dedicated servers. It does not contain editor functionality, and is therefore smaller and more optimized.

  • Editor: This binary contains editor functionality and is intended to be used for exporting projects. This binary can be used to run dedicated servers, but it's not recommended as it's larger and less optimized.

Export approaches

There are two ways to export a project for a server:

  • Create a separate export preset for the platform that will host the server, then export your project as usual.

  • Export a PCK file only, preferably for the platform that matches the platform that will host the server. Place this PCK file in the same folder as an export template binary, rename the binary to have the same name as the PCK (minus the file extension), then run the binary.

Both methods should result in identical output. The rest of the page will focus on the first approach.

See Exporting projects for more information.

Exporting a project for a dedicated server

If you export a project as usual when targeting a server, you will notice that the PCK file is just as large as for the client. This is because it includes all resources, including those the server doesn't need (such as texture data). Additionally, headless mode won't be automatically used; the user will have to specify --headless to make sure no window spawns.

Many resources such as textures can be stripped from the PCK file to greatly reduce its size. Godot offers a way to do this for textures and materials in a way that preserves references in scene or resource files (built-in or external).

To begin doing so, make sure you have a dedicated export preset for your server, then select it, go to its Resources tab and change its export mode:

Choosing the **Export as dedicated server** export mode in the export preset

Choosing the Export as dedicated server export mode in the export preset

When this export mode is chosen, the dedicated_server feature tag is automatically added to the exported project.


If you do not wish to use this export mode but still want the feature tag, you can write the name dedicated_server in the Features tab of the export preset. This will also force --headless when running the exported project.

After selecting this export mode, you will be presented with a list of resources in the project:

Choosing resources to keep, keep with stripped visuals or remove

Choosing resources to keep, keep with stripped visuals or remove

Ticking a box allows you to override options for the specified file or folder. Checking boxes does not affect which files are exported; this is done by the options selected for each checkbox instead.

Files within a checked folder will automatically use the parent's option by default, which is indicated by the (Inherited) suffix for the option name (and the option name being grayed out). To change the option for a file whose option is currently inherited, you must tick the box next to it first.

  • Strip Visuals: Export this resource, with visual files (textures and materials) replaced by placeholder classes. Placeholder classes store the image size (as it's sometimes used to position elements in a 2D scene), but nothing else.

  • Keep: Export this resource as usual, with visual files interact.

  • Remove: The file is not included in the PCK. This is useful to ignore scenes and resources that only the client needs. If you do so, make sure the server doesn't reference these client-only scenes and resources in any way.

The general recommendation is to use Strip Visuals whenever possible, unless the server needs to access image data such as pixels' colors. For example, if your server generates collision data based on an image's contents, you need to use Keep for that particular image.


To check the file structure of your exported PCK, use the Export PCK/ZIP... button with a .zip file extension, then open th