# Hosting a Godot ENet dedicated server

> NetCraftGames is designed to host a Godot 4 server exported for Linux x86_64 that uses ENetMultiplayerPeer over UDP. Export it in dedicated server mode, run it headless, and declare one UDP port. Not certified yet.

*NetCraftGames (NCG) by Charging Bull Software. Last updated: 2026-10-03. Canonical page: https://netcraftgames.com/engines/godot-enet/*

## Short answer

Yes, by design. A Godot 4 game that already uses `ENetMultiplayerPeer` can run on NetCraftGames as a **Linux x86_64 headless server**: you export it with Godot's dedicated server mode, pack it, declare its UDP port, and we deploy it, check it and hand out the address. ENet is UDP, so browsers cannot use it; browser clients need the [WebSocket lane](https://netcraftgames.com/engines/godot-websocket/).

## What Godot gives you

Godot's export documentation says to select the server export preset, open its Resources tab and choose "Export as dedicated server" mode, which adds the `dedicated_server` feature tag automatically. Since Godot 4.0 any binary also runs headless with the `--headless` argument. You can detect server mode in code with `OS.has_feature("dedicated_server")`.

## What you provide

- A Linux x86_64 export in dedicated server mode, packed as `.tar.gz`.
- A server that creates its peer on a fixed UDP port, for example `peer.create_server(8910, 32)`, then assigns it to `multiplayer.multiplayer_peer`.
- A health and join reply on the declared UDP port, and a loopback player-count endpoint if you want idle shutdown.
- The same Godot version for client and server.

## Steps


1. **Export a dedicated server.** In Project > Export add a Linux preset, open its Resources tab, choose Export as dedicated server, and export a Linux x86_64 binary with the export templates matching your editor version.
2. **Create the server on a fixed UDP port.** In the server path create an `ENetMultiplayerPeer`, call `create_server(port, max_clients)`, assign it to `multiplayer.multiplayer_peer` and skip all window, audio and input setup.
3. **Run headless and test locally.** Start `./server.x86_64 --headless` on a Linux machine and join with a real client from another computer before packing.
4. **Add health and join replies.** Answer a small UDP request on the declared port with a known string, so a join can be proven and not only a port.
5. **Report players and save under /game.** Expose a bounded loopback player-count endpoint and write saves under `/game/saves` so shutdown can checkpoint first.
6. **Pack and declare.** Archive the export folder as `.tar.gz` with no links or secrets, and declare the engine as Godot ENet with its UDP port and start command.


## Honest gaps

- **Not certified.** The exact export template version, UDP reachability from real networks and an actual join still need live evidence.
- **UDP only.** Players behind networks that block UDP cannot connect to an ENet server.
- **Mobile.** Android and iOS clients are declared intent; suspension and rejoin are not tested.
- **No anti-cheat** and no host migration.

## Frequently asked questions


### How do I export a Godot 4 dedicated server?

Add a Linux preset in Project > Export, open the Resources tab and choose Export as dedicated server, which adds the dedicated_server feature tag. Export for Linux x86_64 with matching templates. Any Godot binary can also run headless with the --headless argument, which is how a server is started on a machine without a display.

### Can browsers connect to a Godot ENet server?

No. ENet runs over UDP and browsers do not expose raw UDP to web exports. A Godot game with browser players needs WebSocket or WebRTC networking instead. NetCraftGames supports an existing Godot WebSocket server behind a wss gateway, and a WebRTC signaling lane, but it cannot convert ENet traffic for browsers.

## Sources

- [Godot Docs: Exporting for dedicated servers](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_dedicated_servers.html), accessed 2026-10-03

## Related pages

- [Godot dedicated server export checklist](https://netcraftgames.com/guides/godot-dedicated-server-export-checklist/): A checklist for exporting a Godot 4 dedicated server for Linux: export mode, headless start, ENet versus WebSocket, ports, saves and packing.
- [WebSocket vs UDP for browser multiplayer](https://netcraftgames.com/guides/websocket-vs-udp-browser-multiplayer/): Browsers cannot use raw UDP. Compare WebSocket, WebRTC data channels and native UDP for multiplayer games, and pick the right transport for your players.
- [Hosting a Godot WebSocket multiplayer server](https://netcraftgames.com/engines/godot-websocket/): Host a Godot 4 WebSocket multiplayer server on NetCraftGames for browser and native clients: WebSocketMultiplayerPeer, wss through a gateway, and honest gaps.
