Pre-launch.NetCraftGames is not accepting customers yet. Launch happens only after its public checks pass.See launch statusJoin the waitlist

Guides

Godot dedicated server export checklist

Export a Linux x86_64 preset with the Export as dedicated server mode, start it with --headless, create your ENet or WebSocket peer on a fixed port, and test a real client before packing. Godot adds the dedicated_server feature tag for you.

By Charging Bull SoftwareLast updated:

The short answer

Godot's documentation says to open the server export preset, go to the Resources tab and pick "Export as dedicated server", which adds the dedicated_server feature tag automatically. Since Godot 4.0, any binary can also run without a window using --headless. Pair that with a fixed port and an honest test and you have a server a host can run.

Detect server mode in code

Godot gives you three ways to know you are the server:

func _ready() -> void:
    if OS.has_feature("dedicated_server"):
        start_server()
    elif DisplayServer.get_name() == "headless":
        start_server()
    elif "--server" in OS.get_cmdline_user_args():
        start_server()

Use one on purpose. A server that quietly starts as a client waits forever for a window.

ENet or WebSocket?

ENetWebSocket
ProtocolUDPTCP (WebSocket)
Browser web exportNot possibleYes, over wss://
Latency under packet lossBetterWorse
Peer classENetMultiplayerPeerWebSocketMultiplayerPeer

Native-only games should use ENet. Games with browser players need WebSocket or WebRTC. Read WebSocket vs UDP.

The checklist

  1. Match versionsInstall export templates that match your editor version exactly, and use the same Godot version for client and server.
  2. Create a Linux x86_64 presetIn Project > Export add a Linux preset and choose the x86_64 architecture.
  3. Choose dedicated server modeOn the Resources tab pick Export as dedicated server. This adds the dedicated_server feature tag and lets you strip visuals.
  4. Start the right peer on a fixed portCreate ENetMultiplayerPeer.create_server(port, max_clients) for UDP or WebSocketMultiplayerPeer.create_server(port) for browsers, then assign it to multiplayer.multiplayer_peer.
  5. Run it headless on LinuxExecute ./server.x86_64 --headless, check the port with ss, and join from a real client on another network.
  6. Keep saves under one pathWrite state under /game/saves or another single known folder so a shutdown can checkpoint it.
  7. Pack cleanlyArchive the export folder as .tar.gz with no symbolic links and no embedded tokens, then record the SHA-256 of the file you will upload.

Stripping the export

The export dialog lets each resource be exported with visuals replaced by placeholders, kept, or removed. Stripping textures and materials on the server shrinks the package and memory. Do not strip anything your server logic reads, such as collision shapes, navigation data or scene scripts.

Test it the way a host will run it

On a Linux x86-64 machine, extract the archive and start the server with the exact command you will declare. Check the port with ss -lunp for ENet (UDP) or ss -ltnp for WebSocket (TCP), then join from a Godot client on another computer or network. If the server prints errors about missing display or audio drivers, you started the normal binary without the dedicated server tag or --headless.

Common mistakes

MistakeSymptomFix
Export templates do not match the editor versionExport fails or the server crashes at startInstall the matching templates from the editor's export dialog
Client and server built on different Godot versionsPeers connect, then disconnect or desyncRebuild both with one version
Server created only inside a UI sceneNothing listens when run headlessStart the peer from an autoload or a scene that runs without a window
Stripped a resource the server readsMissing node or script errors at startupMark only visual resources as stripped
Hard-coded 127.0.0.1 or a random portReachable only locallyBind the fixed declared port on all interfaces
Saved files written next to the executableLost on shutdownWrite under one declared save folder

What a host needs from you

A declared start command such as /game/server.x86_64 --headless, the port and protocol (UDP for ENet, TCP for WebSocket), a health reply and, ideally, a join probe. The connection config guide lists each field, and the Godot ENet and Godot WebSocket pages cover the hosting side.

Frequently asked questions

How do I run a Godot server without a window?

Start the exported binary with the --headless command-line argument; since Godot 4.0 this works on any platform. If you export with Export as dedicated server mode, the dedicated_server feature tag is added automatically, which you can test with OS.has_feature, and the project can start in server mode without extra arguments.

Sources