Documentation
Connect your s&box game, call your backend from the C# library or plain HTTP, and run the server yourself. Generated from the server at v0.5.5 and the library at 7f77770c81dd6ab84facfa05e9a87010b6f27983.
New: Endpoints can now be written in YAML or JavaScript/TypeScript (more languages planned): a full global environment of shared code, sandboxed on your server. Script endpoints
Get started
Connect a gamePoint the game library at your server: project, public key and base URL.Game client startupWhat the library sends at startup: revision init, heartbeats and compatibility headers.Game valuesShared numbers your game and server both read: authoring, revisions and a worked anti-exploit example.
Game library
Library overviewInstall the library, configure credentials and call endpoints from game code.Install and configureInstall, update and configure the library; API root, generated code and dedicated server keys.Runtime guideEndpoint calls, game values, encrypted requests and key pinning, compatibility status and helpers.Sync ToolKeep collections, endpoints and workflows as YAML in your project and push or pull them.Authoring collections and endpointsYAML sources for collections, endpoints and workflows, synced by the editor tool.Script endpoints (JavaScript / TypeScript)Write endpoints in YAML or JavaScript/TypeScript: sandboxed, with a shared global environment of reusable code.ExamplesExample sources you can copy into a project.Coding agent tools (in engine)The ns_* tools exposed through the sbox-cli MCP bridge.C# API referencePublic types and members of the game library, from its source and XML docs.
HTTP API
Self-hosting
Self-hostingInstall, update, back up and run the server on Linux, macOS, Windows or Docker.Hosting modelsPlayer-hosted, P2P and dedicated servers, and what the backend checks in each.ConfigurationEvery server.toml setting and environment variable.DatabasesSQLite and PostgreSQL, migrations, backups and rollback.Owner consoleThe web dashboard: login, projects, records, keys and security.Media uploadsPlayer and project media, quotas and retention.Game logsStructured game events per project: wire format, search and retention.Export and move projectsPortable archives and moving a project between servers.ModulesOptional server modules and how to enable them.MonitoringHealth, metrics and logs.AlertingEmail and webhook alerts for errors, updates and certificates.Coding agents (MCP)Let coding agents operate your server through MCP.