Dedicated Servers: Installation, Configuration, and Command Line
s&box dedicated servers run headless and can be installed via SteamCMD. They host multiplayer games without requiring the full editor. Installation Install via …
Dedicated Servers - s&box Documentation
Official s&box documentation for dedicated server hosting. Dedicated Servers covers running s&box games on headless servers. Running Local Projects explains tes…
Serverside Code: #if SERVER Blocks and .Server.cs Files for Hidden Logic
s&box supports serverside-only code that is stripped from client builds. This only works when running local projects on dedicated servers. #if SERVER Blocks Cod…
LocalData persistence for server-side data
LocalData Persistence in s&box LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban lists, …
LocalData static class: Server-side data persistence
LocalData Static Class API Reference LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban l…
ISceneStartup: OnHostPreInitialize, OnHostInitialize, OnClientInitialize — Scene Initialization Hooks
ISceneStartup: Scene Initialization Hooks for GameObjectSystems provides callbacks for scene initialization events. It is intended for implementations, not comp…
Networking Static Class: IsHost, IsClient, CreateLobby, Connect, SetData, and Debug Convars
Networking Static Class: IsHost, IsClient, CreateLobby, Connect, and Server Data The static class manages the multiplayer session in s&box. Session State Note: …
Dedicated Servers: Running Local Projects with Hidden Serverside Code
s&box dedicated servers can run entirely local projects as the game using the command line argument: Assets are still fetched from the cloud version of the game…
s&box ServerSettings: Server-controlled settings
ServerSettings Static Class ServerSettings is a static class that defines server-controlled settings replicated to all clients. These ConVars control game-wide …
ConVar and ConCmd: Console Variables and Commands in s&box
ConVar and ConCmd: Console Variables and Commands s&box uses and attributes on static properties and methods to expose them to the console system. ConVar (Conso…
ISceneStartup: Host and Client Scene Initialization Events
is a scene event interface for listening to scene initialization on host and client. It runs when pressing play in editor, loading a game, or joining a server. …
WebSockets - s&box Networking Documentation
WebSockets s&box supports WebSocket connections for real-time communication with external servers. Use for custom networking, persistent data, or integrating wi…
Sound.Play and SoundHandle: 3D Audio, Volume, Pitch, Occlusion, UI Sounds, and Dedicated Server Behavior
Sound.Play and SoundHandle: Audio Playback in s&box is the static entry point for audio playback. is the returned handle for controlling a playing sound. Playin…
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR — Runtime Context in s&box
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR is a static class in s&box that exposes runtime context flags. These are set at startup…
Networking State in s&box: IsHost, IsClient, IsActive, and Lobby Management
Networking State in s&box: IsHost, IsClient, IsActive Understanding the networking state is critical for writing correct multiplayer code in s&box. Key Properti…
WebSocket Connections with Auth Token Authentication in s&box
s&box supports WebSocket connections to external servers for custom networking or persistent data outside the local filesystem. Basic Connection and Messaging U…
Connection Permissions - s&box Networking Documentation
Connection Permissions Connection permissions control what clients can do in your multiplayer game. Set permissions for spawning objects, using tools, or perfor…
Component Lifecycle: Full Callback Order — OnAwake, OnEnabled, OnStart, OnUpdate, OnFixedUpdate, OnDisabled, OnDestroy
Component Lifecycle: Full Callback Order s&box components have a well-defined lifecycle. Understanding the exact order prevents subtle bugs. Callback Order Key …
Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars
LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…
NetworkHelper — quick multiplayer setup with auto-server and player spawning
NetworkHelper — Quick Multiplayer Setup is a built-in s&box component that handles the boilerplate of starting a server and spawning players. It's the fastest w…