# Dedicated Server

Use when building dedicated servers, headless export, server architecture, lobby...

- Repository: https://github.com/jame581/GodotPrompter (914 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add jame581/GodotPrompter --skill dedicated-server -g -a claude-code -y`
Codex: `npx skills add jame581/GodotPrompter --skill dedicated-server -g -a codex -y`
Cursor: `npx skills add jame581/GodotPrompter --skill dedicated-server -g -a cursor -y`
Gemini CLI: `npx skills add jame581/GodotPrompter --skill dedicated-server -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add jame581/GodotPrompter`

## Description

Use when building dedicated servers, headless export, server architecture, lobby management, and deployment

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Dedicated Server in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, C# follows.

**Related skills:** See **multiplayer-basics** for ENet setup, RPCs, and authority model. See **multiplayer-sync** for state synchronization and interpolation.

---

## 1. Headless Export

A dedicated server runs without a display, GPU, or audio device. Godot supports this through the `--headless` flag and a dedicated export preset.

### --headless Flag

Pass `--headless` on the command line to suppress the display and audio drivers at runtime:

```
./my_game.x86_64 --headless
```

`--headless` is a runtime flag that works on any exported binary. Godot 4 has no separate server platform or server export template: a dedicated-server export uses the regular template, so the binary keeps its rendering code (a smaller binary needs a custom-compiled template). What the export changes is the PCK and a feature tag, see below.

### Server Export Preset

In the Godot editor, create a dedicated **Linux** export preset:

1. Open **Project → Export**.
2. Add a **Linux** preset and name it `Linux Server`.
3. On the **Resources** tab, set **Export Mode** to **Export as dedicated server**. This adds the `dedicated_server` feature tag, which makes the binary start with the headless display and dummy audio drivers even without `--headless`, and marks `res://` as **Strip Visuals**: visual resources are exported as placeholders (e.g. a texture keeps only its size). Set folders the server needs intact to **Keep**.
4. Use the **Exclude** filter on the same tab to drop client-only files (audio, client-only scenes) from the server PCK entirely.

### Feature Tags

Use `OS.has_feature()` to branch between server and client code at runtime. Define a custom `server` feature on the export preset's **Features** tab (**Custom (comma-separated)** field) or rely on the built-in `dedicated_server` feature that a dedicated-server export sets automatically:

The rest: https://github.com/jame581/GodotPrompter/blob/HEAD/skills/dedicated-server/SKILL.md
