Installation
Install SteamCMD
Follow the SteamCMD installation guide from Valve. SteamCMD is the command-line tool used to install and update Steam-based servers.
Install the s&box dedicated server
From the directory where you installed SteamCMD, run:This installs or updates the s&box Server (App ID 1892930).
Add
-beta staging to host a server on the staging branch. Note that staging servers may not be joinable by all players.Running the server
Once installed, the server files are insteamcmd/steamapps/common/Dedicated Server. Create a .bat file to start your server. For example, create Run-Server.bat:
facepunch.walker game with the garry.scenemap map and sets the server title to My Dedicated Server.
Configuration
Pass configuration as command-line switches when starting the server. Each switch corresponds to a ConVar or ConCmd that runs at startup.| Switch | Arguments | Description |
|---|---|---|
+game | <packageIdent> [mapPackageIdent] | The game package to load, and optionally a map package. |
+hostname | <name> | The server title visible to players in the server browser. |
+net_game_server_token | <token> | A token tied to your Steam account that gives your server a stable Steam ID. Visit steamcommunity.com/dev/managegameservers to generate one. Without this, a new Steam ID is generated on every restart. |
+net_game_server_token is not required and is only available as an option once s&box is released.Connection permissions
The host can adjust permissions for individual connections. Set these in yourOnActive network event handler.
Spawning objects
By default, any connected client can spawn networked objects. Restrict or allow this withConnection.CanSpawnObjects:
Refreshing objects
By default, only the host can send network refresh updates for a networked object. Allow the object’s owner to send refresh updates as well withConnection.CanRefreshObjects: